Specificity. It may not seem like something that important, and in most cases you won’t come across any conflicts at all, but the larger and more complex your CSS files become, or the more CSS files you start to juggle with, the greater likelihood there is of conflicts arising.
More Specific = Greater Precedence If the selectors are the same then the last one will always take precedence. For example, if you had: The text in the box of p elements would be colored blue because that rule came last. Grouping and Nesting. Grouping You can give the same properties to a number of selectors without having to repeat them.
For example, if you have something like: You can simply separate selectors with commas in one line and apply the same properties to them all so, making the above: Nesting. HTML Standard. Validator. HTML Validator[edit] In the context of web documents, the term HTML validator technically refers to validation using DTDs by SGML tools.
However, the common (non technical) use of the term refers to checking an HTML document for various problems using some type of computerized checker, and not necessarily by using a DTD with SGML tools. Furthermore, the term HTML validation for HTML5 cannot mean validation using a DTD because HTML5 is not SGML-based and does not use a DTD. See also[edit] References[edit] The W3C Markup Validation Service.