# Inline colour change html for headers

**URL:** <https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705>\
**Category:** RapidWeaver Classic\
**Created:** [December 9, 2021, 8:12pm UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705 "2021-12-09T20:12:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [December 9, 2021, 8:12pm UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705/1 "2021-12-09T20:12:46Z")

</div>

Just to make life difficult, I have a client who wants individual words in an h2 header to be different colours.

Anyone recommend the best way to code this inline, and override the site-wide header settings? I need to use hex numbers rather than generic red, blue etc. Have done this with regular text but headers are more tricky for a non coder like myself. for the record, this project is using Source.

---

<div class="post-metadata">

**Author:** ![pmjd](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pmjd/32/18671_2.png) [@pmjd](https://forums.realmacsoftware.com/u/pmjd)\
**Post date:** [December 9, 2021, 8:30pm UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705/2 "2021-12-09T20:30:05Z")

</div>

Try Span tags round the individual words

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [December 9, 2021, 8:35pm UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705/3 "2021-12-09T20:35:43Z")

</div>

You could put spans around each word in the header, then either apply a class name or even inline css

```auto
<span class="word01">Word one</span> <span class="word02"> Word two</span>

```

CSS

```auto
.word01 { color: red; }
.word02 { color: blue; }

```

Replace the red and blue with the hex values.

---

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [December 13, 2021, 6:15pm UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705/4 "2021-12-13T18:15:04Z")

</div>

Thanks guys - much appreciated even thought the thought of multi-coloured text doesn’t fill me with great joy… 🤪

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [January 13, 2022, 4:15am UTC](https://forums.realmacsoftware.com/t/inline-colour-change-html-for-headers/41705/5 "2022-01-13T04:15:26Z")

</div>

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