Text Formatting: strong, em, br, hr, small, mark
8 min read
Inline Text Semantics
HTML has several elements for adding meaning to runs of inline text. These are different from styling — a screen reader, for example, will emphasise <em> text audibly.
html
<p>This word is <strong>very important</strong> and this is <em>emphasised</em>.</p>
<p>Use <mark>highlighted text</mark> to draw attention.</p>
<p>Fine print goes in <small>small</small> text.</p>
<p>Line one<br />Line two (forced break)</p>
<hr />
<p>Content after a thematic break.</p>When to Use Each Tag
<strong>— Strong importance. Renders bold by default.<em>— Stress emphasis. Renders italic by default.<mark>— Highlight for reference, like a search result.<small>— Side comments, fine print, copyright notices.<br />— A line break within flowing text. Do NOT use it to add spacing between paragraphs.<hr />— A thematic break (e.g. a scene change in a story).
Avoid <b> and <i> for semantic content. Use <strong> and <em> instead. Reserve <b> and <i> only when you want a visual style with no semantic meaning.
Ready to test yourself?
Practice HTML— quiz & coding exercises