Day 2: Text, Headings & Paragraphs

Goal

Learn how to format content properly using headings, paragraphs, line breaks, and text formatting tags.

Topics

Headings

Headings are used to structure content from the most important (<h1>) to the least important (<h6>).

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

Paragraphs

Paragraphs group text together. Use <p> for regular text.

<p>This is a paragraph about HTML.</p>

Line Breaks & Horizontal Rules

Use <br> to break lines and <hr> to separate content.


<p>First line<br>Second line</p>
<hr>

Text Formatting


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

Practice

Write a small article using:

Example

<h1>My Favorite Hobby</h1>
<h2>Why I Love Coding</h2>
<p>I enjoy <strong>coding</strong> because it allows me to create <em>useful applications</em>.</p>
<p>Every day I learn something new.<br>It is both fun and challenging.</p>
<hr>
<h2>Next Steps</h2>
<p>I plan to build a personal project soon.</p>