HTML Entities - Entity characters in HTML
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
May be interested
- Text in HTMLthe element in html is used to define a paragraph of text.
- How to Use Text Color Tags in HTMLthis article explains how to change the font color in html documents. although the html style tag is obsolete in html5, you can use css to color content on an html page. if you use an older version of html, you can use the html text color tag as needed.
- Format text in HTMLformat elements in html help determine the style and importance of text.
- Elements in HTMLthe html element usually goes in pairs, including the opening tag, closing tag, and the content inside the two tags.
- Common HTML mistakes that you should avoid for better web programminglearning html is not difficult, but when running it in the browser, errors often occur. here are common html errors and how to handle them for better web development.
- How to insert spaces in HTMLthis tutorial explains how to insert spaces and line breaks in html. because no matter how many times you type a space, html will display a space so to insert more than one space, you will need to use the html tag.
- Image img in HTMLwhen you visit the website, you will often see images of all sizes and positions on the page. images in html web pages will help to enrich the content as well as increase the aesthetics of the page.
- Attributes in HTMLproperties are used to add information to elements in html.
- The id attribute in HTMLin html, the id attribute is used to specify a unique id for an html element (the value must be unique in the html file).
- Table in HTMLwhat does it take to create a table in html? is it complicated? want to add color to the table border, how to add the background color to the text in the table? in this article tipsmake.com will answer those questions and guide you to basic operations with tables on html, in addition to adding alternate color schemes for rows in the html table. invite you to follow along.