HTML Elements

Text formats

The HTML <strong> and <em> gives us a way of defining text with special meaning. <strong> text is usually rendered as bold text by browsers, while <em> text is cursive. These tags are useful, but should be used with modesty.

Code example

<p>
<strong>
I am important and should be taken seriously.
</strong>
I love <em>carrots</em>.
Emphasis on carrots.
</p>

produces the paragraph below

I am important and should be taken seriously.

I love carrots. Emphasis on carrots.

Test yourself

Description

Add a <strong> paragraph with the text

Reducing thought to formula, replacing choice by obedience, these preachers turned the living word into dead law.

and an <em> paragraph with the text

Ursula K. Le Guin

as the last elements of the <div>.

Tests

  1. 1 You should create the strong element.
  2. 2 Your strong element should have a closing tag.
  3. 3 Your strong element should have the text specified in the description.
  4. 4 You should create the em element.
  5. 5 Your em element should have a closing tag.
  6. 6 Your em element should have the text specified in the description.
Editor
Preview