# Style tag in the same html page, instead of an external css file

**URL:** <https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303>\
**Category:** General\
**Created:** [June 5, 2021, 4:03pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303 "2021-06-05T16:03:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 5, 2021, 4:03pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/1 "2021-06-05T16:03:46Z")

</div>

Quick question:

When creating a new css rule, instead of linking & adding it to an external css file, is it possible to add them to a chosen “Style” tag in the head section? And have all css rules to go into this tag?

Possible currently with Pinegrow?

To clarify, Im asking about “[Internal CSS](https://www.w3schools.com/html/html_css.asp)” in the below image, I know the other two (inline & external) are supported oob by Pinegrow.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/c/cd315a6026f8170a53949677a217f6113a87db70.jpeg)

With best regards  
Akayy

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [June 5, 2021, 6:41pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/2 "2021-06-05T18:41:40Z")

</div>

EDIT: The advice below is WRONG!!! I totally didn’t realize this was possible. See my post below.

Hi @TechAkayy,  
No, you would have to cut and paste the rules from your stylesheet into the style tag.  
Sorry,  
Bob

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 6, 2021, 1:00am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/4 "2021-06-06T01:00:41Z")

</div>

Thanks @robm for the confirmation! Guessing its not covered in Pinegrow as its generally discouraged.

---

<div class="post-metadata">

**Author:** ![mxs](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/mxs/32/2943_2.png) [@mxs](https://forum.pinegrow.com/u/mxs)\
**Post date:** [June 7, 2021, 3:31pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/5 "2021-06-07T15:31:50Z")

</div>

Hi @TechAkayy  
If the style you are creating is only used on that page it makes sense **NOT** to add it to your main style.css.

You can do it using either Inline or Internal methods.

INTERNAL:

```auto
1. <style> b {color:red} </style> or.......
2. <style> .red {color:red} </style>
Then either
1. The predominant colour was <b>RED</b> or.....
2. The predominant colour was <b class="red">RED</b>

```

INLINE:

```auto
1. The predominant colour was <b style="color:red">RED</b>

```

If the style is used on multiple pages add it to your main css file

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 8, 2021, 12:23am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/6 "2021-06-08T00:23:45Z")

</div>

Thanks lot for the suggestions @mxs, ended up using a css file, easy to work with on PG

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [June 11, 2021, 1:10pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/7 "2021-06-11T13:10:14Z")

</div>

Hi @TechAkayy and @mxs,  
Gah!! I’m constantly learning new things about Pinegrow! If you add `<style></style>` tags to your head element, you can then add that as an inline stylesheet in your Styles panel. You need to type in any new classes or ids, but then can use the visual editor to add in your styling. Just found this feature from another user! You might already know this @mxs  
Cheers,  
Bob

post-note: At the moment this is behaving a little oddly. The styles aren’t properly showing in the Active tab, but we are working on it.

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 12, 2021, 9:00am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/8 "2021-06-12T09:00:54Z")

</div>

No worries @RobM. In fact my original question above is, if it was possible to make “inline” (style tag under head) as the default for new css rules (instead of an external style.css file)…

Visually, I wanted to know if “inline” was an option in these dropdown…

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/4/4767befef64ecf79f458460cbe1e54e276d83836.png)

![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/8a42a6915e69524a6dcc3f189efe3605a86e1be7.png)

… which I have realised is still not possible in Pinegrow, so your answer was still correct that I had to copy/paste from style.css to my inline style tag if I need to 😉

Interestingly, I noticed that attribute styles when converted to a class, can be added to **existing** classes either to external style.css (or) inline (if there was one) 😉

![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/875b5a454d6fd8d1269879d1d04539431722b18a.png)

This could be a new feature you could explore as the logic is already there in the background, which is “inline” is sort of considered as yet another stylesheet within the styles panel…

![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/d/d067ac8e22c6e3873e87a4144c26e1cb99c398f0.png)

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 12, 2021, 9:01am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/9 "2021-06-12T09:01:36Z")

</div>

> [@RobM](#):
>
> post-note: At the moment this is behaving a little oddly. The styles aren’t properly showing in the Active tab, but we are working on it.

Thanks for sorting this out 👍🏾

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [June 12, 2021, 9:12am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/10 "2021-06-12T09:12:30Z")

</div>

And yeah, the word “inline” could slightly be confusing when used to refer the two ways - styling using attributes & styling using a style tag under head tag…

…what we are talking above is in fact “internal” as per [w3schools.com](http://w3schools.com), but I’m not sure about the right terminologies!

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [June 12, 2021, 9:23am UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/11 "2021-06-12T09:23:03Z")

</div>

@TechAkayy,  
Yeah, my fault. to many different conversations at once. I should have used internal, not inline. Pinegrow lists it incorrectly as (inline).  
Cheers,  
Bob

---

<div class="post-metadata">

**Author:** ![mxs](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/mxs/32/2943_2.png) [@mxs](https://forum.pinegrow.com/u/mxs)\
**Post date:** [June 12, 2021, 2:43pm UTC](https://forum.pinegrow.com/t/style-tag-in-the-same-html-page-instead-of-an-external-css-file/5303/12 "2021-06-12T14:43:11Z")

</div>

It really doesn’t matter if you use internal or inline.

```auto
internal <style><style> in the head section should always follow the main external file.

```
