Because its quiet around here I thought I’d just throw this out for fun
An old client just asked me if I could colour the last word in the heading of his site without changing the html. He wanted a quick fix as the html or content of the heading was not going to change.
I came up with one way of doing it but maybe you’d like to have a go on your own and see what you can come up with. Note that the html can wrap to multiple lines depending on screen size so the effect has to be maintained for wrapping lines and user font-size scaling
Simply (or not so simply) colour the last word only in this heading with css only.
<h1>Your test is to make the very last word in this heading to be a different colour</h1>
Here’s my attempt but don’t peak if you want to have a go yourself.
:first-letter but not
:last-word so don’t try looking for those:)
The solution is just for fun and not one to be used where content may change (that’s a hint ;)).