HTML Headings & Paragraphs

HTML Headings

HTML headings are defined with the <h1> to <h6> tags. <h1> indicating the most important and <h6> indicating the least important.

<h1>This is the most important heading</h1>
<h2>This is the second most important heading</h2>
<h3>This is the third most important heading</h3>

Headings are important for your web page, but use HTML headings for heading only! Don’t use the headings tag to make text BIG or bold. Search engines use your headings to index the content of your web pages. Users also usually skim pages by its headings, so it’s important to use headings for page structure and nothing else.

The <h1> heading should be used as your main heading, followed by <h2> headings, then less important <h3> headings, and so on.

HTML Lines

The <hr> tag creates a horizontal line for your HTML page. This line can be used to separate content on your page.

<p>This is a paragraph</p>
<hr>
<p>This is a new paragraph</p>
<hr>
<p>This is a third paragraph</p>

HTML Paragraphs

HTML paragraphs are defined with the <p> to begin and the </p> tag to end.

<p>This is the first paragraph</p>
<p>This is a second paragraph</p>

HTML Line Breaks

The <br> tag creates a line break (a new line) without starting a new paragraph.

<p>This is<br>a paragraph<br>break</p>

Useful Tips

With HTML, you can’t change the output by adding extra lines or spaces in your HTML code. The browser will remove extra lines and spaces when the page is displayed. Any number of spaces count as one space, and any number of lines count as one line.