Alex Rivera | Logout

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

Asked 2010-11-09T12:44:39.890
85

— or —

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

Edit
Report

1 Answer

87

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.

answered 2010-11-09T12:53:00.187

Your Answer