Skip to content

HTML Tutorial Text Content

HTML Entities: Writing Special Characters Safely

Lesson 16 of 81 2 min read By Deepak Paswan Updated Oct 4, 2026

Some characters have a special meaning in HTML. The less-than sign < starts a tag. The ampersand & starts an entity. If you want to show these characters as text, you must write them as entities.

An entity starts with & and ends with ;.

index.html
HTML
<p>To start a paragraph, write &lt;p&gt;.</p>
<p>Tom &amp; Jerry</p>
<p>&copy; 2026 Juniper Books</p>
<p>Price: 5&nbsp;&euro;</p>

Common entities

You seeWriteName
<&lt;less than
>&gt;greater than
&&amp;ampersand
"&quot;double quote
(c)&copy;copyright
non-breaking space&nbsp;keeps two words together
euro&euro;currency

Numbers work too

Every character has a number. &#169; is also the copyright sign. This is how you can write a character your keyboard does not have.

You can often type the character directly

If your file is saved as UTF-8 and has <meta charset="UTF-8">, you can type é, ₹ or ✓ directly. Entities are only required for <, > and & in text.

warning
Using nbsp for layout
A non-breaking space is useful to keep “5 km” together on one line. It is not a way to indent text or create gaps. Use CSS for spacing.