- Try to avoid inline and embedded styles as much as possible.
- Write your HTML first, then link to a style sheet. Trying to do both at the same time almost always results in confusing and messy code.
- Create style rules for the “biggest” tags first:
body
(and, if necessary,html
). - Try to create your style rules in the same order as the elements appear in the page: that is,
body
first, followed byh1
,h2
, etc. - Create rules that are true for the majority of content influenced by a particular element, such as
p
, then create rules for exceptions.
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.