Body vLink attribute
Body object
Definition and Usage
The vLink attribute sets or returns the value of the vlink attribute in the body element.
The vlink attribute describes the text color of visited links.
Syntax
Set the vLink attribute:
bodyObject.vLink="
color
"
Return the vLink attribute:
bodyObject.vLink
| Value | Description |
|---|---|
| color | Specifies the link color. See the complete A CSS color value |
Browser support





All major browsers support the vLink attribute
Example
Example
Return the color value of the page link text when clicked and after being clicked:
<p>
<a href="//www.runoobb.com">Runoob Tutorial
a
p
<p>
<a href="//www.runoobb.com/html/">HTML Tutorial
a
p
<
script
document.write("color of unclicked link is: ") document.write(document.getElementById("runoob").link); document.write("
<
br
selected link color is: ") document.write(document.getElementById("runoob").aLink); document.write("
<
br
visited link color is: ") document.write(document.getElementById("runoob").vLink);
script
Try it »
Body object