Headings & Paragraphs
Headings
HTML has six levels of headings, <h1> through <h6>. <h1> is the most important, decreasing down to <h6>.
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
- Search engines use headings to understand your page structure
- Screen readers use headings to help users navigate
- Use only one
<h1>per page - Don't skip levels just to make text bigger/smaller — use CSS for styling instead
Paragraphs
The <p> tag defines a paragraph. Browsers automatically add space before and after each one.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
- Browsers collapse extra whitespace and line breaks in your source code automatically
- Use
<br>for a line break inside the same paragraph - Don't use empty
<p></p>tags for spacing — use CSS margins
<p>Line one.<br>Line two, same paragraph.</p>
Page Title
The <title> tag (inside <head>) sets what shows in the
browser tab, bookmarks, and search engine results — it's one of the most important tags
for SEO.
<head>
<title>HTML Basics — Start Your Path</title>
</head>
Keep titles short, specific, and unique per page — avoid generic titles like "Home" or "Page 1" across your whole site.