Home / the Internet / Repair and service / How to register the encoding

How to register the encoding

/
91 Views

How to register the encoding</a>

While absolutely all documents on the network will not beUse the same UTF (Unicode Transformation Format) character set for all countries and peoples, you must specify the encoding used in HTML or XML documents.

Otherwise, pages that are normally displayed in your browser, can be transformed into the notorious unreadable "cracked" in the Internet browsers of visitors to your site.

Instructions

    1

The meta tag indicating EncodingUsed in the document should beInside the head element as close as possible to its top. This is the wording of the W3C (The World Wide Web Consortium), which develops and implements technology standards for the Internet. The tag itself in the HTML document can look like this: & lt-meta http-equiv = "Content-type" content = "text / html-charset = utf-8" & gt-This directive should be used in pages written in the standard HTML 4.01 and XHTML 1.x. For the XHTML document, the final bracket "& gt-" should be replaced with "/ & gt-". In this sample after charset = the unicode-encoding utf-8 is specified. Of course, you need to replace utf-8 with your value - the one in which this document was saved, or in which its contents are extracted from the database. For the Russian alphabet, except utf-8, these can be the values โ€‹โ€‹of windows-1251 (the most common), koi8-r, koi8-u, iso-ir-111, iso-8859-5, x-cp866, ibm855, x-mac -cyrillic.

    2

To specify Encoding In the site page - open for editingThe required document. Find out which syntax the page code corresponds to - it is indicated at the beginning, in the & lt-! DOCTYPE ... tag. Depending on the standard used (HTML or XHTML), prepare the tag code based on the above data. Then find the & lt- / title & gt- tag in the source of the page - usually the encoding instruction is placed immediately after it. If such a tag is not found in the code of your document for some reason, find the tag that opens the header part of the HTML - & lt-head & gt-. Paste the prepared code after it and save the document.

    3

If pages use external CSS style files and these files contain elements that use characters from the national alphabets, then they should also specify the used Encoding. In the first line of the stylesheet, add: @charset "windows-1251" -windows-1251 replace it with the value you need. In addition, you can specify Encoding, Which the browser should use whenClick on the link. To do this, put the charset attribute in the reference tag with the desired value. For example: & lt-a href = "http://www.learn-myself.com" charset = "windows-1251" & gt-How Simple! & Lt- / a & gt-

How to register the encoding Was last modified: June 21st, 2017 By Zaaloysc
It is main inner container footer text