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:
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 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.