A link to a stylesheet that can be used to style components on the Visualforce page. When specified, this component injects the stylesheet reference into the head element of the generated HTML page.
This component supports HTML pass-through attributes using the "html-" prefix. Pass-through attributes are attached to the generated <link> tag.
<apex:stylesheet value="/resources/htdocs/css/basic.css"/>
The example above renders the following HTML:
<link rel="stylesheet" type="text/css" href="/resources/htdocs/css/basic.css"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleZip, 'basic.css')}"/>
The example above renders the following HTML:
<link rel="stylesheet" type="text/css" href="[generatedId]/basic.css"/>
Attribute Name | Attribute Type | Description | Required? | API Version | Access |
---|---|---|---|---|---|
id | String | An identifier that allows other components in the page to reference the stylesheet component. | 10.0 | global | |
value | Object | The URL to the style sheet file. Note that this can be a reference to a static resource. | Yes | 10.0 | global |