English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The alink attribute specifies the color of the active link in the document (the link is activated when clicked).
The color of the active link in the document is set to blue:
<!DOCTYPE html> <html> <head> <title>HTML: <body> alink attribute - Basic Tutorial Website oldtoolbag.com</title> </head> <body alink="#0000cc"> <p><a href="https://www.oldtoolbag.com">oldtoolbag.com</a></p> <p><a href="https://www.oldtoolbag.com/html/">HTML Tutorial</a></p> <p>HTML5 This attribute is no longer supported. Please use CSS instead.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the alink attribute
HTML5 The <body> alink attribute is no longer supported. Please use CSS instead.
The alink attribute of <body> in HTML is deprecated. 401is deprecated.
The alink attribute specifies the color of the active link (active link) in the document.
In HTML 401 It is not recommended to use the alink attribute of the body element; in XHTML 1In HTML 4.0 Strict DTD, the alink attribute of the body element is not supported. Please use CSS instead.
CSS Syntax (<head> section): <style>a:active {color: #0000FF}</style>/style>
<body alink="color_name|hex_number|rgb_number">
Value | Description |
---|---|
color_name | Specifies the font color with color name (e.g., "red"). |
hex_number | Specifies the font color with hexadecimal value (e.g., "#ff0000"). |
rgb_number | Specifies the font color with rgb code (e.g., "rgb(255)(" |