Open In App

HTML BodyElement.vLink Property

Last Updated : 05 Jan, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML BodyElement.vLink property is used to returns a DOMString that represents the color of visited links.

Syntax:

BodyElement.vLink

Return Value: This property returns a DOMString that represents the color of visited links.

Example 1:

HTML




<!DOCTYPE html> 
<html
  
<!-- body tag starts here -->
<body vLink = "red">
      
    <center
        <h1>GeeksforGeeks</h1
        <h2>HTMLBodyElement.vLink Property</h2
          
        <a href = "https://www.geeksforgeeks.org/"
            A computer science 
            portal for geeks 
        </a
    </center
   
    <script type = "text/javascript">
        console.log(document.body.vLink);
    </script>
</body>
  
</html>


Output:

Example 2:

HTML




<!DOCTYPE html> 
<html
  
<!-- body tag starts here -->
<body vLink = "green">
      
    <center
        <h1>GeeksforGeeks</h1
        <h2>HTMLBodyElement.vLink Property</h2
          
        <a href = "https://www.geeksforgeeks.org/"
            A computer science 
            portal for geeks 
        </a
    </center
   
    <script type = "text/javascript">
        console.log(document.body.vLink);
    </script>
</body>
  
</html>


Output:

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera
  • Edge


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads