Is it preferable to use character codes in html for special characters or the character itself?

I have an html file with a symbol ëin it.

The html contains this line, which indicates that I am using the iso-8859-15 character set.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">

I can choose between using the character code &euml;or the character itself ëin the html file. Both work great.

I was wondering if you prefer each other and why?

+3
source share
4 answers

Real characters:

  • Increased throughput
  • It is easier to read when you write or edit your pages.

Entities:

  • Save you from having to worry so much about character encoding

, Unicode .

+1

, /. , - -, , , , . , , .

: - .

+1

, .

, ë &#235;.

0

You should not use ISO-8859-15, since it is less widely supported than ISO-8859-1, and does not give any real advantages over it, even when it works. If you use entities, end them with a semicolon: &euml;(not ë).

Regarding the use of symbols or references to objects, perhaps the best answer is: if you have to ask, use entities. But using characters as such is not a rocket of science, and this makes the source much more readable.

0
source

All Articles