See how easily you can add characters like ♥ into your Web pages
Saturday December 27, 2008
You might be surprised at how easy it is to add special characters like ♥ and № into your Web pages with just a few steps. In fact, often the hardest part of adding HTML codes to your Web pages is finding the character you want to add - once you know the code, adding it is easy.


Comments
Okay, spill it… which one has the heart. I looked, I swear!
If you had viewed the source of the page you would have easily found that the heart is & #x2665; (without the space) and that the font colour is set to red in order for a red heart to display rather than a black one.
ps. I did a find on a few of the preceding words in order to find it.
Okay, while Steve is correct, the hex code for the heart is ♥ - the rest of the suits are found in the punctuation page - at the very bottom. It also has musical notes, arrows, and the male and female signs (some of these don’t work in IE). I suppose I should call those out in a separate page - but I couldn’t decide what to call them. Any suggestions?
Thanks. I had scrolled to the end of the first table and thought it was the whole page. I am posting from a Mac now (using Firefox) and the heart just shows up as a line. It showed up as a heart the first time I looked at this post in Firefox for Windows.
Sue: that is a really good point. I didn’t test that blog entry on my Mac (and I should have). Not all special character codes are supported by all browsers and operating systems. As I mention in my article How to Use HTML Codes for Special Characters testing is very important.
The issue with Firefox not showing the “suits” symbols on a mac is a known bug with the browser. It affects Firefox 1.0-2.0. The bug was reported as fixed in the last week and will be fixed in version 3. I don’t know if the fix will be seen before then. Camino, reportedly doesn’t have the issue for those preferring the Gecko rendering engine over WebKit (Safari).
John: interesting - I browse with Firefox 2.0 and 1.5 and I can see the suits symbols just fine.
I really like to use the HTML characters, all over the place. I’m especially addicted to the em-dash character (/& #8212;).
Its probably a bad habit, but still
By the way,
In the “Math” section of the character codes, the square-root sign has a shorthand that isn’t listed, &racic; ( & radic; )
That should be, √ (& radic;)
perhaps the code may work in your web page, but it was rendered with a question mark in the RSS feed for this post:
“See how easily you can add characters like ? into your Web pages”
That’s because the programmers who wrote the code that builds my RSS feed did not do the (difficult, I’ll readily admit) coding required to double encode characters like that for RSS.
Hi…
I agree with Jennifer.I didn’t test that blog entry on Mac (and I should have). Not all special character codes are supported by all browsers and operating systems.