<u> Underlining TextThe <u> element displays underlined text. This element was deprecated in HTML 4.0 (you're supposed to use styles instead now), so it is not supported in XHTML 1.0 Strict or XHTML 1.1. It is supported in XHTML 1.0 Transitional and XHTML 1.0 Frameset, however. Here are the attributes of this element:
Here are the official XHTML events this element supports: onclick , ondblclick , onmousedown , onmouseup , onmouseover , onmousemove , onmouseout , onkeypress , onkeydown , and onkeyup . The <u> element offers another easy formatting option, underlining its enclosed text. This element is deprecated in HTML 4.0, so you can't use it in strict XHTML 1.0 or XHTML 1.1. Here's an example putting <u> to work: Listing ch16_08.html <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> Using the <u> Element </title> </head> <body> You can <u>underline</u> text for a little more emphasis. </body> </html> The results of this XHTML appear in Figure 16-6. Figure 16-6. Displaying underlined text in Netscape Navigator.
|