What is the HTML entity code for ž
?
I am looking for something similar to »
instead of something like ž
.
What is the HTML entity code for ž
?
I am looking for something similar to »
instead of something like ž
.
There is no standard entity defined in HTML to represent the character ž
(U+017E); you can only use a numeric character reference like ž
(hexadecimal) or ž
(decimal).
But you can define such an entity for your document like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" [
<!ENTITY Zcaron CDATA "Ž" -- latin capital letter Z with caron,
U+017D ISOlat2 -->
<!ENTITY zcaron CDATA "ž" -- latin small letter z with caron,
U+017E ISOlat2 -->
]>
Now you can reference the entities Zcaron (representing Ž
) and zcaron (representing ž
) with Ž
and ž
respectively.
Or if you’re using a character set that contains that character (like Unicode’s character set), you can use a suitable character encoding (like UTF-8 in case of Unicode) to encode that character directly instead of using a character reference.
ž
My favourite lookup tool is LeftLogic's HTML Entity Character Lookup which allows you to find an entity based on visual similarity. In this case I typed in z
and got entity and numeric codes for all variations of Latin z and Greek zeta.