The rel
attribute in HTML stands for “relationship” and is used in various elements to specify the type of relationship the current document has with the linked document. It is most commonly used in <link>
and <a>
(anchor) tags. Here are some key points about the rel
attribute:
In <link>
Tags: The rel
attribute in <link>
tags defines the relationship between the current document and the linked resource. It is commonly used to link stylesheets, favicons, preconnect URLs, and other external resources. For example:
<link rel="stylesheet" href="mystyle.css">
This specifies that mystyle.css
is a stylesheet for the current document.