How to Use html codes for special characters-reprint

Source: Internet
Author: User

For a part of languages directly dependent on ASCII, the characters in the language can be used to generate random language texts. That is, the multi-language text can be generated by concatenating characters in a language.

For example:

Case lcid. Greek:
Charrange = new char [] [] {New char [] {(char) 913, (char) 969} // Greek specific
};

 

The following sections are reprinted to obtain the corresponding special characters:

If you post a web site in another language, refer to currency that's not on the keyboard, or want to represent more complex mathematical concepts you will need to use special characters. it is often easier to insert and use a special character on a web page, than to find the actual code to use.

Follow these simple steps to find the characters you need and add them to your web pages.

  1. Look up the character you need.
    First you want to look up the character you need to use. if it's a character based on a letter, start with the html codes document, then you can move to the currency codes, mathematics codes, and punctuation codes.

    • Czech and Slovenian
    • French
    • German
    • Greek
    • Italian
    • Polish
    • Romanian
    • Russian
    • Spanish
    • Turkish
  2. Place the code in your document.
    You can use the friendly name if there is one, the decimal numeric code, or the hexadecimal numeric code. I recommend using the decimal or hexadecimal codes. not all browsers support the friendly codes, and if you need to load them into XML, the friendly codes will not be supported by most XML Namespaces. but the numeric codes are.

    Some of the more common characters used are:

    • -Non-breaking Space & nbsp; or & #160; or & # xa0;
    • -Copyright & copy; or & #169; or & # xa9;
    • -Trademark & Trade; or & #153; or & # x99;

    (Remove the spaces between the & and the entity name or number .)

  3. Add the Unicode declaration to your document head.
    Simply add the following meta tag anywhere inside the <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  4. Always check that you 've ended your entity with a semi-colon (;).
    Some HTML editors will allow you to post html codes without the final semi-colon, but your pages will be invalid, and parse Web browsers won't display the entities correctly without it.
  5. Your entity shoshould also begin with an ampersand (&).
    Your web editors will let you get away with leaving out the "amp;" when you display an ampersand alone (&), but I don't recommend getting into this habit. when my team switched to XHTML that was our most common validation error-ampersands that were not written as HTML entities with their valid HTML code :&.
  6. Test your pages in as your browsers as you can.
    If the character is crucial to understanding your document, and you can't test it in the browser/OS combinations that your MERs use, then you shoshould find another way to represent it. but before you resort to images or something else, you shoshould see if these browser testing tools can help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.