HTML Basics · Lesson 3 of 11

Bold, Italic and Line Breaks

Tags can go inside other tags. To make part of a paragraph stand out, wrap just those words:

<p>Please <strong>do not</strong> feed the ducks.</p>
<p>The soup was <em>really</em> good.</p>
  • <strong> marks text as important. Browsers show it in bold.
  • <em> adds emphasis, the way you stress a word when speaking. Browsers show it in italics.

Close tags in the reverse order you opened them, like nested boxes: <p><strong>…</strong></p>, never <p><strong>…</p></strong>.

Line breaks

Remember that the browser ignores line breaks in your code. When you really need a new line inside a paragraph, for an address or a poem, use <br>:

<p>12 Garden Lane<br>Springfield</p>

<br> is an empty element: it has no content, so it has no closing tag.

Your Task

  1. Make the words very important bold with <strong>.
  2. Make the word never italic with <em>.
  3. Put a <br> after the comma in the second paragraph so the address is on two lines.
  • The words "very important" are inside <strong>
  • The word "never" is inside <em>
  • The second paragraph has a <br> in it
  • All the original text is still there