html
/

HTML Entities: Display Reserved Characters

Last Sync: Today

On this page

10
0%
5 min read
Remaining
5 minleft

Click any section to jump — progress syncs automatically

html

HTML Entities: Display Reserved Characters

What are HTML Entities?

HTML entities are used to display reserved characters and special symbols in HTML. These characters cannot be typed directly because they are part of HTML syntax.

Basic Syntax

HTMLRead-only
1
&entity_name;  or  &#entity_number;

Common Entities

CharacterEntity NameEntity Number
<&lt;&#60;
>&gt;&#62;
&&amp;&#38;
"&quot;&#34;
'&apos;&#39;
&nbsp;&#160;

Example Usage

HTMLRead-only
1
<p>5 &lt; 10</p>
<p>Tom &amp; Jerry</p>
<p>Use &quot;quotes&quot; here</p>

Non-Breaking Space

  is used to add extra spaces that do not break into a new line.

HTMLRead-only
1
<p>Hello&nbsp;&nbsp;World</p>

Symbols and Emojis

HTMLRead-only
1
<p>Copyright &copy; 2026</p>
<p>Euro &euro;</p>
<p>Heart &#10084;</p>

Why Use Entities?

  • Display reserved characters safely
  • Avoid HTML parsing errors
  • Show special symbols and emojis
  • Ensure cross-browser compatibility

Best Practices

  • Use entities for reserved characters
  • Prefer named entities for readability
  • Use numeric codes when needed
  • Avoid excessive use of non-breaking spaces

Common Mistakes

  • Forgetting semicolon (;)
  • Using raw reserved characters in HTML
  • Overusing   for layout
  • Mixing entity formats unnecessarily

Conclusion

HTML entities help safely display special characters and symbols. Proper usage prevents errors and improves readability.

Try it yourself

<p>5 &lt; 10</p>
<p>Tom &amp; Jerry</p>

Test Your Knowledge

Q1
of 3

Which entity represents < ?

A
&lt;
B
&gt;
C
&amp;
D
&copy;
Q2
of 3

What does &amp; represent?

A
<
B
&
C
>
D
"
Q3
of 3

What is &nbsp; used for?

A
Line break
B
Space
C
Tab
D
New line

Frequently Asked Questions

Why use &lt; instead of < ?

Because < is reserved for HTML tags.

What is &nbsp;?

It creates a non-breaking space.

Can I use numeric codes?

Yes, both named and numeric entities are supported.

Previous

html comments

Next

html quotations

Related Content

Need help?

Explore our comprehensive docs or start a chat with our tech experts.