# Template code question

**URL:** <https://discourse.nodered.org/t/template-code-question/58151>\
**Category:** General\
**Created:** [11 February 2022 13:46 UTC](https://discourse.nodered.org/t/template-code-question/58151 "2022-02-11T13:46:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [11 February 2022 13:46 UTC](https://discourse.nodered.org/t/template-code-question/58151/1 "2022-02-11T13:46:55Z")

</div>

I am quite new to witing code. could someone explain or show me why this works:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3507bc700845b672673bb6ee1cc9636ea5b2fd0.png)

```auto
<style>

[node-id="19d1fa033f658b1d"] .value {
    font-size: 30px;
}

[node-id="ba3de486c9d40a43"] .value {
    font-size: 30px;
}
 
[node-id="01f74cf08bd80c93"] .value {
    font-size: 30px;
}
 
 [node-id="6636a14649613644"] .value {
    font-size: 30px;
}
 
</style>

```

But this doesn't?:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/a/fa62252a99b09a8c9146758012f693b88bce9719.png)

```auto
<style>

[node-id="19d1fa033f658b1d"]
[node-id="ba3de486c9d40a43"]
[node-id="01f74cf08bd80c93"]
[node-id="6636a14649613644"]

.value {
    font-size: 30px;
}
 
</style>

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 February 2022 14:00 UTC](https://discourse.nodered.org/t/template-code-question/58151/2 "2022-02-11T14:00:12Z")

</div>

Grouping selectors in CSS requires them to be separated by a comma e.g...

```auto
<style>

[node-id="19d1fa033f658b1d"] .value,
[node-id="ba3de486c9d40a43"] .value,
[node-id="01f74cf08bd80c93"] .value,
[node-id="6636a14649613644"] .value
{
    font-size: 30px;
}
 
</style>

```

However, it is far more convenient to use classes

```auto
<style>
.large-text {
    font-size: 30px;
}
</style>

```

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [11 February 2022 14:02 UTC](https://discourse.nodered.org/t/template-code-question/58151/3 "2022-02-11T14:02:36Z")

</div>

Thank you for your answer. It worked.

Not sure how this works tho...

> [@Steve-Mcl](#):
>
> However, it is far more convenient to use classes

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 February 2022 14:03 UTC](https://discourse.nodered.org/t/template-code-question/58151/4 "2022-02-25T14:03:04Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
