Emphasize to students that in CSS id is typically more specific than class, as beginners often struggle to disambiguate these attributes.

  • id is more specific and should be unique.
    • id will override anything in a class.
    • When you want to override just one part of a class’ set of properties (font, color, size, etc.) you use an id.

More about this tip

External Source

Interview with Breanna Turcsanyi