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
<strong> is for importance, while <b> is purely for visual boldness.
<em> is for verbal emphasis, while <i> is for alternative voice or mood.
<mark> highlights text for reference, like a highlighter pen.
<del> and <ins> represent document edits (deleted vs. inserted).
<sub> and <sup> are essential for math (x²) and chemistry (H₂O).
Professional Insights
Semantic Importance (Strong vs. B)
The <mark> Element for Accessibility
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.