R
R
run1822020-11-14 15:56:39
HTML
run182, 2020-11-14 15:56:39

Is it necessary to use meta charset="UTF-8" on a page?

I see that layout designers often place this tag. Is it really necessary or is it just a form of protection?
If the file is saved in UTF-8 encoding and if the server is configured to return and the database returns UTF-8, should it be used?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nadim Zakirov, 2020-11-14
@run182

You may not specify the encoding in the body of the document, but then you must specify it in the response header.

E
Egor Sabyanin, 2020-11-14
@EgoSab

Here is a link that will answer your question, but in short, then: the server will not know in what encoding to give the content, which can lead to unreadable (for humans) characters.

A
Aidrei, 2020-11-14
@Aidrei

If you do not specify, then in most browsers there will be no problem, but get used to writing correctly.
In general, if you do not specify the tag, the page will also be displayed, and problems will occur less likely than with unspecified meta tags, however, if you want to make it like a pro. then do it wisely.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question