Latest web development tutorials

HTML body link attribute

HTML body tag Reference Manual HTML <body> tag

Examples

The document default link color to blue:

<html>
<body link="blue">
<p><a href="http://www.w3big.com">本教程</a></p>
<p><a href="http://www.w3big.com/html/">HTML 教程</a></p>
</body>
</html>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support link attribute.


Definition and Usage

HTML5 is no longer supported <body> link attribute. Use CSS instead.

<Body> The link attribute is deprecated in HTML 4.01.

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


Compatibility Notes

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

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

CSS Example: set document unvisited link color

In our CSS tutorial you can find more information about the : link pseudo-class information.


grammar

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

Property Value

value description
color_name Predetermined color is the color of the font color name (such as "red").
hex_number Predetermined color value is a hexadecimal value of font color (eg "# ff0000").
rgb_number Rgb color code is specified font color (such as "rgb (255,0,0)").


HTML body tag Reference Manual HTML <body> tag