ComputersProgramming

Why use special HTML characters?

If you are at least a little familiar with the language of hypertext markup (HTML), you probably know that the main contents of such documents are tags and attributes. Such elements are framed by special symbols. 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 output not a new element, but an ordinary symbol. In addition to replacing the parentheses for tags, special HTML characters are also used for other purposes, which we will discuss below.

Marking symbols . When developing web documents, sometimes you have to use HTML-symbols that replace the markers.

symbol

Substitution

Designation

&

& Amp; & # 38;

The sign "ampersand". In HTML, this sign indicates the beginning of the action of special characters. And this means, if you use it in a standard form, the browser will incorrectly accept this sign. To avoid such situations, use a replacement.

<

& Lt; & # 60;

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

>

& Gt; & # 62;

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

"

& Quot; & # 34;

Double quote. Prescribes the beginning and end of the attribute values. In ordinary writing, it can use a simple form, with no substitutions. But if you want to provide users with an attribute or a similar element, then you need to use a replacement.

'

& Apos; & # 39;

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

So, if you want to present your readers, for example, a tag, then in order to avoid the wrong mapping, you will have to use the following entry: & ltbody & gt or & # 60body & # 62. The same substitutions must be made if quotes are to be used. Once again it is worth noting that it is necessary to apply such signs only in the case when it is necessary, in the usual text it is not necessary to do this. Special HTML characters can similarly be used with CSS elements.

Special Characters . Some special group of special characters does not officially exist. In their list, users contribute some elements that can not be printed on a regular keyboard. In HTML, special characters can create a wide variety of characters or icons. For example, card notations or non-standard drawings. The following are the most common special HTML characters.

©

& Copy; & # 169;

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

®

& Gt; & # 174;

Trademark protection mark. The Latin letter R enclosed in a circle. Full transcript: Registered, translation: registered. Indicates the official affiliation. In Russia, the analogue of such a sign is the verbal designation "registered trademark".

& Gt; & # 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 needed, and without their knowledge we will not be able to fully experience all the possibilities of this language. If you want to get acquainted with all such elements, it is recommended to look into special reference materials.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.