OK,
Now I'm trying to understand the difference between various thingemy's in CSS.
We have ID's and, as highlander always said, "There can be only ONE!" (on each page). That's "just the rule with ID's. OK, don't know why, but OK.
Then we have, say, headings H1 H2 etc... or "element selectors".
h1 { etc etc etc
Then we have .class selectors that apply to all bits labelled that way in the html in the document.
.leader is the example for the leading paragraph.
When do I use a class and when an element sector? It seems to me like I could make all my CSS .class selectors or all element selectors, depending on which involved less typing. Which one for what job?
Now I'm trying to understand the difference between various thingemy's in CSS.
We have ID's and, as highlander always said, "There can be only ONE!" (on each page). That's "just the rule with ID's. OK, don't know why, but OK.
Then we have, say, headings H1 H2 etc... or "element selectors".
h1 { etc etc etc
Then we have .class selectors that apply to all bits labelled that way in the html in the document.
.leader is the example for the leading paragraph.
When do I use a class and when an element sector? It seems to me like I could make all my CSS .class selectors or all element selectors, depending on which involved less typing. Which one for what job?