-
Hajipur, Bihar, 844101
HTML entities are special codes used to display reserved characters or symbols in HTML that would otherwise be interpreted as HTML code. They help show characters like <
, >
, &
, or special symbols such as ©
, ®
, £
, etc.
To display characters reserved by HTML (like <
and >
)
To show special symbols not available on keyboard
To avoid conflicts with HTML parsing
Named Entity: &entity_name;
Example: <
for <
Numeric Entity: &#number;
(decimal)
Example: <
for <
Hexadecimal Entity: &#xhex_number;
Example: <
for <
Symbol | Named Entity | Decimal | Hexadecimal | Description |
---|---|---|---|---|
< | < |
< |
< |
Less than |
> | > |
> |
> |
Greater than |
& | & |
& |
& |
Ampersand |
" | " |
" |
" |
Double quote |
' | ' * |
' |
' |
Single quote (apostrophe) |
© | © |
© |
© |
Copyright symbol |
® | ® |
® |
® |
Registered trademark |
€ | € |
€ |
€ |
Euro sign |
*Note: '
is not supported in older versions of HTML but works in XHTML and HTML5.
<p>Use <strong> to make text bold.</p>
<p>Price: €100</p>
<p>Copyright © 2025 My Website</p>
<p>Use & to display an ampersand.</p>
Q1. Write HTML to display <html>
tags on a page using entities.
Q2. Show the text: Tom & Jerry
correctly with the ampersand.
Q3. Display the copyright symbol © using entities.
Q4. Write a paragraph that includes quotes "Hello"
using entities.
Q5. Show the registered trademark symbol ® in HTML.
Q6. Use numeric entity to display less than <
symbol.
Q7. Display an email address with @
sign properly escaped.
Q8. Show the Euro sign € using a named entity.
Q9. Encode a sentence with multiple special characters: <
, >
, &
.
Q10. Create a list showing different quotation marks using HTML entities.
Q1: What does < represent?
Q2: Which entity represents the ampersand?
Q3: How do you write the copyright symbol using an entity?
Q4: What is the numeric entity for the less than symbol <?
Q5: Which entity shows the Euro currency sign?
Q6: Which is NOT a correct way to write an HTML entity?
Q7: The entity " is used for which character?
Q8: What does the ' entity represent?
Q9: Which of the following is the hexadecimal form of >?
Q10: Why use HTML entities?