soccer mug ad banner

Lesson 3: Inline Tags

What Are Inline Tags?

Inline tags don't force text to start on a new line like block tags do. An example of an inline tag is the strong tag which makes bold text:

<p>
One word in this sentence will be bold
<strong> guess</strong> which one?
</p>

Did you pick "guess"? Then give yourself a pat on the back. Another inline tag is the em tag, it makes italicized text:

<em>Your text here</em>

The strong and em tags can be used together to make text both bold and italicized:

<strong> <em>Your text here</em></strong>

When using multipe tags it doesn't matter which tag comes first, but the closing tags must follow the order of the opening tags:

this is correct - <em><strong>text here</strong></em>
this is not correct - <em><strong>text here</em></strong>

Got it? Good, let's move on. The span tag is also an inline tag:

<span></span>

By itself the span tag doesn’t do anything but when combined with CSS it can change the appearance of text within a sentence, so let's see how we can add some CSS code to our tags in lesson 4.

 



WEBSITE ESSENTIALS