HTML BodyElement.aLink Property
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
Please Login to comment...