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

In the first paragraph, mark the word thousands as important using the strong element.

Emphasize the last two words of the first paragraph, small cats, using the em element (without the period at the end of the sentence).

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

4/8