HTML < link > Tag - Learn About Website | DaddyFile

0

HTML <link> Tag

Example

Link to an external style sheet:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>

<body>
<h1>I am formatted with a linked style sheet</h1>
<p>Me too!</p>
</body>

</html>


Definition and Usage

The <link> tag defines a link between a document and an external resource.
The <link> tag is used to link to external style sheets.

Note: The <link> element is an empty element, it contains attributes only.
Note: This element goes only in the head section, but it can appear any number of times.

Differences Between HTML 4.01 and HTML5

Some HTML 4.01 attributes are not supported in HTML5.
The "sizes" attribute is new in HTML5.

Differences Between HTML and XHTML

In HTML the <link> tag has no end tag.
In XHTML the <link> tag must be properly closed.


Post a Comment

 
Top