HTML Typography Tutorial: Bold, Italic & Text Styling

Hey friend! ๐Ÿ‘‹

Welcome back to our HTML Basics for Beginners series.

In the last tutorial, you learned how to:

  • Create an HTML file
  • Use headings and paragraphs
  • Build your first webpage ๐ŸŽ‰

Nice job! Seriously.

But letโ€™s be honest for a second ๐Ÿ˜„
Your page probably looked likeโ€ฆ just text.
No structure. No flow. No โ€œahh, this is easy to readโ€ feeling.

Today, we fix that.

This is Part 1 of our Typography series, where you’ll learn the fundamentals of HTML text formatting.

Letโ€™s go ๐Ÿš€

What You’ll Learn Today

By the end of this HTML Typography tutorial, you’ll know how to:

โœ… Make text bold and italic the right way
โœ… Combine bold and italic formatting
โœ… Underline, highlight, and resize text
โœ… Show deleted and updated text
โœ… Add line breaks and section dividers
โœ… Build a mini project using all these skills

Letโ€™s make your text feel like a real website ๐Ÿš€

Before You Start the HTML Typography tutorial

Time to Complete: 15-20 minutes
Difficulty: Beginner-friendly โญ

Ready? Let’s make your text look professional! ๐Ÿš€

What Is Typography?

Typography means how text looks and feels.

Think about this:

  • A WhatsApp message
  • A newspaper
  • A blog post
  • A school textbook

Same language. Same letters.
But very different reading experiences, right?

That difference is typography.

Good typography:

  • Helps readers understand faster ๐Ÿง 
  • Feels clean and friendly
  • Keeps people on your page

Bad typography:

  • Looks like a big wall of text ๐Ÿ˜ต
  • Makes people leave fast

In HTML, typography helps you avoid “big wall of text” nightmares and makes your content actually enjoyable to read.

Quick Reminder: Headings & Paragraphs

You already know:

  • Headings (<h1>, <h2>, <h3>)
  • Paragraphs (<p>)

Weโ€™re not learning them again.

Today, weโ€™re learning how to use them properly together so your text feels natural and readable.

Bad Text vs Good Text (Very Important)

โŒ Bad Example (Donโ€™t Do This)

Why this is bad:

  • One huge paragraph
  • No breaks
  • Hard to read
  • Overwhelming

โœ… Good Example (Much Better!)

Same content.
Much better reading experience.

๐Ÿ‘‰ Golden Rule: One idea = one paragraph.

Step 1: Bold Text โ€” <b> vs <strong>

There are two ways to make text bold in HTML, and they’re not the same!

Just looks Bold: <b>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Use <b> when:

  • You want text to look bold visually
  • Thereโ€™s no special meaning behind it
  • You’re styling keywords or product names

Bold AND Important: <strong>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Use <strong> when:

  • The text is actually important
  • You want screen readers & browsers to treat it seriously
  • The meaning matters, not just the style

๐Ÿ’ก Quick Tip:

  • <b> = style only (looks bold)
  • <strong> = meaning (important information)

When in doubt? Use <strong> โ€” it’s better for accessibility.

Practice Challenge ๐ŸŽฏ

Write a paragraph about your favorite hobby and use <strong> to highlight the most important point.

Italic Text: <i> vs <em>

Just like bold, there are two ways to make text italic.

Just italic: <i>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Use <i> for:

  • Names
  • Book titles
  • Thoughts
  • Technical terms
  • Foreign words

Emphasis: <em>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Use <em> when:

  • You want to stress something
  • The sentence meaning changes with emphasis
  • You’re adding vocal emphasis

๐Ÿ’ก Quick Tip:

  • <i> = visual style (titles, names)
  • <em> = emphasis (stress, importance)

Example: See the Difference

Practice Challenge ๐ŸŽฏ

Write three sentences: one with a book title, one with emphasis, and one with a movie name.

Step 3: Combining Bold and Italic

You can nest tags to combine formatting!

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” Bold & Italic by Codeboid (@Codeboid) on CodePen.

Result: Text that’s both bold AND italic.

โš ๏ธ Important Rule:

Always close tags in the correct order (like parentheses in math).

โŒ Wrong:

โœ… Correct:

Think of it like opening and closing boxes โ€” the last one you opened must be the first one you close.

Step 4: Underline, Highlight & Small Text

Underline: <u>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

โš ๏ธ Donโ€™t overuse underline. Underlined text often looks like a link, which can confuse readers.

Good use cases:

  • Highlighting text in documents
  • Showing corrections
  • Special formatting in educational content

Highlight Text: <mark>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Looks like a highlighter ๐Ÿ–๏ธ

Great for:

  • Search results (highlighting keywords)
  • Important notes in tutorials
  • Drawing attention to key information

Small Text: <small>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Used for:

  • Side notes
  • Legal text and disclaimers
  • Copyright notices
  • Footnotes

Practice Challenge ๐ŸŽฏ

Create a product description with a highlighted feature and a small print disclaimer.

