What is HTML Link Rel Generator?
An HTML link tag connects a page to another resource or declares a relationship in the document head. Developers use link tags for canonical URLs, language alternates, icons, preload hints, preconnect hints, stylesheets, and more. This tool helps keep attributes such as as, type, href, and crossorigin in the right place.
quickAnswer
Create valid HTML link tags for preload, preconnect, dns-prefetch, canonical, and alternate URLs without guessing the required attributes. Each rel value has specific requirements such as as, type, or crossorigin.
Last updated: 2026-06-11
limitations
- The as attribute is required for preload links. Without it, the browser cannot prioritize or apply the correct Content Security Policy to the preloaded resource.
- Preloading too many resources is counterproductive and can delay the loading of real critical content. Limit preload hints to one to three important resources per page.
- The crossorigin attribute is required for preloading fonts and other cross-origin resources. Omitting it causes the preload to be discarded by the browser.
Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub
How to use this tool
- Choose the rel value that matches the relationship or browser hint you need.
- Enter the href path or URL.
- Add as, type, and crossorigin only when they apply to the selected rel value.
- Copy the generated tag into the head section of your HTML.
What you can use it for
- Create a preload tag for a font, script, image, or stylesheet.
- Add preconnect or dns-prefetch for third-party origins.
- Build link tags without forgetting as, type, or crossorigin attributes.