KoderSolution Logo
HomeArticlesTutorialsForumAI LabRun Code
KoderSolution Logo

The world’s most advanced technical ecosystem for modern software engineers. Learn, build, and grow with next-generation developer tools and resources.

Engineering Newsletter

Join 100,000+ engineers receiving curated high-signal content weekly.

Platforms

  • Technical Articles
  • Interactive Tutorials
  • AI Coding Lab
  • Developer Forum
  • Developer Tools

Pages

  • About Us
  • Contact Us
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Disclaimer
  • Advertisement

Popular Topics

  • PHP
  • Laravel
  • Python
  • React.Js
  • MySQL
© 2026 KoderSolutionAll Rights Reserved
Developed Bymaksudur.dev
🌐

HTML

Topic Hub & Articles

HTML HOME

3 min

HTML Introduction

5 min

HTML Editors

10 min

Recap Quiz

5 Questions

HTML Basic

10 min

HTML Elements

10 min

HTML Attributes

10 min

Recap Quiz

5 Questions

HTML Headings

10 min

HTML Styles

10 min

Recap Quiz

5 Questions

HTML Paragraphs

10 min

HTML Formatting

10 min

HTML Quotations

10 min

HTML Comments

10 min

Recap Quiz

5 Questions

HTML Colors

7 min

HTML CSS

10 min

HTML Links

10 min

Recap Quiz

5 Questions

HTML Images

10 min

HTML Favicon

10 min

HTML Page Title

10 min

Recap Quiz

5 Questions

HTML Tables

10 min

HTML Lists

10 min

HTML Block and Inline

10 min

Recap Quiz

5 Questions

HTML Classes

10 min

HTML Id

10 min

HTML Iframes

10 min

Recap Quiz

5 Questions

HTML JavaScript

10 min

HTML File Paths

10 min

HTML Head

10 min

Recap Quiz

5 Questions

HTML Layout

10 min

HTML Responsive

10 min

HTML Computercode

10 min

Recap Quiz

5 Questions

HTML Forms

10 min

HTML Form Attributes

10 min

HTML Form Elements

10 min

Recap Quiz

5 Questions

HTML Input Types

10 min

HTML Input Attributes

10 min

HTML Input Form Attributes

10 min

Recap Quiz

5 Questions

HTML Canvas

10 min

HTML SVG

10 min

HTML Media Intro

10 min

HTML Video

10 min

HTML Audio

10 min

Recap Quiz

5 Questions

HTML YouTube

10 min

HTML Geolocation

10 min

HTML Drag/Drop

10 min

HTML Local Storage

10 min

Recap Quiz

5 Questions

HTML Session Storage

10 min

HTML Web Workers

10 min

HTML SSE

10 min

Recap Quiz

5 Questions

HTML Semantics

10 min

HTML Accessibility

10 min

HTML Entities

10 min

Recap Quiz

5 Questions

HTML Symbols

10 min

HTML Emojis

10 min

HTML Charset

10 min

Recap Quiz

5 Questions

HTML URL Encode

10 min

HTML XHTML

10 min

HTML Global Attributes

10 min

Recap Quiz

5 Questions

HTML Event Attributes

10 min

HTML Color Groups

10 min

HTML URL Paths

10 min

Recap Quiz

5 Questions

HTML Summary

10 min

Progress
0%

0 / 61 Lessons

HTMLHTML Tutorial
Lesson

HTML Formatting

10 min reading
Free Course

HTML Formatting: Semantic Text Styling Tags

HTML formatting tags define the appearance and structural meaning of text on a web page. Rather than relying solely on visual styles, semantic formatting tags tell search engines, screen readers, and web browsers how text content should be interpreted.

Semantic vs. Physical Formatting

HTML distinguishes between semantic formatting (which conveys importance or emphasis) and physical formatting (which only changes text appearance).

flowchart TD
    A["Text Formatting"] --> B["Semantic Tags"]
    A --> C["Physical / Visual Tags"]
    B --> B1["strong: Important text (bold)"]
    B --> B2["em: Emphasized text (italic)"]
    B --> B3["mark: Highlighted text"]
    C --> C1["b: Bold for visual offset"]
    C --> C2["i: Italic for alternate voice/technical term"]

Essential Formatting Elements

Here are the standard HTML formatting tags used in web development:

  1. <strong>: Indicates high importance, seriousness, or urgency. Rendered as bold by default.
  2. <b>: Offsets text visually without implying extra importance or emphasis (e.g., key words in a product summary).
  3. <em>: Adds stress emphasis that changes the vocal accent or meaning of a sentence. Rendered as italic by default.
  4. <i>: Offsets text for an alternate voice, technical terms, idiomatic phrases, or taxonomic designations.
  5. <mark>: Highlights text relevant to a specific context (like search term results).
  6. <small>: Represents side comments, legal disclaimers, or copyright fine print.
  7. <del>: Shows deleted text with a strikethrough (useful for price drops or edit history).
  8. <ins>: Shows inserted text with an underline (pairs with <del> to indicate updates).
  9. <sub>: Formats text as subscript (H2O), lowering it slightly below the baseline.
  10. <sup>: Formats text as superscript (E = mc2), raising it above the baseline.

Practical Code Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HTML Formatting Example</title>
</head>
<body>

    <h2>Product Discount Announcement</h2>

    <!-- Price discount using del and ins -->
    <p>Special deal: Original price <del>$99.99</del> is now <ins>$49.99</ins>!</p>

    <!-- Important warning using strong -->
    <p><strong>Warning:</strong> Offer expires at midnight UTC.</p>

    <!-- Contextual highlight using mark -->
    <p>Search match: Learning <mark>HTML5 formatting</mark> improves content accessibility.</p>

    <!-- Scientific notation using sub and sup -->
    <p>Chemical formula for water: H<sub>2</sub>O</p>
    <p>Mathematical exponent: 2<sup>10</sup> = 1024</p>

    <!-- Fine print using small -->
    <p><small>&copy; 2026 KoderSolution. All rights reserved. Terms and conditions apply.</small></p>

</body>
</html>

Best Practices

  • Prefer <strong> and <em> over <b> and <i>: Screen readers use audio emphasis for <strong> and <em> elements. Using <b> or <i> only changes visual appearance without aiding assistive technology users.
  • Do not use <small> for main body text sizing: Use CSS font-size properties to adjust paragraph size across your application layout instead of nesting paragraphs inside <small> tags.
  • Always combine <del> and <ins> with datetime attributes: When documenting changes or audit logs in web applications, add datetime="2026-08-12" to <del> and <ins> tags to provide semantic timestamp metadata.

Self-Check Challenge

Create an HTML snippet that displays an original retail price struck through (<del>), a discounted price highlighted (<ins> + <mark>), and a footnote disclaimer at the bottom using the <small> tag!

Save Your Progress

Unlock Your
Full Potential.

Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.

Quick Access With

Enterprise-Grade Security Protocol

Recommended Courses & Books

Try it Yourself

Experiment with the code from this lesson in our interactive playground.

Open Playground

Stuck on this lesson?

Join our community of senior developers.

Ask in Forum