HOW TO CREATE HEADER IN HTML

HEADER

The p-tag is just the beginning of the text format.

If you have documents with genuine headers, there are HTML tags designed specifically for them.
They are h1, h2, h3, h4, h5 and h6, h1 being the almighty emperor of the titles and h6 being the plebe lower.

Change your code to the following:

 <! DOCTYPE html>
 <Html>
 <Head>
<Title> My first webpage </ title>
</ Head>
 <Body>
<H1> My first web page </ h1>
 <H2> What is this </ h2>
<P> A simple page formed using HTML </ p>
 <H2> Why this is </ h2>
<P> To learn HTML </ p>
</ Body>
 </ Html>  

  • Note that the h1 tag is only used once, as the main header of the page. H 2 to h 6, however, may be used as many times as desired, but should always be used in order, as intended. For example, an h4 must be a subtitle of a h3, which must be a subtitle of an h2.