HTML BodyElement.aLink Property
Last Updated :
08 Mar, 2022
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 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 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
Share your thoughts in the comments
Please Login to comment...