tutorialpro.org

HTML Tutorial

``` ---"> tutorialpro.org

HTML Tutorial

``` ---" />
Easy Tutorial
❮ Canvas Scale Att Optgroup Disabled ❯

HTML <body> alink Attribute

HTML <body> Tag

Example

The color of active links in the document is set to green:

<p><a href="//www.tutorialpro.org">tutorialpro.org</a></p>
<p><a href="//www.tutorialpro.org/html/">HTML Tutorial</a></p>

Browser Support

All major browsers support the alink attribute.


Definition and Usage

The <body> alink attribute is deprecated in HTML 4.01.

The alink attribute specifies the color of active links in the document.


Compatibility Notes

In HTML 4.01, the alink attribute of the body element was deprecated; it is not supported in XHTML 1.0 Strict DTD. Use CSS instead.

CSS Syntax (in the <head> section): <style>a:active {color: #0000FF}</style>

CSS Example: Setting the Color of Active Links

In our CSS tutorial, you can find more details about the :active pseudo-class.


Syntax

Attribute Values

Value Description
color_name Specifies the font color with a color name (e.g., "red").
hex_number Specifies the font color with a hexadecimal value (e.g., "#ff0000").
rgb_number Specifies the font color with an rgb code (e.g., "rgb(255,0,0)").
❮ Canvas Scale Att Optgroup Disabled ❯