🎨 HTML Text Formatting Tags

🎨 HTML Text Formatting Tags

The Key to Adding Style to Web Pages (But We’re Not Mad at CSS)

Imagine a web page…
The code is clean, everything works — but the text feels soulless.
That’s where HTML text formatting tags step onto the stage and say:

“I’m not just text — I have meaning.”

In this article, you’ll find:

  • Clear answers to “What does this tag do?”
  • Real-world examples of “Where would I actually use this?”
  • Warnings like “Don’t do this — you’ll regret it later”

🅱️ <b> vs <strong>

The Bold Text Battle: Appearance or Meaning?

We start with two tags that look the same at first glance but work very differently behind the scenes.


🔹 <b> – Visual Power Only

&lt;p>This product is &lt;b>very durable&lt;/b>.&lt;/p>

  • Makes text bold visually
  • Has no semantic meaning
  • Used purely to catch the eye

📌 Ideal for menu labels, UI text, or content that needs attention but isn’t critical.


🔹 <strong> – “Pay Attention!” Tag

&lt;p>&lt;strong>This action cannot be undone.&lt;/strong>&lt;/p>

  • Bold plus meaning
  • Screen readers emphasize it
  • More valuable for SEO

🧠 Practical tip:
Warnings, important info, critical messages → strong


<i> vs <em>

Italic Text, But With Philosophy


🔹 <i> – Style Without Emotion

&lt;p>This word is &lt;i>Latin&lt;/i>.&lt;/p>

  • Visual italics only
  • Foreign words
  • Book and movie titles

📖 Commonly used in academic and content-focused websites.


🔹 <em> – Emotional Emphasis

&lt;p>We &lt;em>really&lt;/em> need to finish this.&lt;/p>

  • Adds semantic emphasis
  • Screen readers change tone
  • Brings emotion into the sentence

🎭 You could call it HTML’s drama queen.


✏️ <u> – Underlined, But Be Careful

&lt;p>This word is &lt;u>especially&lt;/u> emphasized.&lt;/p>

⚠️ Danger zone:
Underlined text is often mistaken for a link.

👉 Recommendation:

  • Avoid unless absolutely necessary
  • Prefer other emphasis styles via CSS

🖍️ <mark> – The Highlighter Effect

&lt;p>This information &lt;mark>will be on the exam&lt;/mark>.&lt;/p>

  • Adds a yellow background
  • Instantly grabs attention

📌 Common use cases:

  • Highlighted search results
  • Important notes
  • Educational content

🎓 The HTML way of saying: “Look here!”


🔍 <small> – Small Text, Big Purpose

&lt;p>Membership fee: 99₺ &lt;small>(monthly)&lt;/small>&lt;/p>

  • Supplementary information
  • Footnotes
  • Footer text

🧠 Tip:
Small ≠ unimportant
It means secondary information.


<del> and ✅ <ins>

Delete the Past, Insert the New

&lt;p>
  &lt;del>Old version&lt;/del>
  &lt;ins>New version&lt;/ins>
&lt;/p>

  • <del> → Deleted content
  • <ins> → Inserted content

🛒 Perfect for e-commerce, changelogs, and update notes.

💡 When styled with CSS, the effect doubles.


🧪 <sub> and <sup>

Science, Math, and Tiny Symbols

&lt;p>CO&lt;sub>2&lt;/sub> gas&lt;/p>
&lt;p>2&lt;sup>3&lt;/sup> = 8&lt;/p>

  • <sub> → Subscript
  • <sup> → Superscript

📐 Mathematical formulas
🧬 Chemical equations
📊 Statistical explanations


🧱 Real-World Scenario (Mini Project)

&lt;article>
  &lt;h2>&lt;strong>HTML Text Formatting&lt;/strong>&lt;/h2>

  &lt;p>
    This lesson is &lt;em>especially&lt;/em>
    for &lt;mark>beginners&lt;/mark>.
    &lt;small>(Don’t miss it)&lt;/small>
  &lt;/p>

  &lt;p>
    &lt;del>Memorize&lt;/del>
    &lt;ins>Understand&lt;/ins>
  &lt;/p>
&lt;/article>

🎉 This code is:

  • Meaningful
  • Readable
  • SEO-friendly

🚫 Most Common Mistakes

❌ Making everything bold with <b>
❌ Using visual tags when meaning matters
❌ Highlighting every sentence with <mark>
❌ Trying to style everything with HTML and ignoring CSS


🧠 Golden Rules (Save This)

  • HTML → What does it mean?
  • CSS → How does it look?
  • Meaning needed → semantic tags
  • Visual flair needed → styling tags

🎯 Short but Clear Summary

PurposeTag
Importancestrong
Emphasisem
Visual boldb
Italic texti
Attentionmark
Footnotesmall
Updatedel, ins

Comments

No comments yet. Why don’t you start the discussion?

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir