What is the purpose of the disabled attribute in the <link> element?

The disabled attribute prevents a stylesheet from being applied initially and is applicable only to stylesheets.

The disabled attribute in the <link> element, when set, prevents the linked stylesheet from being applied to the document upon initial load. This attribute is specifically used for stylesheets, allowing for on-demand loading, which can be useful for performance optimization or conditional styling. The stylesheet can be enabled later by removing the attribute or setting it to false.

<link rel="stylesheet" href="style.css" disabled />
More cards18
Show all