Open RachelComerford opened 6 years ago
Below are the some best practices of character encoding in HTML files:
meta
element with a @charset
attribute.head
tag.<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
...
@http-equiv="content-type"
and @content="text/html"
attributes (called a pragma directive) those are not recommended, because "@content-type"
attribute value is obsolete as per HTML5 living standard.<?xml version="1.0" encoding="utf-8"?>
includes
.a
, link
and script
elements, so you should avoid using it. For example:
See our <a href="/mysite/mydoc.html" charset="iso-8859-15">list of publications</a>.
Source links: https://www.w3.org/blog/2008/03/html-charset/ https://www.w3.org/International/questions/qa-html-encoding-declarations https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
From BISG survey