HTML and CSS Reference
In-Depth Information
Listing 3-13. Defining Headers in HTML5 Using Hgroup
<hgroup>
<h1>My Header</h1>
<h2>My Subheader</h2>
</hgroup>
Listing 3-14. Defining a Group of Headers in HTML4
<div class="header-grouping">
<h1>My Header</h1>
<h2>My Subheader</h2>
</div>
<mark />
The <mark /> element can be used to highlight text within a document. Listing
3-15 shows how this can be used in HTML5, and Listing 3-16 shows how this
would have been achieved in HTML4 using a combination of CSS and HTML.
Listing 3-15. Using the Mark Tag in HTML5
<p>This is an <mark>important</mark> reminder for Inga Lyon</p>
Listing 3-16. Highlighting Text in HTML4
<p>This is an <em class="highlight">important</em> reminger for Inga Lyon</p>
<style type="text/css">
em.highlight {
background: yellow;
}
</style>
<nav />
The <nav /> element can be used to define navigation links within a page. The
<nav /> element should only be used to define major navigation elements within
 
Search WWH ::




Custom Search