HTML headings are used to define the headings of the section or title of the webpage, and headings ranges from ‘<h1>’ to ‘<h6>’. ‘<h1>’ is the largest and most important heading, and ‘<h6>’ is the smallest and least important heading.
<!-- HTML Headings -->
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>This is a Heading 1</h1>
<p>This is a paragraph of text.</p>
<h2>This is a Heading 2</h2>
<p>This is another paragraph of text.</p>
<h3>This is a Heading 3</h3>
<p>Here is yet another paragraph of text.</p>
<h4>This is a Heading 4</h4>
<p>This is a fourth paragraph of text.</p>
<h5>This is a Heading 5</h5>
<p>This is a fifth paragraph of text.</p>
<h6>This is a Heading 6</h6>
<p>This is a sixth and final paragraph of text.</p>
</body>
</html>
In above the example, we have used all six levels of headings in one example ('<h1>' to ‘<h6>’) to demonstrate that how all headings appear on a webpage. We have also include a few paragraphs of text underneath each heading. You can see that the headings get progressively smaller as we move from ‘<h1>’ to ‘<h6>’.
When you view this code in a web browser, it will display each heading in a different size on the webpages and different boldness on the web browsers, with ‘<h1>’ being the largest and most prominent heading and ‘<h6>’ being the smallest and least prominent heading. Learn More Do More!.
Comments
Oops!