English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de Referência HTML

大全 do HTML

HTML: <u> tag

O texto definido pela tag <u>HTML deve ter um estilo diferente ou ser um comentário não textual. Tradicionalmente, os navegadores exibirão o texto encontrado dentro da tag <u> como texto sublinhado. Este rótulo também é conhecido como elemento <u>.

Dica: Se você quiser que o texto tenha sublinhado, use CSS (por exemplo, text-decoration atributo) em vez de <u>marcadores. Certifique-se de que o texto sublinhado não se confunda com links de hipertexto.

Exemplo Online

Use a tag <u>para adicionar sublinhado ao texto:

!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Uso do tag <u>HTML (Tutorial Básico da Web oldtoolbag.com)</title>
</head>
<body>
<h1>Título 1</h1>
<p>Nós queremos anotar <u>este texto</u>.</p>
</body>
</html>
Teste para ver ‹/›

Neste HTML5No exemplo do documento, criamos <u>marcadores para representar comentários de texto não textual. Pelo padrão, seu navegador exibirá 'Este texto' como texto sublinhado. Você pode usar CSS para sobrescrever este comportamento.

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <u> tag.

Definition and usage instructions of tags

The <u> tag defines text with a style different from the regular text, such as misspelled words or proper nouns in Chinese.

Tips and notices

Tip:Avoid using <u> to underline text as much as possible, as users may confuse it with a hyperlink.

Note:HTML5 The specification suggests that developers use other elements instead of the <u> element as much as possible.

The <u> tag is used to set the text style to be different from the regular text. Browsers use the underlined format to set the text found in the <u> tag. You can change this behavior using CSS.

HTML 4.01 and HTML5Differences between

In HTML, the <u> element is deprecated (the <u> element was used to define underlines).

HTML5 In HTML, the <u> element has been redefined, it defines text with a style different from the regular text, such as misspelled words or proper nouns in Chinese.

Global attributes

Support of <u> tag Global attributes of HTML.

Event attributes

Support of <u> tag Event attributes of HTML.