There’s also an issue if you want to put a character on your page that already has a use in HTML. For example, HTML will interpret angle brackets (< and >) as the start and end of a tag, so you can’t write one in HTML as you would a letter or number character. It won’t display and may cause problems with the page.
The solution to both of these issues is to use HTML entities. In this post, you’ll learn how to use HTML entities to insert special characters on your page. We’ll also list some common symbols and their entities so you can easily place them in your document.
How to Write HTML Symbols
To add symbols in HTML, developers use HTML entities. An HTML entity is a special string (a series of characters) that starts with an ampersand (&), ends with a semicolon (;), and contains either the entity name or entity number for a particular symbol. Many symbols have reserved HTML entities.
To place entities, you can type them in or paste them from a list (like the one below). For entities that have names, it’s easy to remember and type them in. However, some older browsers may not process the entity name. Use the entity number to guarantee that your entity displays properly on all browsers.
HTML Symbols List
Sometimes, you can remember an HTML entity from its name. Other times, you’ll have to look it up. To help you out, here’s a list of common symbols along with their HTML entities in name and number formats:
Most of the time, you should be able to write blocks of text without an issue. On occasion, however, it helps to know how HTML entities work and how to work them into your pages. It’s another handy tool for web developers and content creators, and knowing it will get you one step closer to HTML mastery.
Originally published Jun 6, 2022 7:00:00 AM, updated June 06 2022