HTML Course

Lesson 2: Text Content Basics

Headings

Headings help organize your content. HTML has six levels of headings, from <h1> (most important) to <h6> (least important).

<h1>Main Title</h1>
<h2>Subheading</h2>
<h3>Smaller Subheading</h3>

Paragraphs

Paragraphs are created with the <p> tag. They are used for blocks of text.

<p>This is a paragraph of text.</p>

Emphasis

<p>This is <strong>important</strong> text.</p>
<p>This is <em>emphasized</em> text.</p>
<p>This is <mark>highlighted</mark> text.</p>

Line Breaks and Horizontal Rules

<br> adds a line break, while <hr> creates a horizontal line.

Hello<br>World
<hr>
This text is after the line

Exercise

Create a biography page that includes:

  1. Your name in an <h1> heading.
  2. At least two paragraphs about yourself.
  3. One word in <strong>, one in <em>, and one in <mark>.
  4. A horizontal line to separate sections.