<p>In Craft there's <a href="https://craftcms.com/docs/templating/includejsfile" rel="nofollow"><code>{% includeJsFile %}</code></a> and <a href="https://craftcms.com/docs/templating/includecssfile" rel="nofollow"><code>{% includeCssFile %}</code></a> which get injected on the <code>getHeadHtml()</code> and <code>getFootHtml()</code> functions on your templates.</p>

CC BY-SA 3.0
2016-04-10T16:51:38.687Z
2016-04-10T20:16:55.803Z
2016-04-10T20:16:55.803Z
Xpertbot
<p>Is there a helper tag to output a complete stylesheet link.</p>

<p>I used helper tag for lack of knowledge. Helper tag is used in Statamic.</p>

<p>In Statamic <code>{{ theme:css src="style" tag="true" }}</code> outputs</p>

<p><code>&lt;link rel="stylesheet" href="/site/themes/redwood/css/style.css" /&gt;</code></p>

<p>I've seen <code>&lt;link rel="stylesheet" type="text/css" href="{{ siteUrl }}assets/css/happylager.css"&gt;</code> in Happy Lager's template but I'm looking for something shorter.</p>

<templating>
Shortest code to link to CSS and JS file
# Shortest code to link to CSS and JS file

(Asked by: username_0 on 2016-04-10)

Is there a helper tag to output a complete stylesheet link.

I used helper tag for lack of knowledge. Helper tag is used in Statamic.

In Statamic `{{ theme:css src="style" tag="true" }}` outputs

I've seen  in Happy Lager's template but I'm looking for something shorter.

**Tags:** templating

---

## 1 answers

### Answer by username_1 on 2016-04-10. Score: 2 | Accepted answer

In Craft there's [`{% includeJsFile %}`](https://craftcms.com/docs/templating/includejsfile) and [`{% includeCssFile %}`](https://craftcms.com/docs/templating/includecssfile) which get injected on the `getHeadHtml()` and `getFootHtml()` functions on your templates.


---

