# How to load CSS files?

**URL:** https://talk.observablehq.com/t/how-to-load-css-files/101
**Category:** Uncategorized
**Created:** [February 1, 2018, 1:42am UTC](https://talk.observablehq.com/t/how-to-load-css-files/101 "2018-02-01T01:42:49Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![tom](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/tom/32/2262_2.png) [@tom](https://talk.observablehq.com/u/tom)
#### Post date: [February 1, 2018, 2:50am UTC](https://talk.observablehq.com/t/how-to-load-css-files/101/2 "2018-02-01T02:50:39Z")

</div>

Yep! It’s all just good ol’ HTML and JavaScript, so a link element, how you’d expect, is the way to go. From what I see in your notebook:

```auto
css = {
    var link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = "https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.18/c3.css";
    return document.getElementsByTagName("head")[0].appendChild(link);    
}

```

You can shorten this to

```auto
html`<link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.18/c3.css" rel="stylesheet" />`

```

Thanks to some fine points of [HTML5](https://www.w3.org/TR/html5/links.html#body-ok), stylesheet links don’t have to be in the `<head>` anymore and can be anywhere in the document.

---

_[View the full topic](https://talk.observablehq.com/t/how-to-load-css-files/101)._
