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

HTML Reference Manual

HTML Tag Directory

HTML: <body> vlink attribute

This article introduces the usage of the HTML body vlink attribute, online examples demonstrating how to use the HTML body vlink attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.

 HTML <body> tag

Online Example

Set the visited link color to 'blue' in the HTML document:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <body> vlink attribute - Basic Tutorial Website oldtoolbag.com/title>
<body text="blue">
<h1>Hello world!</h1>
<p>This is some text.</p>
<p><a href="https://www.oldtoolbag.com">Basic Tutorial Website</a></p>
<p><a href="https://www.oldtoolbag.com/html/">HTML Tutorial</a></p>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the vlink attribute.

Definition and Usage

HTML5 No longer supports the vlink attribute of <body>. Please use CSS instead.

The vlink attribute of <body> in HTML 4.01 is deprecated.

The vlink attribute in the document has been visited link color.

Compatibility Comments

In HTML 4.01 The vlink attribute of the body element is not recommended; in XHTML 1In .0 Strict DTD, the vlink attribute of the body element is not supported. Please use CSS instead.

CSS Syntax (in the <head> section): <style>a:visited {color: #FF0000}</style>/style>

CSS Example: Set the color of visited links

In our CSS tutorial, you can find more about :visited pseudo-classknowledge.

Syntax

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

Attribute value

ValueDescription
color_nameSpecify the font color with a color name (for example, "red").
hex_numberSpecify the font color with a hexadecimal value (for example, "#ff0000").
rgb_numberSpecify the font color with rgb code (for example, "rgb(255,0,0)"
 HTML <body> tag