What are special HTML characters for?

If you are even a little familiar with the hypertext markup language (HTML), then you probably know that the main content of such documents is tags and attributes. Such elements are framed by special characters. For example: the browser will understand that the letter “p” is a paragraph tag only after it appears in such brackets: <>. Otherwise, the program will not display a new element, but a regular character. In addition to replacing brackets for tags, special HTML characters are also used for other purposes, which we will discuss later.

html special characters
html special characters

Markup Symbols . When developing web documents, sometimes you have to use HTML characters that replace markup characters.

symbol

replacement

designation

&

& amp; & # 38;

Ampersand sign. In HTML, this sign marks the beginning of the action of special characters. And this means, if you use it in standard form, the browser will not correctly accept this sign. To avoid such situations, use a replacement.

<

& lt; & # 60;

The less sign. This symbol indicates the beginning of the tag action. Although the browser in most cases recognizes this element as normal, you still sometimes need to use a replacement. For example, if you want to display any tag to the user.

>

& gt; & # 62;

The sign is more. This symbol indicates the end of the tag action. In its properties and action, it is completely analogous to the less sign.

"

& quot; & # 34;

Double quotation mark. Prescribes the beginning and end of attribute values. In a regular letter, it can use a simple form, without replacements. But if you need to provide users with any attribute or similar element, then you need to use the replacement.

''

& apos; & # 39;

Single quote. Prescribes the beginning and end of attribute values. All properties and designations are completely analogous to the double quotation mark.

Thus, if you want to present to your readers, for example, the <body> tag, then in order to avoid incorrect display, you will have to use the following entry: & ltbody & gt or & # 60body & # 62. The same replacements must be made if quotation marks are to be used. Once again it is worth noting that such signs should be used only when necessary, this is not necessary in the normal text. Special HTML characters can be similarly used with CSS elements.

html characters

Special characters . Some special group of special characters does not officially exist. Users list some items that cannot be typed on a regular keyboard. In HTML, special characters can create a wide variety of characters or icons. For example, card symbols or non-standard drawings. The following are the most commonly encountered special HTML characters.

©

& copy; & # 169;

Sign of copyright protection. The Latin letter C, circled, stands for - Copyright, which means copyright in the translation. Such special HTML characters can be found in any appropriate place (at the end of the article, site, any content). After such a sign, as a rule, the name of the author is indicated.

®

? reg & # 174;

Trademark legal protection mark. Latin letter R enclosed in a circle. Full decryption: Registered, translation: registered. Indicates official affiliation. In Russia, an analogue of such a mark is the verbal designation “registered trademark”.

& trade; & # 8482;

Trademark. Full designation Trademark. Many people confuse this sign with the Registered sign. In this case, this element does not indicate the presence of registration of goods in official services.

Conclusion Special HTML characters are necessary, and without their knowledge we will not be able to fully experience all the features of this language. If you want to get acquainted with all these similar elements, it is recommended to look into special reference materials.

Source: https://habr.com/ru/post/K15581/


All Articles