Semantic and presentational HTML
The approach we are taking in this chapter and in the first part of the book overall is to only use HTML elements and attributes that are covered by all three standards. In practice, this means we will not use any HTML4 attributes that disappeared in HTML5 and will not use any HTML5 elements or attributes that did not exist in HTML4.
On the other hand, we do not want to discourage the use of new things, so we will list HTML5-specific elements in a separate list. We will also use the new elements in the second section of the book where we introduce a cool CSS/JavaScript framework.
One could easily divide HTML elements into two groups. The first group consists of elements that refer to parts of a document: headers, paragraphs, tables, forms, lists, and so on. ( <h1>
, <h2>
, <p>
, <table>
, <ul>
). We call this semantic HTML as they refer to the names of things; they describe what they are.
Another group contains the elements used to indicate...