# What does this "a { }" do to the code ?

**URL:** <https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497>\
**Category:** CMS Development\
**Tags:** free\
**Created:** [March 5, 2023, 7:00am UTC](https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497 "2023-03-05T07:00:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOchieng](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@DOchieng](https://community.hubspot.com/u/DOchieng)\
**Post date:** [March 5, 2023, 7:00am UTC](https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497/1 "2023-03-05T07:00:16Z")

</div>

% set primaryColor = ‘#F7761F’ %} {# defines variable and assigns HEX color #}  
a {  
color: {{ primaryColor }}; {# prints variable HEX value #}  
}

---

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [March 6, 2023, 7:40am UTC](https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497/2 "2023-03-06T07:40:47Z")

</div>

The code block you provided is using the Twig template engine syntax, which is commonly used in web development with PHP or other programming languages.

In this code, `{}` is an empty CSS selector, which means that the CSS rules inside the curly braces will be applied to all `<a>` tags in the HTML document.

The first line `{% set primaryColor = '#F7761F' %}` defines a Twig variable named `primaryColor` and assigns it the value `#F7761F`, which is a hexadecimal color code.

Then, the CSS rule `color: {{ primaryColor }};` is applied to all `<a>` tags. The `{{ primaryColor }}` syntax is used to print the value of the `primaryColor` variable, which is the hexadecimal color code `#F7761F`. Therefore, all `<a>` tags will have the text color set to `#F7761F`.

---

<div class="post-metadata">

**Author:** ![Stephanie-OG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stephanie-og/32/73267_2.png) [@Stephanie-OG](https://community.hubspot.com/u/Stephanie-OG)\
**Post date:** [March 6, 2023, 7:15pm UTC](https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497/3 "2023-03-06T19:15:37Z")

</div>

All very well explained and accurate, but just for anyone reading, the language is HubL and not Twig, although they’re both similar in that they’re based on Jinja.

But HubL is exclusive to HubSpot ([HubL Syntax](https://developers.hubspot.com/docs/cms/hubl)).

* * *

**Stephanie O’Gay Garcia**

[Freelance HubSpot CMS Developer](http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity)

[Website](http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity) | [Contact](http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity)

---

<div class="post-metadata">

**Author:** ![DOchieng](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@DOchieng](https://community.hubspot.com/u/DOchieng)\
**Post date:** [March 7, 2023, 4:39pm UTC](https://community.hubspot.com/t/what-does-this-a-do-to-the-code/76497/4 "2023-03-07T16:39:03Z")

</div>

It can’t get clearer than that,thank you himanshurauthan!
