Open In App

HTML BodyElement.aLink Property

Last Updated : 08 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads