Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html Entity code for ž

What is the HTML entity code for ž?

I am looking for something similar to » instead of something like ž.

like image 325
Castor Avatar asked Dec 07 '22 03:12

Castor


2 Answers

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 "&#381;"  -- latin capital letter Z with caron,
                                        U+017D ISOlat2 -->
    <!ENTITY zcaron  CDATA "&#382;"  -- latin small letter z with caron,
                                        U+017E ISOlat2 -->  
]>

Now you can reference the entities Zcaron (representing &#381;) and zcaron (representing &#382;) with &Zcaron; and &zcaron; 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.

like image 88
Gumbo Avatar answered Mar 01 '23 06:03

Gumbo


&#382;

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.

like image 29
e100 Avatar answered Mar 01 '23 08:03

e100