Open In App

HTML BodyElement.vLink Property

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:






<!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:




<!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:


Article Tags :