The <link>
element in HTML is used to link external resources, such as stylesheets, to an HTML document. It is placed in the head of the document and does not require a closing tag. Here is an example of how to use the <link>
element to link a stylesheet to an HTML document:
<!DOCTYPE html>
<html>
<head>
<link href="/path/to/stylesheet.css" rel="stylesheet">
</head>
<body>
<!-- The rest of the HTML document goes here -->
</body>
</html>
The href attribute is used to specify the location of the resource, rel attribute is used to specify the relationship between the current document and the linked resource. In this case, the rel attribute is used to indicate that the linked resource is a stylesheet.