HTML Entities - Entity characters in HTML
Characters that need to be preserved in HTML will be replaced with character entities - Entities.
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 are used to 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
Extra diacritics are added to letters that often represent dialectal letters, which can be above, below, inside letters, or between two letters. They can use the same numeric character to create characters that are not in the character set in the page. Here are some examples.
Character Sign Code Result ̀ a à ́ á â â â ̃ ã ã Ò O ò Ò O Ó Ó ̂ O O O ̃ O Õ ÕPrevious article: Computer code element in HTML
The following article: Icon in HTML
You should read it
- Symbol - Icon in HTML
- Introduction to HTML
- How to insert spaces in HTML
- 5 steps to learn a dynamic HTML web component profile
- Basic examples of HTML
- Paths in HTML
- eQuiz - Multiple choice test on HTML knowledge
- HTML form
- Character encoding in HTML (Charset)
- Why write neat and organized HTML?
- Elements in HTML
- Common HTML mistakes that you should avoid for better web programming
Maybe you are interested
Hubble Telescope extremely rare photo of the moment of the Supernova explosion The world's most expensive telescope captures stunning views of the famous supernova remnant Fastest star in the Milky Way, speed 8,226,967 km/h Astrophysics professor teaches how to jump into a black hole so it's 'safe' and possible events Discovered organic molecules that can make life in the center of the Milky Way The interaction between the Milky Way and a satellite galaxy is creating many new stars