Easy Tutorial
❮ Prop Button Disabled Jsref Tan ❯

Body link Attribute


Definition and Usage

The link attribute sets or returns the value of the link attribute of the body element.

The link attribute specifies the color of unvisited links in the document.

Syntax

Set the link attribute:

Return the link attribute:

Value Description
color Specifies the link color. See the full CSS Color Values

Browser Support

All major browsers support the link attribute.


Example

Return the color of unvisited links, active links, and visited links in the document:

<p><a href="//www.tutorialprob.com">tutorialpro.org</a></p>
<p><a href="//www.tutorialprob.com/html/">HTML Tutorial</a></p>
<script>
document.write("Unvisited link color is: ")
document.write(document.getElementById("tutorialpro").link);
document.write("<br>Active link color is: ")
document.write(document.getElementById("tutorialpro").aLink);
document.write("<br>Visited link color is: ")
document.write(document.getElementById("tutorialpro").vLink);
</script>

❮ Prop Button Disabled Jsref Tan ❯