English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
Alle gängigen Browser unterstützen den link-Attribut.
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.
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.
<body link="color_name|hex_number|rgb_number">
Value | Description |
---|---|
color_name | Specify the font color with the color name (for example "red")。 |
hex_number | Specify the font color with the hexadecimal value of the color (for example "#ff0000")。 |
rgb_number | Specify the font color with the rgb code of the color value (for example "rgb(255,0,0)")。 |