On this page
HTML Entities & Special Characters
HTML Entities & Special Characters
Focus Keyword: html entities | Trending Keyword: html special characters list
HTML entities let you safely display reserved characters (like < and >) and special characters that aren't easily typed on a keyboard. Every entity begins with an ampersand & and ends with a semicolon ;. Searches for an "html special characters list" spike constantly among developers who need quick reference tables like the one below.
Why Use Entities?
- To display reserved HTML characters (<, >, &, ", ') without breaking the markup.
- To insert characters not present on a standard keyboard (©, €, ♥).
- To ensure consistent rendering across browsers and encodings.
Entity Syntax
There are three ways to write an entity:
- Named entity:
©→ © - Decimal numeric reference:
©→ © - Hexadecimal numeric reference:
©→ ©
Essential Reserved Character Entities
| Character | Entity Name | Numeric | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quote |
| ' | ' | ' | Single quote/apostrophe |
| |   | Non-breaking space |
When You Must Use Entities
If you want a literal "<" to appear as text on the page (not be interpreted as the start of a tag), you MUST use <. Typing a raw "<" in content will confuse the browser's HTML parser.
Common Mistakes
- Forgetting the trailing semicolon (some browsers tolerate it, but it's invalid and unreliable).
- Double-escaping ampersands, producing
&amp;. - Using raw "&" in URLs instead of "&" inside HTML attribute values.
Press Run to execute.
Press Run to execute.
Press Run to execute.
Rewrite the following text so it displays correctly as literal text in a browser, using proper HTML entities: Use <div> & <span> tags for "layout".
Press Run to execute.
This is a self-check — compare your result with the expected output above.
Was this page helpful?