HTML code for an apostrophe

前端 未结 17 1022
独厮守ぢ
独厮守ぢ 2020-11-30 18:01

Seemingly simple, but I cannot find anything relevant on the web.

What is the correct HTML code for an apostrophe? Is it ?

17条回答
  •  [愿得一人]
    2020-11-30 18:37

    I've found FileFormat.info's Unicode Character Search to be most helpful in finding exact character codes.

    Entering simply ' (the character to the left of the return key on my US Mac keyboard) into their search yields several results of various curls and languages.

    I would presume the original question was asking for the typographically correct U+02BC ʼ, rather than the typewriter fascimile U+0027 '.

    The W3C recommends hex codes for HTML entities (see below). For U+02BC that would be ʼ, rather than ' for U+0027.

    http://www.w3.org/International/questions/qa-escapes

    Using character escapes in markup and CSS

    Hex vs. decimal. Typically when the Unicode Standard refers to or lists characters it does so using a hexadecimal value. … Given the prevalence of this convention, it is often useful, though not required, to use hexadecimal numeric values in escapes rather than decimal values…

    http://www.w3.org/TR/html4/charset.html

    5 HTML Document Representation5.4 Undisplayable characters

    …If missing characters are presented using their numeric representation, use the hexadecimal (not decimal) form, since this is the form used in character set standards.

提交回复
热议问题