MDN self-hosted library · e01.org

HTMLLinkElement: media property

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

html
<link
  id="el"
  href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
  rel="stylesheet"
  media="screen and (width >= 600px)"
  crossorigin="anonymous" />
js
const el = document.getElementById("el");
console.log(el.media); // Output: "screen and (width >= 600px)"