HTML rel="stylesheet"

A rel="stylesheet" attribute value specifies that the external link is a stylesheet that will be applied to the current page.

This setting only applies to <link> tags.



A rel="stylesheet" on a <link> element.
This stylesheet will be included into the page.

  <link rel="stylesheet" href="/tutorial/style.css">

Using rel="stylesheet"

The rel attribute defines the relationship between the current page and the linked page or resource.

A rel="stylesheet" value specifies that the stylesheet file will be loaded into the current page.

The URL for the CSS stylesheet is specified by the href attribute.


<link rel="stylesheet" href="url" />

Elements that accept rel="stylesheet"

Only one element accepts a stylesheet value on the rel attribute.

Elements Description
<link> Links a resource to the current page -- see example above

Browser support

Here is when rel support started for each browser:

6.0 Sep 2010
4.0 Mar 2011
12.0 Jul 2015
11.1 Mar 2011
5.0 Jun 2010

You may also like

Last updated on Sep 30, 2023