Day 3 HTML Tutorial with Text Formatting

πŸ“ 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:

html
<h1>Main Title</h1>
<h2>Sub Title</h2>
<h3>Section Heading</h3>
<h4>Sub Section</h4>
<h5>Minor Heading</h5>
<h6>Smallest Heading</h6>

πŸ” 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:

html
<h1>About Us</h1>
<p>We are a creative tech company focused on education and design.</p>
<h2>Our Vision</h2>
<p>To innovate and simplify tech learning for everyone.</p>

πŸ“˜ 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.

html
<p>This is a paragraph. HTML makes it easy to organize text on your webpage.</p>

πŸŽ“ 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:

html
<p>This is <b>bold</b>, <i>italic</i>, and <u>underlined</u> text.</p>
<p>Line One<br>Line Two</p>

🧠 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


βœ… 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.

Leave a Reply

Your email address will not be published. Required fields are marked *