HTML Basics
HTML Entities
Some characters have special meaning in HTML or cannot be typed easily. HTML entities are codes that let you display these characters safely and reliably.
What are HTML Entities?
An HTML entity is a code that represents a character. It starts with an ampersand (&) and ends with a semicolon (;). For example, < displays a less-than sign. Entities are needed for reserved characters and for symbols not on your keyboard.
The characters <, >, and & are reserved because HTML uses them for tags and entities. To show them as text, you must use their entity codes, otherwise the browser tries to interpret them as markup.
Basic Usage
<p>To write a paragraph tag, type <p> in your text.</p>Common HTML Entities
| Character | Entity | Description |
|---|---|---|
| < | < | Less-than sign |
| > | > | Greater-than sign |
| & | & | Ampersand |
| " | " | Double quote |
| (space) | | Non-breaking space |
| © | © | Copyright |
| ® | ® | Registered trademark |
| ₹ | ₹ | Indian Rupee sign |
| → | → | Right arrow |
Example: Entities in Action
<!DOCTYPE html>
<html>
<body>
<p>5 < 10 and 10 > 5</p>
<p>Tom & Jerry</p>
<p>© 2026 MyInternships.in</p>
<p>Price: ₹499 → now ₹299</p>
</body>
</html>More Examples
<p>Call us at 10 AM sharp.</p>
<p>The number 1 000 000 will not wrap awkwardly.</p><p>The tag <code><a href="..."></code> creates a link.</p>A non-breaking space ( ) stops the browser from splitting two words across lines, useful for things like "10 AM" or a name and title.
Always escape & as & in your text, even inside URLs written in the page. An unescaped & followed by letters may be read as the start of an entity.
Key Takeaways
- Entities start with & and end with ; (e.g. ©).
- Use <, >, and & for the reserved characters < > and &.
- is a non-breaking space that prevents line wrapping.
- Entities let you show symbols not found on your keyboard.
