HTML5: which is better - using a character entity vs using a character directly?

The main advantage I can see with encoding characters is that they'll look right, even if the page is interpreted as ASCII.

For example, if your page is just a raw HTML file, the default settings on some servers would be to serve it as text/html; charset=ISO-8859-1 (the default in HTTP 1.1). Even if you set the meta tag for content-type, the HTTP header has higher priority.

Whether this matters depends on how likely the page is to be served by a misconfigured server.


If the encoding is UTF-8, the normal characters will work fine, and there is no reason not to use them. Browsers that don't support UTF-8 will have lots of other issues while displaying a modern webpage, so don't worry about that.

So it is easier and more readable to use the characters and I would prefer to do so.

It also saves a couple of bytes which is good, although there is much more to gain by using compression and minification.