HTML course menu
HTML Entities and Character References: Showing <, > and & and Special Symbols
Learn HTML character references (entities): how to display < > & and quotes in HTML, named and numeric references, non-breaking spaces, common symbols such as © ₹ and €, and when you can just type the character in UTF-8.
On this page
Some characters have a special job in HTML. The < character starts a tag and & starts a character reference, so if you want to show them as text you need another way to write them. That way is a character reference, often called an entity.
The problem#
Suppose you want a page to say "Use the <p> tag for paragraphs":
<p>Use the <p> tag for paragraphs.</p>The browser reads <p> as a real tag, so it disappears and starts a new paragraph. To display it, write < for < and > for >:
<p>Use the <p> tag for paragraphs.</p>The essential references#
Every reference starts with & and ends with ;.
<p>Tom & Jerry</p>
<p>5 < 10 and 10 > 5</p>
<p title="He said "hello"">Hover over me.</p>Named and numeric references#
Characters can be written three ways:
<p>© 2026 Laviyx Learn · Prices in ₹ and €</p>
<p>Arrows: ← → ↑ ↓ — …</p>Numeric references work for any Unicode character, even ones without a name. For example, ₹ is the Indian rupee sign ₹ (Unicode U+20B9; there is no widely supported named reference for it).
Just type the character#
With <meta charset="utf-8"> in your page and the file saved as UTF-8, you can type most characters directly: ©, ₹, €, é, 😊, हिन्दी. This is easier to read than references.
You still need references for:
<and&in text, because they have special meaning.- Quotes inside attribute values that use the same quote.
- Invisible characters that are hard to see in an editor, such as
.
Common symbols#
Common mistakes#
Practice#
Practice exercise
Display this exact sentence on a page: Write <br> for a line break & <hr> for a break in topic. Then add a footer line reading "© 2026 My Site".
Show solution
<p>Write <br> for a line break & <hr> for a break in topic.</p>
<p>© 2026 My Site</p>Key takeaway#
Finished this lesson?