HTML Concepts →
Docs / HTML / Entities
Entities
+1
Published Mar 22, 2022 • Updated Oct 11, 2023
Contribute to Docs
Entities are character sequences placed in the
text of an HTML document to print out reserved
characters which may otherwise be interpreted
as HTML code by a browser, or other special
characters that would be di!cult to generate
with a typical keyboard. In fact, using reference
numbers, an entity can represent any Unicode
character. When parsing the HTML, a browser
replaces the entity’s character sequence with
the character it represents.
Syntax
Entities are case-sensitive and can take one of
three forms.
The "rst form references an entity by name:
&name;
The second form references it by the decimal
Unicode number:
&#number;
The third represents it with the hexadecimal
Unicode number, often with leading zeros:
&#xnumber;
So the copyright entity ( © ) can be represented
as © , © or © .
Entity Values
There are many HTML entities. The following are
some common ones:
2nd
Entity Name 1st Form 3rd Form
Form
Non-breaking
   
space
Less-than sign
< < <
<
Greater-than
> > >
sign >
Ampersand & & & &
Quote " " " "
Apostrophe ' ' ' '
Copyright © © © ©
Degree ° ° ° °
Euro € € € €
Bullet
• • •
character •
More can be found in this extensive HTML 5
entity reference.
The Tab Entity
There is an entity 	 (or 	 ) which
nominally produces a tab character. However, it
will not behave as expected because HTML
collapses whitespace where it appears in text
with the exception of the non-breaking space
entity, . So to render a tab in HTML text,
it needs to be wrapped within a <pre> tag to
preserve the whitespace.
<p>The tab entity 	 in this sentence
<pre>
<p>The tab entity 	 in this sentenc
</pre>
Output:
Alternatively, four entities can be used.
<p>The Tab entity 	 in this sentence
<p>The spaces in
Entities
Greek Symbols
Used in scienti"c, mathematical, and
technological applications.
All contributors
@StevenSwinia… @Conor12_
Looking to contribute?
Learn more about how to get involved.
Edit this page on GitHub to "x an error
or make an improvement.
Submit feedback to let us know how we
can improve Docs.
Learn HTML on Codecademy
Career path
Front-End Engineer
Front-end engineers work closely with designers to
make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certi"cation
Beginner Friendly 115 hours
Free course
Learn HTML
Start at the beginning by learning HTML basics — an
important foundation for building and editing web
pages.
Beginner Friendly 7 hours
Back to top
Company Plans
For individuals
About
For students
Careers
For teams
A!liates
Discounts
Community
Resources Clubs
Articles Code Crew
Blog Discord
Cheatsheets Events
Code challenges Forums
Docs Learner Stories
Projects
Videos
Workspaces
Support
Help Center
Subjects Languages
AI Bash
Cloud Computing C
Code Foundations C++
Computer Science C#
Cybersecurity Go
Data Analytics HTML & CSS
Data Science Java
Data Visualization JavaScript
Developer Tools Kotlin
DevOps PHP
Game Development Python
IT R
Machine Learning Ruby
Math SQL
Mobile Development Swift
Web Design
Web Development
Career building Mobile
Career paths
Career center
Interview prep
Professional certi"cation
Compare to bootcamps
Full Catalog
Beta Content
Roadmap
Privacy Policy | Cookie Policy |
Do Not Sell My Personal Information | Terms
Made with in NYC © 2024 Codecademy