Emoji are Unicode characters displayed pictorially. They behave like text but vary visually across platforms.
Usage guidelines
- Never rely on emoji alone for critical status—pair with words.
- Verify contrast when emoji sit on colored backgrounds.
- Remember screen readers announce descriptions inconsistently—test VoiceOver/NVDA.
Encoding
UTF-8 storage preserves emoji sequences (including skin-tone modifiers). Avoid stripping bytes in transit.
Emoji in controls
Prefer visible text labels; decorative emoji should not replace accessible names.
Cross-platform QA
Emoji sequences (skin tones, ZWJ families) break in older Windows—verify critical status lines with words, not pictographs alone.
Example — status row with redundant text
<p><span aria-hidden="true">✅</span> <strong>Deployed</strong> to production.</p>
Rendered output
Deployed to production.
Screen readers rely on “Deployed”; the glyph is supplementary.
Important interview questions and answers
- Q: What is the safest default character encoding for modern HTML?
A: UTF-8, declared early with `` and matched by server `Content-Type` headers. - Q: When are HTML entities still useful in UTF-8 pages?
A: For reserved characters (`&`, `<`) and contexts where explicit escaping avoids parser ambiguity. - Q: What is the key difference between HTML5 parsing and XHTML parsing?
A: HTML5 recovers from many errors; XHTML (XML) treats many parse errors as fatal.
Tip: Emoji need UTF-8; test rendering on target platforms.