Lesson 3: Inline Tags
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:
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:
It doesn’t matter which tag is used first but it is important to note that when using combination of tags their corresponding closing tag should be listed in the correct order, if the order starts with the opening em tag, it should end with the closing em tag, for example:
this is correct - <em><strong>text here</strong></em>
this is not correct - <em><strong>text here</em></strong>
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.