/ javascript

Emoji in HTML and JS

Today I learned how to display emoji characters in HTML and JS.

So with reference to the Emoji's Unicode taken here: http://unicode.org/emoji/charts/full-emoji-list.html

U+1F600	

Which gives you: 😀

In javascript, you'll do:

console.log('\u{1F600}')

In HTML, you'll have to convert them to use this syntax:

😀

Here's a useful tool to convert Emoji symbols into various formats: http://www.endmemo.com/unicode/unicodeconverter.php

Happy Emojing 👻

Emoji in HTML and JS
Share this