Text Styling
Some HTML elements say something about the meaning of a piece of text. The strong element (from strong importance) marks text that is important, serious or urgent. The em element (from emphasis) marks text that we stress, like a word we say with more emphasis when speaking.
Browsers display the content of the strong element in bold and the content of the em element in italics.
This code:
<p>Chocolate is <strong>poisonous</strong> to dogs. But dogs <em>love</em> long walks.</p>Will be displayed like this:
Chocolate is poisonous to dogs. But dogs love long walks.
If we want text to only look bold or italic, without any extra meaning, we use CSS. We will get to that in the CSS course.
Instructions
- 1
In the first paragraph, mark the word
thousandsas important using thestrongelement. - 2
Emphasize the last two words of the first paragraph,
small cats, using theemelement (without the period at the end of the sentence).