Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

A “link” element with a “rel” attribute that contains the value “preload” must have an “as” attribute.

A <link> element that is using the preload value in the rel attribute is missing the as attribute, used to indicate the type of the resource.

The preload value of the <link> element’s rel attribute lets you declare fetch requests in the HTML’s <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers’ main rendering machinery kicks in. This ensures they are available earlier and are less likely to block the page’s render, improving performance.

The as attribute specifies the type of content being loaded by the <link>, which is necessary for request matching, application of correct content security policy, and setting of correct Accept request header.

Learn more:

Related W3C validator issues