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
<strong>
makes text bold and indicates importance.<em>
italicizes text for emphasis.<mark>
highlights text.
<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:
- Your name in an
<h1>
heading. - At least two paragraphs about yourself.
- One word in
<strong>
, one in<em>
, and one in<mark>
. - A horizontal line to separate sections.