Chapter 5. Layout

Well-formedness and validity check basic syntactic constraints. The next step is to make sure the semantics are appropriate. Each element should be used for its intended purpose: ul for unordered lists, ol for numbered lists, table for tabular data, blockquote for quotations, h1h6 for headings, and so forth. Using the proper semantics for each element renders pages more intelligible to screen readers, and makes sure they can be displayed properly on different platforms. As you’ll see, proper semantics have a number of other beneficial characteristics as well.

Many good semantic elements, such as ul, blockquote, and table, have been abused to achieve particular layout effects. The goal of this abuse is to produce a very particular ...

Get Refactoring HTML: Improving the Design of Existing Web Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.