« Previous
Next »
HTML Entities
In HTML, entities are used to represent special characters that might
otherwise be interpreted as HTML code or that are not easily typed on a
standard keyboard. These entities usually start with an ampersand
(&) and end with a semicolon (;). Below is a list of some common
HTML entities and their corresponding character.
Basic HTML Entities
- & - & (ampersand)
- < - < (less-than)
- > - > (greater-than)
- " - " (double quotation mark)
- ' - ' (apostrophe or single quotation mark
Accented Characters
- á - á
- é - é
- í - Ã
- ó - ó
- ú - ú
- ñ - ñ
- ö - ö
- ü - ü
Mathematical Symbols
- ± - ± (plus-minus)
- × - × (multiplication)
- ÷ - ÷ (division)
- ≤ - ≤ (less-than or equal to)
- ≥ - ≥ (greater-than or equal to)
Currency Symbols
- $ - $ (dollar sign)
- € - € (euro sign)
- £ - £ (pound sign)
- ¥ - ¥ (yen sign)
Miscellaneous Symbols
- © - © (copyright)
- ® - ® (registered trademark)
- ™ - ™ (trademark)
- § - § (section sign)
- ¶ - ¶ (paragraph sign)
How to Use HTML Entities
Displaying Special Characters:
When you need to display characters that might be confused with HTML
syntax (e.g., <, >, &), use their corresponding
entities.
Non-Standard Characters:
For characters that are not readily available on a standard keyboard,
such as accented characters or special symbols, use the appropriate
HTML entity.
Preventing Interpretation:
Using entities can prevent the browser from interpreting certain
characters as HTML code, ensuring they are displayed correctly on the
page..
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta
charset="UTF-8">
<title>HTML Entities</title>
</head>
<body>
<p>Use
< and
> to display
less-than and greater-than symbols.</p>
<p>Use
& to
display an ampersand.</p>
<p>Use
" and
' for
quotation marks.</p>
<p>Accented characters:
á,
é,
í,
ó,
ú, ñ. </p>
<p>Mathematical symbols:
±,
×,
÷,
≤,
≥.</p>
<p>Currency symbols:
$,
€,
£,
¥.</p>
<p>Miscellaneous symbols:
©,
®,
™,
§,
¶.</p>
</body>
</html>
HTML provides a large set of entities for representing
various characters. Here's a comprehensive list of HTML
entities categorized by their types:
Reserved Characters
<!DOCTYPE html>
<html lang="en">
<head>
<meta
charset="UTF-8">
<title>HTML Entities</title>
</head>
<body>
<p>Use
< and
> to display
less-than and greater-than symbols.</p>
<p>Use
& to
display an ampersand.</p>
<p>Use
" and
' for
quotation marks.</p>
<p>Accented characters:
á,
é,
í,
ó,
ú, ñ. </p>
<p>Mathematical symbols:
±,
×,
÷,
≤,
≥.</p>
<p>Currency symbols:
$,
€,
£,
¥.</p>
<p>Miscellaneous symbols:
©,
®,
™,
§,
¶.</p>
</body>
</html>
HTML provides a large set of entities for representing
various characters. Here's a comprehensive list of HTML
entities categorized by their types:
Reserved Characters
Mathematical Symbols
Greek Letters
Miscellaneous Symbols
Accented Characters
Currency Symbols
More topic in HTML