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

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)