Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML | <body> alink Attribute

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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

Note: The HTML <body> alink attribute is not supported by HTML5.

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:




<!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>             

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
Last Updated : 05 Jan, 2022
Like Article
Save Article
Similar Reads
Related Tutorials