Skip to content
Related Articles

Related Articles

Improve Article

HTML BodyElement.vLink Property

  • Last Updated : 05 Jan, 2021

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

Syntax:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

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



My Personal Notes arrow_drop_up
Recommended Articles
Page :