Text Lesson 8 of 42
HTML Text Formatting — Bold, Italic, Highlight and More
Format text in HTML with strong, em, b, i, mark, small, del, ins, sub and sup. Learn the difference between strong and b, and em and i.
Sometimes a word needs to stand out: a deadline, a warning, a scientific name, a chemical formula. HTML has small inline elements for each of these jobs. In this lesson you'll learn what they are and, just as important, when each one is the right choice.
The formatting elements at a glance
| Element | Meaning | Default look |
|---|---|---|
<strong> | Very important | bold |
<b> | Draw attention, no extra importance | bold |
<em> | Stress / emphasis (changes the meaning) | italic |
<i> | Different voice: foreign words, names of ships, thoughts | italic |
<mark> | Highlighted / relevant | highlight |
<small> | Side comments, fine print | smaller text |
<del> | Deleted text | |
<ins> | Inserted text | underline |
<sub> | Subscript | H2O |
<sup> | Superscript | x2 |
strong vs. b
Both look bold, but they mean different things:
<strong>says "this is important." Screen readers may say it with more stress. Use it for warnings, deadlines, key facts.<b>just makes text stand out without adding importance — like product names in a review or keywords in a summary.
<p><strong>Deadline: Friday, 5:00 PM. Late projects will not be accepted.</strong></p>
<p>Today we tasted <b>Ube Halaya</b>, <b>Leche Flan</b> and <b>Buko Pandan</b>.</p>
em vs. i
<em> is emphasis — the kind of stress that changes the meaning of a sentence when you say it aloud. Compare these:
<p><em>I</em> didn't eat your baon.</p>
<p>I didn't eat <em>your</em> baon.</p>
<p>I didn't <em>eat</em> your baon.</p>
Each sentence means something different! The first says "someone else ate it." The second says "I ate someone else's baon." The third suggests "I only took it."
<i> is for text in an alternate voice: words from another language, scientific names, or a character's thoughts.
<p>The Philippine eagle (<i>Pithecophaga jefferyi</i>) is our national bird.</p>
<p>In English we say "thank you"; in Kapampangan, <i>dakal a salamat</i>.</p>
mark — highlighting
<mark> is like using a highlighter pen on your notes. It shows the part that is relevant right now, like a search term or the key point of a passage.
<p>Photosynthesis happens in the <mark>chloroplasts</mark> of plant cells.</p>
del and ins — showing changes
Use <del> for text that was removed and <ins> for text that was added. Online shops use them for sale prices, and teachers use them to show corrections.
<p>Ice candy: <del>₱10</del> <ins>₱8</ins> today only!</p>
<p>The capital of the Philippines is <del>Quezon City</del> <ins>Manila</ins>.</p>
sub and sup — for science and math
<sub> lowers text below the line; <sup> raises it above. You need them for chemistry, math and dates.
<p>Water: H<sub>2</sub>O</p>
<p>Carbon dioxide: CO<sub>2</sub></p>
<p>Area of a square: A = s<sup>2</sup></p>
<p>Einstein's equation: E = mc<sup>2</sup></p>
<p>Philippine Independence Day: June 12<sup>th</sup></p>
small — fine print
<p>Registration fee: ₱150 <small>(includes snacks and certificate)</small></p>
<p><small>© 2026 Grade 10 Coding Club. All rights reserved.</small></p>
Combining elements
You can nest formatting elements. Just remember to close them in the right order.
<p><strong>Reminder: bring your <em>own</em> water bottle.</strong></p>
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04