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

HTML Reference Manual

HTML Tag Reference

HTML: <body> alink attribute

The alink attribute specifies the color of the active link in the document (the link is activated when clicked).

 HTML <body> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the alink attribute

Definition and Usage

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.

Compatibility Comments

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>

Syntax

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

Attribute Value

ValueDescription
color_nameSpecifies the font color with color name (e.g., "red").
hex_numberSpecifies the font color with hexadecimal value (e.g., "#ff0000").
rgb_numberSpecifies the font color with rgb code (e.g., "rgb(255)("
 HTML <body> tag