<u> Tag Syntax
<body> ... ... phrasing content expected ...<u>... phrasing content ...</u>... ... </body>
Rules for coding the HTML u
element
Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.
- Verify that the purpose for using the <u> tag cannot be served better using another tag such as:
- Code the u element where phrasing content is expected.
- Begin the u element with a starting <u> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the
xmlns
attribute on the <html> tag. - Include any HTML global attributes on the <u> tag as appropriate.
- Inside the u element, between the starting
<u>
tag and the ending</u>
tag, code the inner HTML phrasing content. - End the u element with a matching
</u>
closing tag.
Content Model
Content of the uelement
The content of the u element can include HTML comments, text content and only those HTML tags that can be used in phrasing content.