3 min read · Free · No login needed
Some characters are special in HTML. The browser reads < as "a tag is starting" and & as "an entity is starting". So if you want the visitor to actually see a less-than sign or an ampersand on the page, you cannot just type it — you write a small code called an entity instead. An entity starts with &, has a name (or a number), and ends with a semicolon.
Try writing "5 < 10 is true" by typing the real characters, and the browser will try to read < 10 as a tag — and the text will vanish or break the page. The same happens with &: the browser waits for an entity name, and a bare ampersand can swallow the text after it. Entities exist so that what you write is what the visitor sees, no matter what the characters mean to HTML itself.
| Entity | Shows | When to use it |
|---|---|---|
& | & | Any time you show an ampersand: "Tom & Jerry", "Q&A". |
< | < | Showing a less-than sign, or showing HTML code as text. |
> | > | Showing a greater-than sign, or closing a code example. |
" | " | A double quote inside an attribute value that uses double quotes. |
' | ' | An apostrophe inside an attribute value that uses single quotes. |
| a space that never breaks | Keeping two words on the same line, like "₹ 500" or "Mr. Sharma". |
© | © | The copyright line at the bottom of a page. |
® | ® | A registered trademark, after a brand name. |
™ | ™ | A trademark, after a brand name. |
is a space that the browser will never break across two lines. It is useful for keeping a number with its unit ("10 kg") or a title with a name ("Mr. Sharma"). But it is not a tool for layout: if you need a gap, use CSS margin or padding. A row of ten entities to push text across the page is a hack that breaks the moment the screen size changes.
& without the semicolon is not an entity — some browsers will still guess what you meant, but others will print it literally. Always write the full code: ampersand, name, semicolon.< in page text — the browser reads it as a tag and the text disappears.© is not the same as ©. for layout spacing instead of CSS margin or padding.& where a plain & in a URL would do — inside an href, an ampersand between parameters should be & too, or the link can break.Tom & Jerry — shows "Tom & Jerry". A plain & here could confuse the browser, so the entity is the safe way.5 < 10 is true — shows "5 < 10 is true". Without the entity, the browser would try to read < 10 as a tag.10 > 5 is also true — shows "10 > 5 is also true", the mirror image of the line above.© 2026 KAMALDNP Academy — shows "© 2026 KAMALDNP Academy", the standard copyright line.Price: ₹500 only — the non-breaking space keeps "₹500" and "only" on the same line, so the price never splits across lines.<!DOCTYPE html>
<html>
<head>
<title>Entities</title>
</head>
<body>
<h1>Characters That Need Entities</h1>
<p>Tom & Jerry is a famous cartoon.</p>
<p>5 < 10 is true, and 10 > 5 is also true.</p>
<p>Price: ₹500 only.</p>
<p>© 2026 KAMALDNP Academy. All rights reserved.</p>
</body>
</html>
Change the code below and press Run to see the result instantly. No file to save, no login needed.
The questions learners ask most about this lesson — read the question, then open it to see the answer.
A small code that starts with an ampersand, has a name or number, and ends with a semicolon, used to show special characters.
The browser reads it as a tag starting, so the text can vanish or break the page.
The copy entity shows ©, used for the copyright line at the bottom of a page.
AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.
Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testPrefer watching? Video courses teach the same topics step by step.
Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Download karne ke liye login karo. Login ke baad yahi page pe rahoge!
Naya ho? Register karo →