Lesson 2: Text and Formatting

HTML provides various tags for text structure and formatting. Use <h1> to <h6> for headings, <p> for paragraphs, <b> for bold, <i> for italic, and many more.

Headings

Define document structure with heading levels

Heading 4 Example

Heading 5 Example
Heading 6 Example

Text Formatting

Emphasize text with formatting tags

Bold text and italic text

Underlined text and strikethrough

Semantic Tags

Add meaning to your content

Important text and emphasized text

Highlighted text and code snippet

Interactive Practice

Edit the HTML code below to practice text formatting:

editor.html
Live Preview