HTML Entities
Learn what HTML entities are and how to use them to display special characters correctly in web pages.
HTML entities are used to display reserved or special characters that cannot be typed directly in HTML.
Why Entities Are Needed
Some characters have special meaning in HTML, such as < and >.
Example (incorrect):
<p>5 < 10</p>
Correct using entity:
<p>5 < 10</p>
Common HTML Entities
& <!-- & -->
< <!-- < -->
> <!-- > -->
" <!-- " -->
' <!-- ' -->
Important Notes
- Entities start with
&and end with; - Prevents HTML parsing issues
- Improves content accuracy
Was this helpful?
Thanks for your feedback!