Skip to content
Justice Tech School

Symbols and Emojis

With UTF-8, you can type symbols and emoji directly, or use their numbers such as ☃ for a snowman. Emoji are characters, so they scale with the font size and take the text colour as a fallback.

Give meaningful emoji an accessible label with role="img" and aria-label, and hide purely decorative ones with aria-hidden="true".

Example
<p style="font-size: 32px">
  <span role="img" aria-label="rocket">&#128640;</span>
  <span aria-hidden="true">&#10024;</span>
</p>

Exercise

Label the emoji for screen readers.

<span role="img" ="star">&#11088;</span>

Quiz Test

How should a purely decorative emoji be treated?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.