user1593881
user1593881

Reputation:

Colored characters in HTML title

Using Firefox I stumbled upon a page with differently colored characters in the title. How to insert colored characters into a HTML <title> tag? What is this standard called?

Update: Apparently it has something to do with the (UTF?) heart emojis characters. Here is the screenshot:

Different colors

Instructions on how to insert those can be found here. I made a test Facebook post and it really renders hearts of different colors in Firefox title.

Upvotes: 5

Views: 3299

Answers (3)

Roko C. Buljan
Roko C. Buljan

Reputation: 206111

Unicode. Icon symbols AKA: Pictographs ā˜•, Emojis šŸ˜‚.

Symbol HEX code Description
āœ &#x270d; Pictograph
āœļøŽ &#x270d;&#xfe0e; Pictographs as Standardized Variant

To use them in your Title:

<title>Hearts &#x1F499;&#x1F49A;&#x1F49B;</title>

Hearts šŸ’™šŸ’ššŸ’›

Don't forget that if you have some transportation website and you used this character ā›Ÿ &#x26df; for your "ā›Ÿ Order now!" button - watch out! Tomorrow it could shine in the competitor's colors ā€” so use the standardized variant: ā›ŸļøŽ &#x26df;&#xfe0e; - or rather a custom SVG or Font-icon that matches the brand needs.

PS:
Don't use transform: rotate(Ndeg); ā˜œ ā˜ ā˜ž ā˜Ÿ it's just matter of time ;)

Upvotes: 9

ImposterMo
ImposterMo

Reputation: 1

The colors are like blinking text you need escape character like \033 or \x1b

PS1='-e ImposterMO@$(pwd)Ģµt_ '

Upvotes: -2

Luiz Gon&#231;alves
Luiz Gon&#231;alves

Reputation: 547

This isn't colored chars... This is emojis :)

You should use some emoji-support plugin, like this:

https://afeld.github.io/emoji-css/

In addition, you will need to add emoji dynamically in the title (using jQuery, for example), as you will need to load the library first.

Upvotes: 0

Related Questions