Class and ID are HTML attributes.
We know what those are by now right?
If not,
click here.
You then refer to that class/ID on your external CSS style sheet by using
.class-name and #id-name respectively!
Example: (insert example here)
A class is a group and can be used as many times as needed.
An ID is an individual and can only be used once per page.
An ID overrides a class.
It's a good habit to simply use class
Make sure to not use spaces when labeling your ID and Classes!
Stick to hyphens if you need to separate words! You cannot start a name
with a number.
Comments in CSS are written between /* */, like so: /* comment goes
here */
Next:
CSS Box Model
Return to previous page
Return to main page