How To Apply Headings in HTML


The p tag is just the start of text formatting. If you have documents with genuine headings, then there are HTML tags specifically designed just for them.

They are h1, h2, h3, h4, h5 and h6; h1 being the almighty emperor of headings and h6 being the lowest pleb.

Code Snippet

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<title>My first web page</title>
<h1>My first web page</h1>
<h2>Where am I ?</h2>
<p>Coding gurus online tutorials</p>
<h2>Why am I here ?</h2>
<p>To learn basics of HTML</p>

Result of the code above:

Guys follow the various other tutorials to catch on further in html coding and designing !!!