Wanna make some money with your website?
Sign up with Shareasale and earn commissions from banner ads

Lesson 3: Inline Tags

Formatting Text

Words within a sentence or paragraph can be made bold with the strong tag like so:

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

Did you pick "guess"? Then you passed the grade, give yourself a pat on the back.

Italicized words are made by enclosing them in em tags:

<em>Your text here</em>

The strong and em tags belong to a group of tags known as “inline” tags, these kind of tags don’t force text to start on a separate line the way block tags do. They 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' placement is dertermined by the placement of the corresponding opening tag. For instance if the opening em tag is first, the closing em tag should be last:

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. Another inline tag is the span tag:


The span tag alone 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.


Easy Website Builder
Skip the tutorial and build your website or online store without learning any code Tell Me More
html tutorial
This tutorial is available in printable PDF format

Get Your Copy