I already searched for a while, and I failed to find any references on whether it is safe/possible to remove the space here:
<meta http-equiv="Content-Type" content="text/html;
this spacecharset=UTF-8" />
I also tried compressing the script on 'Aggressive Minimization', but they don't seem to remove it.
I see that they removed the space on this website example. But I can't rely on that kind of websites any more.
It is not necessary to include <meta charset="blah"> . As the specification says, the character set may also be specified by the server using the HTTP Content-Type header or by including a Unicode BOM at the beginning of the downloaded file.
The charset attribute specifies the character encoding for the HTML document. The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!
Unfortunately, ASCII only encodes English characters, so if you used other languages whose alphabet does not consist of English characters, the text wouldn't be properly displayed on your screen. Thus, UTF-8 was created to address ASCII's shortcomings and can translate almost every language in the world.
charset = character set utf-8 is character encoding capable of encoding all characters on the web. It replaced ascii as the default character encoding. Because it is the default all modern browsers will use utf-8 without being explicitly told to do so. It remains in meta data as a common good practice.
The specification of media types, RFC 2045, does not require a space. Neither does it prohibit a space; this is more implicit, since RFC 2045 refers to the extended BNF as defined in RFC 822, which clarifies this in clause 3.4.2. WHITE SPACE:
“Note: In structured field bodies, multiple linear space ASCII characters (namely HTABs and SPACEs) are treated as single spaces and may freely surround any symbol. In all header fields, the only place in which at least one LWSP-char is REQUIRED is at the beginning of continuation lines in a folded field.”
According to HTML5 drafts, the specific kind of meta
tags under discussion can be written in the following more compact form, on the grounds that user agents have long recognized it:
<meta charset=UTF-8>
If XHTML serialization is needed, use
<meta charset="UTF-8" />
This is more readable and safer (fewer possibilities of mistyping when you type it by hand).
there is no harm in that as long as there is the semicolon ";" after text/html
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With