The p tag is for ‘paragraph‘.
HTML provides only one level of paragraph but you can alter the size of the text inside the paragraph.
Inside the <p> tag you can give many number of attributes.
For example,
<p>This is my first website</p>
<p>ProgrammingTute</p>
Output:
This is my first website
ProgrammingTute
Look at the results of this. The two lines will now appear on two lines.
Instead of this you can use <br> tag. The HTML content should be seen just like a book with paragraphs where appropriate.
HTML has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. You use different sizes for your headings. While displaying any heading, browser adds one line before and after that heading.
For example:
<h1>ProgrammingTute 1</h1>
<h2>ProgrammingTute 2</h2>
<h3>ProgrammingTute 3</h3>
<h4>ProgrammingTute 4</h4>
<h5>ProgrammingTute 5</h5>
<h6>ProgrammingTute 6</h6>
Output:
PROGRAMMINGTUTE 1
PROGRAMMINGTUTE 2
PROGRAMMINGTUTE 3
PROGRAMMINGTUTE 4
PROGRAMMINGTUTE 5
PROGRAMMINGTUTE 6
Important note is that <h1>tag should be used only once in a document, however it is supposed to be the main heading of the page and shouldn’t be used multiple times.
But the tags <h2> to </h6> can be used often.
But remember they should always be used in order, as prescribed.