Table of Contents
HTML Entities - Entity Characters in HTML is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.
Characters that need to be preserved in HTML will be replaced with character entities - Entities. It is also possible to use character entities to write characters that are not on the keyboard.
Entity in HTML
In HTML, some characters need to be preserved. If you use a smaller (<) or greater (>) sign in the text, the browser may mistake it for HTML tags. Character entities help display these characters.
& ten_thucthe; OR _thucthe
To write a smaller sign (<) you can write < or <
The benefit of using an entity name is very easy to remember, but the downside is that the browser may not support all entity names but with numbers.
The space is not interrupted
A familiar character entity in HTML is unbroken space, or space itself:
This is a space that cannot be separated into a new line. Two words on both sides of this white space will always go together.
§ 10
Another familiar case is to use this non-destructive space to prevent the browser from deleting the whitespace on the HTML page. If you type 10 spaces, the browser will delete 9 of them. To add real white, use There are also indestructible hyphens ? help create hyphens (-) not destroyed.
Some character entities are useful in HTML
Result Description Entity name Number of blank entities not destroyed larger mark>> & ampersand & & "double quotation marks" "'single quotes'' ¢ cents ¢ ¢ £ pound pound £ £ yên yen ¥ ¥ € euro euro © copyright characters © © registered trademarks ® ®Note: The entity name differs between uppercase and lowercase letters.
Combined with diacritics
FAQ
What should you know about entity in HTML?
In HTML, some characters need to be preserved. If you use a smaller ( ) sign in the text, the browser may mistake it for HTML tags. Character entities help display these characters.
What should you know about the space is not interrupted?
A familiar character entity in HTML is unbroken space, or space itself:
What is HTML Entities - Entity Characters in HTML?
Characters that need to be preserved in HTML will be replaced with character entities - Entities.
Reader Comments 0
Sign in with email or Google to join the discussion.