HTML - tags - u....

revision:


Content

"u" tag : unarticulated text "ul" tag : unordered list, bulleted list


"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: <u>. . . non-textual annotation . . . </u>

some examples

example

This is some mispeled text.

code:
                <p class="example">This is some <u>mispeled</u> text.</p>
            

example

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

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

example

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

code:
                <p class="example"><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>
            

"ul" tag : unordered list, bulleted list

top

The <ul> tag defines an unordered (bulleted) list. Use the <ul> tag together with the <li> tag to create unordered lists. Each list item in an unordered list is a "li" child element of the "ul" element, created using the "li" tag. List items are usually highlighted with a bullet mark or image, which is why list items are sometimes called bullet points.

The "ul" tag is a block-level element and occupies all available horizontal space. Its height depends on the content within the container. An unordered list is typically rendered as a bulleted list.

Attributes: the <ul> element supports the global attributes and events attributes.

Syntax : <ul> . . . </ul>

some examples

example
  • Coffee
  • Tea
  • Milk
  • Coffee
  • Tea
  • Milk
  • Coffee
  • Tea
  • Milk

Codes:

                    <style>
                        ul{margin-left: 4vw;}
                    </style>   
                    <ul style="list-style-type:circle">
                        <li>Coffee</li>
                        <li>Tea</li>
                        <li>Milk</li>
                    </ul>
                    <ul style="list-style-type:disc">
                        <li>Coffee</li>
                        <li>Tea</li>
                        <li>Milk</li>
                    </ul>
                    <ul style="list-style-type:square">
                        <li>Coffee</li>
                        <li>Tea</li>
                        <li>Milk</li>
                    </ul>
                

example
  • Coffee
  • Tea
    • Black tea
    • Green tea
      • China
      • Africa
  • Milk

Codes:

                    <ul>
                        <li>Coffee</li>
                        <li>Tea
                        <ul>
                            <li>Black tea</li>
                            <li>Green tea
                            <ul>
                                <li>China</li>
                                <li>Africa</li>
                            </ul>
                            </li>
                        </ul>
                        </li>
                        <li>Milk</li>
                    </ul>