body>
text text text text text
text text text text text
don't get too specific with names in class - be generic - eg not bold etc
can leave p out of the p. - but putting in the p makes it more specific for search
by removing the p, it assumes this is a universal selector and will apply to any html element that has the class name header - with p it can only be applied to paragraph elements with class name header
.header will apply to any html element with class name .header
can also apply multiple class selector rules to one html element, eg header text
well structured selectors is key to writing good css
tip - can be tempting to "overclass" - too many classes
No comments:
Post a Comment