HTML - tags - u tag

revision:


Content

"u" tag : unarticulated text syntax some examples


"u" tag : unarticulated text

top

The <u> tag represents some text that is unarticulated and styled differently from normal text, such as misspelled words or proper names in Chinese text. The content inside is typically displayed with an underline. You can change this with CSS.

The u element is used to add an annotation that tells us something about the selected text itself, not about the content or message of the text.
The way the annotation is added is unarticulated. Words between u tags don't have to be underlined, any method of annotation is acceptable.
The annotation must be explicitly rendered, that is: easy to spot. Avoid using the <u> element where it could be confused for a hyperlink!

Attributes: this element includes the global attributes.


Syntax

top

<u>. . . non-textual annotation . . . </u>


some examples

top

This is some mispeled text.

code:
                <p>This is some <u>mispeled</u> text.</p>
            

You could use this element to highlight speling mistakes, so the writer can corect them.

code:
                <p>You could use this element to highlight 
                <u>speling</u> mistakes, so the writer can <u>corect</u> them.</p>
            

我來自新西蘭is Chinese for I am from New Zealand with "New Zealand" written in Chinese and marked up as a proper name.

code:
                <p><span lang="zh" xml:lang="zh">
                我來自<u>新西蘭</u></span> is Chinese for <q>
                I am from New Zealand</q> with "New Zealand" written in Chinese and marked up 
                as a proper name.</p>