HTML Symbols

Some characters have a special job in HTML, like < and >. Other characters, like the copyright sign, are not on the keyboard. To show them, we use HTML entities.

An entity starts with an ampersand &, then a name or a number, and ends with a semicolon.


Reserved characters

CharacterEntity nameMeaning
<&lt;Less than
>&gt;Greater than
&&amp;Ampersand
"&quot;Double quote
'&apos;Single quote
(space)&nbsp;Non-breaking space

If you want to show a tag like <p> as text on your page, write it as &lt;p&gt;. Otherwise the browser reads it as a real tag.


Popular symbols

SymbolEntity nameEntity number
©&copy;&#169;
®&reg;&#174;
™&trade;&#8482;
€&euro;&#8364;
£&pound;&#163;
¥&yen;&#165;
→&rarr;&#8594;
♥&hearts;&#9829;
<p>&copy; 2025 Tutorials Class. All rights reserved.</p>
<p>Price: &euro;50 &rarr; &pound;45</p>
Output in the browser

© 2025 Tutorials Class. All rights reserved.

Price: €50 → £45


Non-breaking space

HTML shows many spaces as one. &nbsp; forces a space that stays and also stops the line from breaking between two words. Do not use many of them to make gaps; use CSS margin and padding.

Read the interview question How to add the copyright symbol to a web page?


Summary

  • Entities show reserved characters and symbols.
  • Write them as &name; or &#number;.
  • Use &lt; and &gt; to show tags as text.
  • If your page uses UTF-8, you can also type many symbols directly.

Congratulations! Chapter Finished. Learn more about the similar topics:
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.