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


[INDEX] Ch 4, L 3 - Underlined Text

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

You can underline text if you like. The following tag pair implements this feature:

<U></U>

A caution is warranted about underlining. Most graphic browsers highlight and underline the descriptive text portion of a clickable hyperlink. In the case of graphic browsers, hyperlinks are a different color than normal text. But with text browsers (such as LYNX), colors are not usually an option, and so there is no way to distinguish between underlined text and a hyperlink (except that the underlined text won't take you anywhere when you click on it).

There's another "gotcha" with underlining. Frequently, files are named with an underscore as one character of the filename. This page is a good example: c4_3.htm. If you were to underline this file name, the underscore would seem to disappear. You'll see this happen with many browsers when the link reference is used as the link description.

Throwing caution to the wind, here's our demonstration:

HTML Source Code Follows:


This is normal text; and <U>this is underlined text</U><BR>
Here's a normal hyperlink to this same page: <A HREF="c4_3.htm"> c4_3.htm</A><BR>
Was it automatically underlined?  What happened to the underscore in 'c4_3.htm'?
(End of HTML Source Code)

Demonstration Follows:

This is normal text; and this is underlined text
Here's a normal hyperlink to this same page: c4_3.htm
Was it automatically underlined? What happened to the underscore in 'c4_3.htm'?

(Demonstration Ends)

Were you tempted to click on the first line, just because it was underlined? Tricky stuff, heh? As with the previous tags, notice that the opening tag effectively says to the browser "turn underlining ON", while the closing tag says "now turn underlining OFF".


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

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