Kanbritech Learn logo
HTML HTML Tutorial 45h track

HTML Emojis

Add a decorative celebration emoji before the words Course completed.

Understand the topic

Emoji are Unicode characters that browsers render using available fonts or system artwork. Their appearance varies across devices, and some emoji consist of several code points. Decorative emoji can be hidden from assistive technology when nearby text already communicates the meaning. Meaningful emoji need an accessible description so their intended use is understandable.

Worked example

<p><span aria-hidden="true">&#127881;</span> Registration complete.</p>
<p><span role="img" aria-label="Celebration">&#127881;</span></p>

The first emoji is decorative because the sentence states the result. The standalone emoji receives a text alternative through aria-label.

Practice

Add a decorative celebration emoji before the words Course completed.

Show a suggested answer
<p><span aria-hidden="true">&#127881;</span> Course completed.</p>

Common mistake

Do not use emoji as the sole label for an unfamiliar action. Different systems and users may interpret the artwork differently.

HTML documentation

Live Example

Try Coding

Result