Enterprise Verified
Academy Frontend Web Development HTML HTML Text Formatting
Advertisement
Google AdSense Slot (LEADERBOARD)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php
Text Styles 6 min read • Chapter 10 of 32

HTML Text Formatting

HTML contains several elements for defining text with a special meaning: <b>, <strong>, <i>, <em>, <mark>, <small>, <del>, <ins>, <sub>, <sup>.

Formatting elements were designed to display special types of text without requiring complex CSS stylesheets.

Example

<!DOCTYPE html>
<html>
<body style="font-family:sans-serif;padding:20px;">
    <p>This text is <b>bold</b> and <strong>important</strong>.</p>
    <p>This text is <i>italic</i> and <em>emphasized</em>.</p>
    <p>Do not forget to buy <mark>milk</mark> today.</p>
    <p>My favorite color is <del>blue</del> <ins>emerald green</ins>.</p>
    <p>Chemical formula: H<sub>2</sub>O | Math: E = mc<sup>2</sup></p>
</body>
</html>
Try it Yourself >> Opens live sandboxed code editor
Advertisement
Google AdSense Slot (IN-ARTICLE)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php

Community Q&A & Discussion

No questions yet. Be the first to start the discussion!
Enterprise Operations Suite

Streamline Employee Payroll & Attendance Operations

Eliminate manual spreadsheet errors. Integrate automated attendance tracking, EPF/ESI statutory calculations, and custom GST invoices.

Copied!

AI Learning Assistant

Ready to explain & guide

Hello! I am your MBS Digital AI Tutor. Ask me to explain concepts, review code, or suggest debugging steps.

Quick Starters:
AI Tutor is thinking...