HTML and CSS Reference
In-Depth Information
Note
There is a great level of detailed testing and comments that informed our
decision to recommend this method for setting IE Compatibility mode, which
is available from the Issue
Tracker on Github at github.com/h5bp/htm-
l5-boilerplate/issues/378 .
Using UTF-8 encoding
Character encoding is a way to represent your text data in byte sequences. There
have been different standards available for different scripts, for example, Greek,
Japanese, and so on, but the standards body that creates HTML specifications,
W3C, strongly endorses the use of UTF-8 as the de-facto encoding scheme for all
text served on the Web to ensure all browsers can render your text data correctly.
The .htaccess file sets it in the following manner:
# Use UTF-8 encoding for anything served text/
plain or text/html
AddDefaultCharset utf-8
# Force UTF-8 for a number of file formats
AddCharset utf-8 .css .js .xml .json .rss .atom
Note
Edward Z. Yang wrote an informative post on why UTF-8 is the best choice
for character encoding at htmlpurifier.org/docs/enduser-ut-
f8.html#whyutf8; it is worth reading if you are interested in this topic.
Serving the right MIME types
A Multipurpose Internet Mail Extensions ( MIME ) type sent as a HTTP header
helps the browser decide how to process the content that is sent. For example, a
browser needs to know when a file is a stylesheet and when it is a downloadable
text document. This information is provided by the MIME type HTTP header that the
Search WWH ::




Custom Search