Open In App

HTML | <body> link Attribute

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: 



Example: 




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

Article Tags :