Certain characters are reserved in HTML, and using symbols like less than (<
) or greater than (>
) may cause the browser to interpret them as tags. To prevent this, entity names or numbers can be used to represent these reserved characters. Entity names follow this structure:
&entity_name; |
Entity numbers are represented in this format:
&#entity_number; |
To display a less than sign (<), we must write it as < or as <.
Entity names are simpler to recall compared to entity numbers. |