π HTML Headings and Paragraphs β Day 3 HTML Tutorial with Text Formatting
π₯ Download Notes + Example Code (PDF)
π Click here to download Day 3 Notes
π Introduction
If you want to build structured, readable, and SEO-friendly websites, learning how to use HTML Headings and Paragraphs is essential. In this Day 3 HTML tutorial, weβll also explore text formatting tags like <b>
, <i>
, <u>
, and <br>
which help in enhancing your websiteβs appearance, readability, and accessibility.
By the end of this lesson, you’ll understand:
-
How to use heading tags from
<h1>
to<h6>
-
How to structure content using the
<p>
tag -
When to apply inline formatting tags like bold, italic, and underline
-
Best practices for line breaks and text structure
π§± 1. HTML Headings β <h1>
to <h6>
Headings in HTML are used to structure and organize your web page content. There are six levels of headings:
π SEO Tip:
β
Use only one <h1>
tag per page, usually for the main title.
β
Use <h2>
to <h6>
for subheadings in a hierarchical structure. This helps search engines understand your content layout.
π Real-World Example:
π Want to dive deeper?
Check out HTML Headings β MDN Web Docs
βοΈ 2. HTML Paragraph Tag β <p>
The <p>
tag defines paragraphs of text and automatically includes some spacing above and below.
π Pro Tips for Paragraphs:
-
β Break up long content into short, easy-to-read paragraphs
-
β Use multiple
<p>
tags instead of<br>
for separating sections -
β Keep each paragraph 2β3 sentences long
β¨ 3. Text Formatting Tags in HTML
Text formatting tags are inline HTML elements that style your content without breaking the flow of text.
Tag | Purpose | Example |
---|---|---|
<b> |
Bold Text | <b>Important</b> |
<i> |
Italic Text | <i>Note</i> |
<u> |
Underlined Text | <u>Highlight</u> |
<br> |
Line Break | Line One<br>Line Two |
Example:
π§ Note: <br>
creates a line break but should be used sparingly.
π οΈ Best Practices for HTML Headings and Paragraphs
β
Use headings logically to divide content into sections
β
Use one <h1>
tag per page for the main topic
β
Keep paragraphs short and informative
β
Use formatting tags only to emphasize important text
β
Always close tags properly for clean, error-free HTML
β
Avoid overusing <br>
; use <p>
and <div>
for structure instead
πΌοΈ Example Image β HTML Semantic Layout
Image Source: W3Schools
π Related Topics
-
π Read more on HTML Paragraphs β W3Schools
β Summary β Why HTML Headings and Paragraphs Matter
Using HTML Headings and Paragraphs the right way ensures your content is clean, readable, and optimized for search engines. Whether you’re designing a blog, landing page, or portfolio, proper HTML structure lays the foundation for good SEO and user experience.