HTML code for an apostrophe

前端 未结 17 1032
独厮守ぢ
独厮守ぢ 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:23

    Firstly, it would appear that ' should be avoided - The curse of '

    Secondly, if there is ever any chance that you're going to generate markup to be returned via AJAX calls, you should avoid the entity names (As not all of the HTML entities are valid in XML) and use the &#XXXX; syntax instead.

    Failure to do so may result in the markup being considered as invalid XML.

    The entity that is most likely to be affected by this is  , which should be replaced by  

提交回复
热议问题