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

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

or

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

5条回答
  •  走了就别回头了
    2021-02-04 23:35

    SGML parsers (or XML parsers in the case of XHTML) can handle without having to process the DTD (which doesn't matter to browsers as they just slurp tag soup), while is easier for humans to read and write in the source code.

    Personally, I would stick to a literal em-dash and ensure that my character encoding settings were consistent.

提交回复
热议问题