HTML | <body> alink Attribute

The HTML <body> alink Attribute is used to specify the color of an active link in a document.

Syntax:

<body alink="color_name|hex_number|rgb_number">

Attribute Values:



  • color_name: It specifies the name of the color of an active link.
  • hex_number: It specifies the color of the activated link in terms of hex code.
  • rgb_number: It specifies the color of the activated link in terms of RGB value.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
  
<head
    <title>
        HTML body alink Attribute
    </title
</head
      
<body alink="red" link="blue"
    <center
        <h1 style="color:green;">
            GeeksforGeeks
        </h1
          
        <h2>HTML <body> alink Attribute</h2
          
          
        <a href="#">
            A computer science portal for geeks
        </a>
    </center
</body
      
</html>             

chevron_right


Output:

Supported Browsers: The browser supported by HTML <body> alink attribute are listed below:

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


My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.