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

HTML-Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <body> link-Attribut

Der Link-Attribut bestimmt die Standardfarbe der nicht besuchten Links im Dokument. HTML5Der Link-Attribut von <body> wird nicht unterstützt. Verwenden Sie CSS-Stile, um dies zu erreichen.

 HTML <body> Tag

Online-Beispiel

Setzen Sie die Standardlinkfarbe auf „grün“ im HTML-Dokument:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <body> link-Attribut - Grundlagen-Tutorial-Website oldtoolbag.com/title>
<body link="green">
<p><a href="https://de.oldtoolbag.com">Grundlagen-Tutorial-Website</a></p>
<p><a href="https://de.oldtoolbag.com/html/">HTML-Tutorial</a></p>
</body>
</html>
Testen Sie es heraus ‹/›

Browser-Kompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen den link-Attribut.

Definition und Verwendung

HTML5 wird nicht mehr unterstützt. Verwenden Sie stattdessen CSS.

Der link-Attribut von <body> im HTML 401 is deprecated.

The link attribute specifies the default color of unvisited links in the document.

Compatibility Comments

in HTML 401 Discontinued the use of the link attribute of the body element; in XHTML 1Strict DTD does not support the link attribute of the body element. Please use CSS instead.

CSS Syntax (in the <head> section): <style>a:link {color: #FF0000}</style>/style>

CSS Example: Set the color of unvisited links in the document

In our CSS tutorial, you can find more about :link  Pseudo-classinformation.

Syntax

<body link="color_name|hex_number|rgb_number">

Attribute Value

ValueDescription
color_nameSpecify the font color with the color name (for example "red")。
hex_numberSpecify the font color with the hexadecimal value of the color (for example "#ff0000")。
rgb_numberSpecify the font color with the rgb code of the color value (for example "rgb(255,0,0)")。
 HTML <body> Tag