HTML Entities
HTML
An HTML entity is piece of text starting ampersand (&) and ending with semicolon (;).
HTML Entity characters
Entities are used to display reserve characters in HTML page.
Entities are enclosed by beginning with ampersand (&) and ends with a semicolon (;).
For example: >
is for >
, ©
is for ©
, ®
is for ®
, "
is for " character.
Any reserve characters used in html page without entity symbol, HTML will consider that character as part of the HTML language.
<H1>
here < and > has a special meaning to HTML ie starting and ending sign. But here 5 > 2
> is just a greater than character.
Entity number(Decimal or Hexadecimal) can also be used instead of entity name. Ex: <
, <
or <
is for <
character.
Learning with HTML Editor "Try it Now"
You can edit the HTML code and view the result using online editor.
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Entities</title>
</head>
<body>
<h1> is a heading and <p> is a paragraph tag.
</body>
</html>
Click on the "Try it Now" button to see how it works.