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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <u> Tag

Der Text, der durch den HTML <u>-Tag definiert wird, sollte eine andere Schriftart oder eine nicht-textuelle Anmerkung haben. Traditionell wird der Text in <u>-Tags von Browsern als unterstrichener Text dargestellt. Dieses Tag wird oft auch als <u>-Element bezeichnet.

Hinweis: Wenn Sie Text unterstreichen möchten, verwenden Sie CSS (z.B. text-Die Eigenschaft decoration (decoration-Eigenschaft) ersetzt den <u>-Markierungen. Achten Sie darauf, dass der unterstrichene Text nicht mit Hyperlinks verwechselt wird.

Online-Beispiel

Verwenden Sie den <u>-Tag, um Text unterstrichen zu machen:

!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Verwendung des HTML <u>-Tags (Grundtutorials im Netz oldtoolbag.com)</title>
</head>
<body>
<h1>Überschrift 1</h1>
<p>Wir möchten <u>diesen Text annotieren</u>.</p>
</body>
</html>
Testen Sie das hier ‹/›

In diesem HTML5In der Dokumentvorlage haben wir <u>Markierungen erstellt, um nicht-textuelle Anmerkungstexte zu kennzeichnen. Standardmäßig zeigt Ihr Browser diesen Text als unterstrichenen Text an. Sie können dieses Verhalten mit CSS überschreiben.

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the <u> tag.

Definition and Usage 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 Notes

Tip:Please avoid using <u> to underline text, as users may confuse it with a hyperlink.

Note:HTML5 The specification recommends 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

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

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

Global Attributes

Support for <u> Tag Global Attributes of HTML.

Event Attributes

Support for <u> Tag HTML Event Attributes.