HTML Headings

HTML Headings:

Headings are the Titles or subtitles that you want to display of a webpage.

Structure:

HTML offers six levels of headings, from <h1> (the most important) to <h6> (the least important).

Example:

 

<h1>Heading1</h1>

  <h2>Heading2</h2>

  <h3>Heading3</h3>

  <h4>Heading4</h4>

  <h5>Heading5</h5>

  <h6>Heading6</h6>

 

 

Output:

 

 

 

Example 2:

 

<h1>My Favorite Book</h1>

 

<p>I’m excited to share my thoughts on my all-time favorite book!</p>

 

<h2>Book Title: <em>The Book Thief</em></h2>

 

<h3>Author: Markus Zusak</h3>

 

<h3>Genre: Historical Fiction</h3>

 

<h2>Why It’s My Favorite</h2>

<p>This book captivated me from the very first page with its…</p>

 

 

Output:

 

 

 

 

Join Our Newsletter