Bhylu

HTML Formatting

Some inline elements explain why text is different. Important information, spoken emphasis, a scientific formula, and a highlighted search match have different meanings even if a browser styles them similarly.

How it works

  • Use strong for importance and em for stress emphasis. Use CSS when you only want a particular visual appearance.
  • The sub and sup elements support appropriate notation such as chemical formulas and exponents; they are not a general positioning system.
  • The del and ins elements describe edits. A mark highlights something relevant in the current context, such as a matching search term.

A practical example

HTML

<p><strong>Bring eye protection.</strong> The workshop uses hand tools.</p>
<p>Please return the tools <em>before</em> leaving.</p>
<p>Water is written as H<sub>2</sub>O.</p>
<p>Meeting time: <del>10:00</del> <ins>10:30</ins>.</p>

The markup records importance, emphasis, notation, and a revision. Those distinctions remain in the document even if the default font styles are changed.