MDN self-hosted library · e01.org

HTMLLinkElement: href property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<link rel="stylesheet" href="example.css" />
js
const link = document.getElementsByTag("link")[0];
console.log(link.href); // 'example.css'