Name

href — NN n/a IE 4 DOM 1

Synopsis

Read/Write

The URL specified by the element’s HREF attribute. For example, to swap external style sheets after the page has loaded, assign an alternate style sheet file to the href property. This property is read-only in IE 4/Macintosh.

Example

document.all.styleLink.href = "altStyles.css"

Value

String of complete or relative URL.

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.