HTML and CSS Reference
Beyond optimal markup and styles provided by the proper implementation of web standards, there are designing
conventions that are browser-independent, reliable, and satisfactory, and considered as best practices. It is important
to know the techniques that provide standard-compliant code and distinguish them from those tricks and hacks that
cause incorrect markup or decrease interoperability.
By now you should know the major web standards for markup, styles, news feeds, and other web site
components. It is time to learn how to apply these standards in practice, which can be used in the daily work of
web designers. Even standard-compliant web pages do not necessarily provide content in a meaningful, logical
manner; thus, you should learn the purpose of markup elements and CSS properties to maximize web page quality.
The ultimate aim is to find the right combination of structure, presentation, and behavior and to separate them to
maximize the benefits of web standards.
Appropriately Used Elements
A crucial decision in web design is which elements to implement for representing your content and achieving the
desired web site behavior. The general rules can be summarized as follows:
Tables for tabular data
Floating elements instead of tables for positioned components (very bad practice)
Headers instead of general paragraphs
Paragraphs instead of separate lines with break rows (very bad practice)
Paragraphs for text paragraphs instead of divisions
Definition lists for terms and their descriptions instead of general paragraphs
div containers (HTML5)
Headers, articles, and sections instead of general
audio and video elements instead of general object embeddings (HTML5)
Violating any of these rules is usually a gross error even if the web site validates.