According to my understanding the following HTML markup should display a heart symbol, but it is not. What I am missing? I got the data about Unicode characters here: http://en.wikipedia.org/wiki/Html_special_characters#Character_entity_references_in_HTML
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hearts</title>
</head>
<body>
੩
</body>
</html>
You can enter any Unicode character in an HTML file by taking its decimal numeric character reference and adding an ampersand and a hash at the front and a semi-colon at the end, for example — should display as an em dash (—). This is the method used in the Unicode test pages.
The Unicode Standard has become a success and is implemented in HTML, XML, Java, JavaScript, E-mail, ASP, PHP, etc. The Unicode standard is also supported in many operating systems and all modern browsers.
The XML/HTML &#NNNN;
notation is for decimal values. Try using the &#xNNNN;
form to force it to interpret it as hexadecimal, or, alternatively, use the decimal value.
Encoded entities:
♥ ♥ ♥
♡ ❤ ❥
Output:
♥ ♥ ♥ ♡ ❤ ❥
Note the x
required.
Without the x
:੥ ੩
੩
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With