# Modifying head\_tag.html template

**URL:** <https://meta.discourse.org/t/modifying-head-tag-html-template/116012>\
**Category:** Development\
**Created:** [April 25, 2019, 9:06pm UTC](https://meta.discourse.org/t/modifying-head-tag-html-template/116012 "2019-04-25T21:06:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [April 26, 2019, 1:40am UTC](https://meta.discourse.org/t/modifying-head-tag-html-template/116012/4 "2019-04-26T01:40:11Z")

</div>

Thanks for clarifying.

What you want to do is actually possible in a theme. I initially thought you were trying to modify the existing tags in the document `<head>` tag that are added by Discourse.

A theme can add arbitrary tags to the document `<head>` tag without issues. That’s the purpose of the `head_tag.html` file that the Theme CLI generates.

The `head_tag.html` file correlates to the `</head>` tab in the theme editor

 ![theme1](https://global.discourse-cdn.com/meta/original/3X/2/e/2e1e729a08f26efcd1f9f2702b68823f1f620afc.png)

Any valid html you add there will be injected in the document `<head>` tag. Notice that I said injected - you don’t override the existing tags, your html just gets added to them. It would be added here (simplified screenshot)

 ![theme5](https://global.discourse-cdn.com/meta/original/3X/d/e/ded84eb72c65d9e300d0f545905147dd43b25fbd.png)

So if you want to add a `<link>` tag for a font like this one for example

```plaintext
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

```

you would just need to add it to the `head_tag.html` file that the Theme CLI generates and it should show up. (simplified screenshot)

 ![theme6](https://global.discourse-cdn.com/meta/original/3X/9/1/91076d61fb0d6f90eb41f5294f0daf3341c1906b.png)

Do note that unlike CSS changes, this requires a page refresh to actually work.

Let me know if you need any clarification.

---

_[View the full topic](https://meta.discourse.org/t/modifying-head-tag-html-template/116012)._
