You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Text is the most fundamental type of content on the web. HTML provides a rich set of elements for structuring and formatting text — from headings and paragraphs to emphasis, quotations, and code snippets. Choosing the right element is not just about appearance; it conveys meaning to browsers, screen readers, and search engines.
HTML provides six levels of headings, from <h1> (most important) to <h6> (least important):
<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Sub-subheading</h3>
<h4>Fourth Level</h4>
<h5>Fifth Level</h5>
<h6>Sixth Level</h6>
| Rule | Reason |
|---|---|
Use only one <h1> per page | It represents the main topic — important for SEO and accessibility |
| Do not skip levels | Go from <h1> to <h2> to <h3>, not <h1> to <h3> |
| Use headings for structure, not size | Use CSS to change size; use headings for meaning |
The <p> element represents a paragraph of text:
<p>This is a paragraph. It is the most common element for body text on the web.</p>
<p>Each paragraph creates a block of text with space above and below it by default.</p>
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.