Step 5: Deleted & Inserted Text (Showing Changes)

Sometimes, you donโ€™t want to remove text completely.
Instead, you want to show that something was changed, updated, or corrected.

Deleted Text: <del>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

What it does:

  • Shows text with a line through it
  • Visually means: โ€œThis is no longer validโ€

When to use <del>:

  • Old prices
  • Removed information
  • Content that is no longer correct

๐Ÿ’ก Think of <del> as saying:

โ€œThis was here before, but itโ€™s not correct anymore.โ€

Inserted Text: <ins>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

What it does:

  • Shows new or added text
  • Usually appears underlined by default

When to use <ins>:

  • Updated information
  • New content added after a change
  • Corrections or improvements

๐Ÿ’ก Think of <ins> as saying:

โ€œThis is the updated version.โ€

Using <del> + <ins> Together (Very Common)

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” + by Codeboid (@Codeboid) on CodePen.

This clearly tells the reader:

  • What changed
  • What is correct now

Very useful for:

  • Product pages (price changes)
  • Blog updates
  • Change logs and revision history

Strikethrough Text: <s>

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Difference between <s> and <del>:

  • <s> โ†’ visual only (just looks crossed out)
  • <del> โ†’ semantic meaning (content was officially removed/replaced)

๐Ÿ’ก Simple rule:

  • <del> = meaningful change
  • <s> = just showing something is no longer valid

Practice Challenge ๐ŸŽฏ

Create a sale announcement showing the old price crossed out and the new price highlighted.

Step 6: Line Breaks & Section Dividers

Now let’s learn how to control spacing and create visual breaks in your content.

Line Break: <br>

Use <br> when you want a new line within the same paragraph.

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

Think of <br> as Shift + Enter.

When to use <br>:

โœ… Poetry or song lyrics
โœ… Addresses
โœ… Short lines that belong together

When NOT to use <br>:

โŒ Creating space between paragraphs (use <p> tags instead)
โŒ For layout or design (that’s CSS’s job)
โŒ Multiple <br><br><br> for spacing (bad practice!)

Example: Address

Horizontal Line: <hr>

Want to separate sections visually?

Use <hr>:

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” by Codeboid (@Codeboid) on CodePen.

This adds a horizontal line (divider).

Great for:

  • New topics
  • Blog sections
  • Visual breaks between content
  • Separating different parts of a page

Simple, but very powerful.

Practice Challenge ๐ŸŽฏ

Write a short poem using <br> for line breaks, then add an <hr> and write a second verse.

Step 7: Mini Project โ€” Product Sale Page

Okay, enough talking.
Let’s combine everything you’ve learned!

Create a file called sale-page.html and write this:

See the Pen Codeboid โ€“ HTML Tutorial #2 โ€” Mini Project by Codeboid (@Codeboid) on CodePen.

Your Turn! ๐ŸŽฏ

Customize this page:

  1. Change the product to something you’d sell
  2. Add your own features using <b> and <br>
  3. Create a different sale price
  4. Add your own address
  5. Experiment with <mark>, <strong>, and <em>

๐Ÿ‘‰ Open it in your browser.
If you understand what each part does โ€” you’ve nailed typography! ๐Ÿ‘

Typography Cheat Sheet (Part 1)

Quick reference for tags you learned today:

Quick Recap: What You Learned Today

โœ… The difference between <b> and <strong>
โœ… The difference between <i> and <em>
โœ… How to combine bold and italic
โœ… How to highlight text with <mark>
โœ… How to show changes with <del> and <ins>
โœ… How to add line breaks and dividers
โœ… Built a complete sale page project

Great job! ๐ŸŽ‰

Common Beginner Mistakes (Totally Normal)

โŒ Making everything bold (kills impact)
โŒ Using <br> instead of <p> for paragraphs
โŒ Underlining non-links (confuses readers)
โŒ Closing tags in the wrong order

If youโ€™ve done any of these โ€” congrats ๐ŸŽ‰
That means youโ€™re learning.

Thatโ€™s a big upgrade from plain text.

What’s Next?

Coming Up in Part 2:

  • Quotes and citations
  • Displaying code properly
  • Special characters (ยฉ, ยฎ, โ‚ฌ, etc.)
  • Subscript and superscript
  • Mini project: Book review page

๐Ÿ‘‰ Continue to Part 2 โ†’

Practice Challenge ๐Ÿ’ช

Before moving to Part 2, create a page about your favorite movie that includes:

  1. Movie title in italic
  2. Your rating with bold text
  3. A highlighted quote
  4. Old vs new release date (using <del> and <ins>)
  5. Theater address with line breaks
  6. Horizontal lines between sections

Get the Source Code

Final Thoughts on Text Formatting

You just learned the foundations of text formatting! These simple tags are used on every professional website.

Practice by creating different pages: sale announcements, event invitations, product descriptions.

Keep going โ€” you’re building real skills! ๐Ÿ’ช

See you in Part 2! ๐ŸŒฑ

Scroll to Top