35 Enriching Web Pages Adding Headings
35 Enriching Web Pages Adding Headings
• Adding headings
• Listing 2-12: Using headings at all levels
Although you can create compound text documents with HTML text
formatting tags, the experience your users got would be really poor and
sullen.
To set your web pages to show signals of life, you need to get acquainted with
a few more HTML tags. Adding more structure and formatting to your texts
transforms your page into a more realistic document. Adding images and
links to other pages opens a new world for the viewers of your page.
Adding headings #
In Chapter 2: A Short Tour of HTML, CSS, and JavaScript you have already met
with the <h1> and <h2> tags that represent first and second level headings,
respectively.
These headings give a structure to your document, namely second level
headings with their related content are logically nested to their parent (first
level) heading. HTML allows you to use six levels of headings with the <h1> ,
<h2> , <h3> , <h4> , <h5> , and <h6> tags.
Listing 2-12 demonstrates using them; the page rendered from this markup is
shown in the image given below: