Home › HTML Tutorial › Headings and paragraphs
Headings and paragraphs
Headings outline the page; paragraphs hold the text.
Use h1 for the main title and h2 to h6 for sub-sections. Use one h1 per page.
Commands in this lesson
h1
Definition: Defines the main heading of the page. Use one per page.
Syntax:
<h1>Heading text</h1>
Example:
<h1>Welcome</h1>Example code
<h1>Main title</h1>
<h2>Section</h2>
<h3>Sub-section</h3>
<p>A paragraph of text.</p>
<p>Use <strong>strong</strong> for importance and <em>em</em> for emphasis.</p>