0% found this document useful (0 votes)
8 views3 pages

35 Enriching Web Pages Adding Headings

This lesson focuses on adding headings to web pages using HTML tags, specifically <h1> to <h6>. Headings provide structure and improve user experience by organizing content logically. The document also includes a code example demonstrating the use of headings at all levels.

Uploaded by

prhegde24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

35 Enriching Web Pages Adding Headings

This lesson focuses on adding headings to web pages using HTML tags, specifically <h1> to <h6>. Headings provide structure and improve user experience by organizing content logically. The document also includes a code example demonstrating the use of headings at all levels.

Uploaded by

prhegde24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Enriching Web Pages: Adding Headings

In this lesson, we add headings and learn more about them!


Let's head right into it!

WE'LL COVER THE FOLLOWING

• Adding headings
• Listing 2-12: Using headings at all levels

It's All in The Headings

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:

Listing 2-12: Using headings at all levels #


<!DOCTYPE html>
<html>
<head>
<title>Using headings</title>
</head>
<body>
<h1>First Level Heading</h1>
<p>This text follows H1</p>
<h2>Second Level Heading</h2>
<p>This text follows H2</p>
<h3>Third Level Heading</h3>
<p>This text follows H3</p>
<h4>Fourth Level Heading</h4>
<p>This text follows H4</p>
<h5>Fifth Level Heading</h5>
<p>This text follows H5</p>
<h6>Sixth Level heading</h6>
<p>This text follows H6</p>
</body>
</html>
HTML headings

In the next lesson, we’ll learn about HTML lists.

See you there!

You might also like