Skip to main content
Albero Academy

Text Formatting

Emphasis, strong, and other inline text elements.

Text & Links7 min

Inline elements mark up pieces of text within a paragraph — for emphasis, importance, code, quotes and more. Choosing semantic elements over purely visual ones keeps meaning intact.

Common inline elements

text-level elements
<em>emphasised</em> <!-- stress emphasis (usually italic) -->
<strong>important</strong> <!-- strong importance (usually bold) -->
<code>inline code</code>
<mark>highlighted</mark>
<a href="#">a link</a>
<br /> <!-- line break -->
<abbr title="HyperText Markup Language">HTML</abbr>

Semantic vs visual

Key takeaways

  1. 01Inline elements mark up text within a block: <em>, <strong>, <code>, <mark>, <a>.
  2. 02Prefer semantic <em>/<strong> (meaning) over visual <i>/<b> (appearance).
  3. 03Screen readers convey the meaning of semantic elements.
  4. 04Use CSS for pure appearance, not presentational tags.

Finished this chapter?

Mark it complete to track your progress through HTML.