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:

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

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

</body>
</html>

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: