---
title: "stylesheet"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/tag/stylesheet'
  md: 'https://developer.shopline.com/docs/sline/tag/stylesheet.md'
---

# stylesheet


    Generates a `<link />` tag for a given CSS resource URL. 

    



```sline
{{#stylesheet url [preload=boolean] [media=string] /}}
```





    
        ## Required params

        
             `url` `string`\: The CSS resource URL.
        
    



    
## Optional params

        
            - `preload` `boolean`\: Whether to enable preloading. If set to `true`, the resource URL is added to the HTTP `Link` response header; if set to `false`, it is not added.
        
            - `media` `string`\: The media query condition. For example, `screen`, `print`, or `(max-width: 600px)`.
        
    



    
## Example

        
            

            Generate a stylesheet link for a CSS file within the theme.

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
{{#stylesheet "base/index.css" | asset_url() /}}
```
</SlineExample>
            
        
    
