Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML body link attribute

HTML link attribute

HTML body Tag Reference HTML Tag

Example

Set the default link color in the document to blue:

Runoob Tutorial

HTML Tutorial

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the link attribute.


Definition and Usage

HTML5 no longer supports the link attribute. Please use CSS instead.

The link attribute was deprecated in HTML 4.01.

The link attribute specifies the default color of unvisited links in the document.


Compatibility notes

In HTML 4.01, the link attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the link attribute of the body element is not supported. Please use CSS instead.

CSS syntax ( section):

CSS example: set the color of unvisited links in the document

In our CSS tutorial, you can find more details about :link pseudo-classinformation.


Syntax

HTML tag