KodingKaro
HTML · Beginner · Headings, Paragraphs, and Text

Inline text meaning and line breaks

HTML offers text elements for importance, emphasis, edits, and annotations; choosing them carefully gives more context than visual styling alone.

✓ What you will learn in this topic

  • Explain the purpose of Inline text meaning and line breaks in a real HTML document.
  • Choose and apply the elements shown in both examples.
  • Recognize the specific mistake described in this lesson.

Concept explanation

Strong marks importance; em marks stress emphasis. B and i draw attention without adding the same importance or stress meaning, so use them only when their intended meaning fits. Mark can identify a relevant passage, while del and ins can represent deleted and inserted text. Small is for side comments. Br creates a line break within content such as an address, not empty space between paragraphs; hr represents a thematic break.

Syntax

Wrap the relevant text in the element whose meaning fits; reserve br for a meaningful line break.

Example 1: a small page

Strong signals an important notice, while em changes how the phrase should be stressed.

<p><strong>Notice:</strong> The library closes at 6 p.m.</p>
<p>Meet beside the <em>north entrance</em>.</p>

Expected result: Two paragraphs display; the warning appears strongly emphasized and north entrance receives emphasis.

Example 2: a practical page

The content records a price change, highlights an update, and uses br for two address lines.

<p>Price: <del>$24</del> <ins>$18</ins></p>
<p><mark>Updated schedule</mark> begins Monday.</p>
<p>Room 4<br>West Hall</p>

Expected result: The old and new prices are distinguished, the schedule label is highlighted, and the room and building appear on separate lines.

Common mistakes

Do not select heading levels to get a desired font size or use br repeatedly to create spacing.

Best practices

Use headings in logical order and choose emphasis elements according to meaning; use CSS for visual appearance.

Practice exercise

Write a short article with a main heading, two topic headings, paragraph text, one strong warning, one emphasized phrase, and a marked update.

Lesson summary

  • Use text elements to convey importance, emphasis, annotation, and edits; avoid using br as a spacing tool.
  • Use headings in logical order and choose emphasis elements according to meaning; use CSS for visual appearance.

Knowledge check

Which element marks a phrase that should receive vocal stress?

Show the explanation

Use em for stress emphasis; strong indicates importance instead.

Practical example

html
<p><strong>Notice:</strong> The library closes at 6 p.m.</p>
<p>Meet beside the <em>north entrance</em>.</p>

Expected result:

Two paragraphs display; the warning appears strongly emphasized and north entrance receives emphasis.

Hands-on practice task

Write a short article with a main heading, two topic headings, paragraph text, one strong warning, one emphasized phrase, and a marked update.

In this section

Other lessons in Headings, Paragraphs, and Text

Broaden your knowledge

Related learning topics