Using Unicode in HTML Attributes

By Xah Lee. Date: . Last updated: .

Discovered that you can use Unicode in your HTML tag attribute values. Here's a sample HTML:

<title>Unicode in HTML Tag Attributes</title>
p.α {color:red}

<p class="α">yay!</p>


In the above, notice the greek alpha α character, used as attribute value.

This works in all latest versions of Firefox, Internet Explorer 8, Google Chrome, Safari, Opera, on Windows. (as of 2010-12)

You can use any other Unicode, including various bullets symbols, math symbols. For a sample list of Unicode chars.

See also: