← HTML tutorial

HTML

Text Formatting

A handful of inline tags change how text is presented, and each one carries real meaning beyond its default appearance.

Example 1: strong vs. em

<p>This word is <strong>critically important</strong>.</p>
<p>This word needs <em>emphasis</em> when read aloud.</p>

<strong> makes text bold and signals it's genuinely important; <em> italicizes text for emphasis. Browsers render them as bold/italic by default, but their real job is meaning, not appearance, a screen reader actually changes tone of voice for them. If you just want text to look bold with no real emphasis intended (a stylistic choice, not meaning), that's a job for CSS's font-weight property instead.

Example 2: line breaks and dividers

<p>123 Main Street<br>Lagos, Nigeria</p>
<hr>
<p>Text after the divider.</p>

<br> forces a line break within the same paragraph, useful for something like an address, where lines are related but not separate ideas. <hr> draws a horizontal divider line, typically used to mark a thematic break between sections of content.

Try it yourself
Ready to go further?

These free tutorials are a preview, our Frontend Development cohort covers it in depth, with a real project and a cohort alongside you. Active

Enroll in Frontend Development
Don't miss out

Ready to build something real?

Create a free account to enroll in a track, and get notified the moment a cohort opens.

Create free account