There is a great resource out on W3.org that lists all the HTML Character Entities. You can see it here:
https://dev.w3.org/html5/html-author/charref
To use them, you enter the HTML Character Entities either by the name of the entity (such as ©) or the decimal code of the entity. For example, the following will give you the same thing – that is, the copyright symbol:
<p>This is a copyright symbol: ©</p>
<p>This is a copyright symbol: & #169;</p>
PLEASE NOTE: There is an extra space between the ampersand and the pound sign because WordPress went ahead and printed the actual character instead of the data. Don’t use the space!
I prefer the first method, since it gives you at least a clue as to the kind of character that will print out.
But that got me to wondering: What about the entities that don’t have an associated name? Are there any? What would it take to look at them?
To answer that, I created a quick short and simple web page that will display all the character codes from Number 0 to Number 120,831. No, there’s not really that many entities – it’s just that the characters are spread out all over the place, and that was the highest numbered one that I found.
If you want to see ALL the character entities, check out this web page that I’ve hung off of my Boring JavaScript web site:
https://www.boringjavascript.com/html-character-reference/index.html
You first select the size of the font to use. Next, select a group of ten thousand entities from the “Ten Thousands” group. Finally, select a group of five-hundred from the “Thousands” group. The page will generate five hundred codes for you, showing the character itself and the “&” version of the character. No need to know the names – if you see a character you like, just use the number like the second example above and you have your character.
How about all those “square box” ones? Those are invalid entity numbers. I haven’t figured out a way to get rid of them while generating the table. If you wish to give it a try, I have a GitHub site with the code. Feel free to fork, make the change, and send in a Pull request.
https://github.com/TheVirtuoid/html-character-reference
Have fun! See you around.
Don’t forget to subscribe to my blog here, my YouTube channel, my Facebook page, any of my GitHub repositories, or my Twitter feed. Links are on this page and on the home page of this blog. You will always be welcomed (as long as you stay nice).
Categories: HTML
thevirtuoid
Web Tinkerer. No, not like Tinkerbell.
Creator of the game Virtuoid. Boring JavaScript. Visit us at thevirtuoid.com
Leave a Reply