Empowering Today’s Learners to Become Tomorrow’s Leaders
So far, your Web page contains a few lines of content but it doesn't have a heading.
There are six different headings you can use. Table 6.4 shows the six different header levels, from largest to smallest. The header level will determine how the content of your heading is displayed.
Headings, like paragraphs are also block-level elements; they contain content.
Therefore Headings must have a opening and closing tag.
Headers for HTML Documents :
After the opening body tag <body> type an opening header tag <h1> type Welcome to My Web Page! type a closing header tag </h1>
<h1>Welcome to My Web Page!</h1>
2. Save and preview in the browser
Great, now we are getting somewhere.
Let's explore all the possible headings in a new file called headings.html.
Open a new file in Notepad: select File > New
Add the following HTML. (or copy and paste)
<!doctype html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</html>
3. Title the web page Headings
4. Inside the body element, add the following:
<h1>This is a h1 title.</h1>
<h2>This is a h2 title.</h2>
<h3>This is a h3 title.</h3>
<h4>This is a h4 title.</h4>
<h5>This is a h5 title.</h5>
<h6>This is a h6 title.</h6>
5. Save as headings.html in your procedures folder
6. Preview in the browser