Help with a line of code please!

For several years, in order to change the colour of just ONE word in my site title, I used a simple line of font colour html and it has worked perfectly - see screen grabs:

19

which rendered the title as:
39
Since RW8 however, it also adds a bit of text and closing tag at the top left of the page:

What do I need to do to stop this?

Link please

It’s a live site and I have removed the colour code. I’ll add it again for an hour or so: https://theimpressions.co.uk

Cheers

Not at my Mac right now but you could try not using the <font> tag it was deprecated since html 4.01. Try a span with a style instead.

<span style="color:  x000;">
1 Like

try this: The <font color='9933CC'>Impressions</font> Party Band

1 Like

And if the code is still the same as posted, try amending the H1 to add in the font attributes as part of the H1 definition; not splitting the line; and omitting the quotes.

Best of all, define a style in CSS (ideally in a separate file, otherwise inline). Good luck!

1 Like

@teefers is correct. You need…

<span style="color:#9933CC">Impressions</span> 
2 Likes

This worked - simple as replacing double quotes with single ones. Excellent.

For reference the Span / Style approach has the same issue.

Many thanks everyone for taking the time - much appreciated.

You are welcome

You should not use the <font> tag. That is obsolete. You should be using the span tags… why is the span not working?

1 Like

Ok - the tag does work but the quotations MUST be single, not double. This is working:

The<span style='color:#9933CC'>Impressions</span> Party Band

This is not:
The<span style=''color:#9933CC''>Impressions</span> Party Band

Even thought deprecated, the tag also works with single quotations, but I guess no assurances it will continue to work going forward

Go with span. It’s the safe bet…

1 Like

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