Why shouldn’t `'` be used to escape single quotes?

" is on the official list of valid HTML 4 entities, but ' is not.

From C.16. The Named Character Reference ‘:

The named character reference ' (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of ' to work as expected in HTML 4 user agents.

Leave a Comment