HTML BodyElement.aLink Property
The HTML BodyElement.aLink property is used to returns a DOMString that represents the color of active hyperlinks
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
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.


