css / introduction
Estimated reading time: 30 seconds
comments powered by
- 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,
- Try to create your style rules in the same order as the elements appear in the page: that is,
body first, followed by
- Create rules that are true for the majority of content influenced by a particular element, such as
p, then create rules for exceptions.