Kanbritech Learn logo
HTML HTML Tutorial 45h track

HTML Elements

Write a paragraph with an emphasized phrase using em.

Understand the topic

Most HTML elements have an opening tag, content, and a closing tag. Elements can contain other elements when their content rules allow it. Nest them in a consistent order: the last element opened should normally be the first closed. Void elements such as img, input, br, and meta do not have closing tags or child content.

Worked example

<p>Study <strong>one topic</strong> each day.</p>
<p>First line<br>Second line</p>

The paragraph contains a strong element. Its closing tag comes before the paragraph closes. The br element creates a meaningful line break and does not need an end tag.

Practice

Write a paragraph with an emphasized phrase using em.

Show a suggested answer
<p>Please bring <em>your own notebook</em> to class.</p>

Common mistake

Do not nest a paragraph inside another paragraph. Browsers repair invalid markup, which can produce a different DOM from the source you wrote.

HTML documentation

Live Example

Try Coding

Result