Skip to content
Related Articles

Related Articles

HTML | <body> link Attribute

Improve Article
Save Article
  • Last Updated : 25 Mar, 2022
Improve Article
Save Article

The HTML <body> link Attribute is used to specify the default color for a unvisited link in a document. 

Note : The HTML <body> link attribute is not supported by HTML5. Instead of using this attribute we can use CSS | :link Selector
 

Syntax:

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

Attribute Values: 

  • color_name: It is used to specifies the name of the color of the unvisited link.
  • hex_number: It is used to specifies the color of the unvisited link in terms of hex code.
  • rgb_number: It is used to specifies the color of the unvisited link in terms of RGB value.

Example: 

html




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

Output:

  

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

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!