HTML Guide
CourseHTML Formatting
Core Concept
100% Comprehensive

HTML Formatting.

HTML includes specialized elements for defining text with specific meaning and emphasis. Understanding the difference between visual and semantic formatting is key to accessibility.

The Essentials

01

<strong> is for importance, while <b> is purely for visual boldness.

02

<em> is for verbal emphasis, while <i> is for alternative voice or mood.

03

<mark> highlights text for reference, like a highlighter pen.

04

<del> and <ins> represent document edits (deleted vs. inserted).

05

<sub> and <sup> are essential for math (x²) and chemistry (H₂O).

Professional Insights

Semantic Importance (Strong vs. B)

✔ Use: → <strong> for warnings, critical alerts, or key terms in a paragraph. → <b> for purely stylistic bolding (like product names in a list). ❌ Avoid: → Using <b> for anything that needs to be noticed by screen readers. 💡 Tip: → Search engines often give more weight to text wrapped in <strong> tags.

The <mark> Element for Accessibility

✔ Use: → To highlight search results or relevant parts of a quote. ❌ Avoid: → Using <mark> for decorative background colors. 💡 Tip: → Always provide additional context for screen readers when using <mark>, as it isn't always announced by default.

Critical Pitfalls

Using <b> and <i> as a shortcut for styling instead of <strong> and <em>.

Nesting multiple formatting tags unnecessarily (e.g., <strong><b>Text</b></strong>).

Forgetting that formatting tags are inline—they won't create a new line automatically.

Using <del> and <ins> for visual effects rather than document revision history.

Interactive Lab

Sprint Tasks

01
Wrap 'WARNING' in a <strong> tag
02
Highlight the word 'Reference' using <mark>
03
Format the following math: E = mc2 (make the 2 a superscript)
Loading editor...
Production Preview