<link rel="stylesheet" href="example.css" />HTMLLinkElement: href property / notebook
HTMLLinkElement: href property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const link = document.getElementsByTag("link")[0];
console.log(link.href); // 'example.css'