Maddog's HTML for Real People Chapter 4, Lesson 2


[INDEX] Ch 4, L 2 - Italicized Text

If you already know how to turn "italics" on and off in HTML, you can skip this lesson.

Italicized text works in much the same way as bolded text. This time, we have our choice of three (3) different tag pairs for making italicized text:

<I></I>
OR
<EM></EM>
OR
<CITE></CITE>

By the way, 'EM' stands for "emphasized". 'CITE' tags were intended to be used for 'citing' articles, magazines, etc. Some browsers may treat the 'EM' and 'CITE' tags differently, but most will use the same italic font for all three tags.

Incidentally, don't try to mix these tags and expect to get predictable results. For example, don't open with the <I> tag, then try to close with the </EM> tag. There's no telling what a browser might do with it. Try to color inside the lines, please.

Here's our demonstration:

HTML Source Code Follows:


This is normal text; and <I>this is text using the 'I' tag;</I><BR>
This is normal text; and <EM>this is text using the "EM' tag;</EM><BR>
This is normal text; and <CITE>this is text using the "CITE" tag;</CITE><BR>
This is normal text; and <I>this is what happens in your browser</EM>
when you close with the wrong tag;
(End of HTML Source Code)

Demonstration Follows:

This is normal text; and this is text using the 'I' tag;
This is normal text; and this is text using the "EM' tag;
This is normal text; and this is text using the "CITE" tag;
This is normal text; and this is what happens in your browser when you close with the wrong tag;

(Demonstration Ends)

Again, notice that the opening tag effectively says to the browser "turn italics ON", while the closing tag says "now turn italics OFF". By the way, if you see a difference between the emphasized text on the first and second or third lines, your browser treats the 'EM' and/or 'CITE' tags differently than the 'I' tag. Also, on the fourth line, I closed the <I> tag using a </EM> You can see what your browser did with this illegal (and highly reckless) action. (Please don't turn me in...)


-PREVIOUS- -CHAPTER- -INDEX- -NEXT-

Overseer: Monty Northrup ... maddog@io.com ... leave e-mail ...
...to maddog 'n' miracles homepage...