`—` or `—` is there any difference in HTML output?

前端 未结 5 1444
孤城傲影
孤城傲影 2021-02-04 23:18

or

Is there a difference between these? Is one better-supported than the other?

5条回答
  •  野性不改
    2021-02-04 23:39

    From W3 web site Common HTML entities used for typography

    For the sake of portability, Unicode entity references should be reserved for use in documents certain to be written in the UTF-8 or UTF-16 character sets. In all other cases, the alphanumeric references should be used.

    Translation: If you are looking for widest support, go with

提交回复
热议问题