Skip to content
Laviyx Learn

Try

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.

Beginner3 min readUpdated
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":

HTML
<p>Use the <p> tag for paragraphs.</p>
Result

The browser reads <p> as a real tag, so it disappears and starts a new paragraph. To display it, write &lt; for < and &gt; for >:

HTML
<p>Use the &lt;p&gt; tag for paragraphs.</p>
Result

The essential references#

CharacterReferenceWhen you need it
<&lt;Always, when showing it as text
>&gt;Recommended alongside &lt;
&&amp;When it could be read as the start of a reference
"&quot;Inside an attribute value wrapped in double quotes
'&apos; or &#39;Inside an attribute value wrapped in single quotes
non-breaking space&nbsp;A space that does not collapse or wrap

Every reference starts with & and ends with ;.

HTML
<p>Tom &amp; Jerry</p>
<p>5 &lt; 10 and 10 &gt; 5</p>
<p title="He said &quot;hello&quot;">Hover over me.</p>
Result

Named and numeric references#

Characters can be written three ways:

StyleExample for ©
Named&copy;
Decimal number&#169;
Hexadecimal number&#xA9;
HTML
<p>&copy; 2026 Laviyx Learn &middot; Prices in &#8377; and &euro;</p>
<p>Arrows: &larr; &rarr; &uarr; &darr; &mdash; &hellip;</p>
Result

Numeric references work for any Unicode character, even ones without a name. For example, &#8377; 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 &nbsp;.

Common symbols#

SymbolNamed reference
©&copy;
®&reg;
™&trade;
€&euro;
£&pound;
×&times;
÷&divide;
— (em dash)&mdash;
…&hellip;

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
HTML
<p>Write &lt;br&gt; for a line break &amp; &lt;hr&gt; for a break in topic.</p>
<p>&copy; 2026 My Site</p>
Result

Key takeaway#

Finished this lesson?