What is character entities in HTML ?
In this article, we will learn about HTML character entities and how to use them. HTML character entities are basically a set of characters (entity) used to represent few characters reserved by the HTML, especially invisible characters or characters difficult to type out using a regular keyboard. HTML provides some entity names and entity numbers to use these symbols. Please refer to HTML Entities for more details about characters.
Example: ‘<‘ is already reserved in HTML language. Sometimes this character needs to display on the web page that creates ambiguity in code. Along with these are the character which is normally not present in basic keyboard ( £, ¥, €, © ), etc. We will explore the HTML entities in detail as we grow in the article.
&entity_name; or &#entity_number;
Some useful symbols with their entity name and entity numbers are discussed below:
|&|| ||non-breaking space|
|₹||₹||India rupee sign|
|‘||'||'||single quotation mark (apostrophe)|
|“||"||"||double quotation mark|
Reserved Characters: Reserved characters are those characters that are either reserved for HTML or those which are not present in the basic keyboard.
Example: As Entity numbers are easy to learn. Here, a few of the reserved characters are discussed:
|Reserved Character||Entity Name|
Other Characters: Some characters that aren’t available directly on our keyboard, therefore such an entity can be used to represent it by using their entity number.
Example: These keywords are directly not available to type, we need to specify their entity number. Here #x before the numbers represents the hexadecimal representation.
|≥||≥ ≥ ≥|
|∃||∃ ∃ ∃|
Please Login to comment...