About This HTML Issue
A <link> element must have either an href or a resource attribute. Without one of these, the browser has no way to know what the element points to.
The <link> element defines a relationship between the current document and an external resource. The href attribute specifies the URL of that resource. When href is missing, the element is incomplete and has no effect.
A common cause is forgetting to add the href when writing a <link> for a stylesheet, icon, or preload directive. Another cause is accidentally leaving a <link> tag in the markup after removing its URL during editing.
The resource attribute is far less common and appears in RDFa contexts. For most HTML documents, href is the attribute you want.
Invalid example
<link rel="stylesheet">
The rel attribute is present, but there is no href telling the browser where to find the stylesheet.
Valid example
<link rel="stylesheet" href="styles.css">
Adding the href attribute resolves the validation error.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.