Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML BodyElement.aLink Property

Improve Article
Save Article
Like Article
  • Last Updated : 08 Mar, 2022
Improve Article
Save Article
Like Article

The HTML BodyElement.aLink property is used to returns a DOMString that represents the color of active hyperlinks

Note: This property is not supported by HTML5. 

Syntax:

BodyElement.aLink

Return Value: This property returns a DOMString that represents the color of active hyperlinks

Example 1:

HTML




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

Output:

Example 2:

HTML




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

Output:

Supported Browsers:

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

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!