<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML5 Doctor &#187; charset</title>
	<atom:link href="http://html5doctor.com/tag/charset/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:28:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Your Questions Answered #12</title>
		<link>http://html5doctor.com/your-questions-12/</link>
		<comments>http://html5doctor.com/your-questions-12/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 13:45:15 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=2369</guid>
		<description><![CDATA[<p>The latest round of <abbr>HTML</abbr>5 prescriptions is in! This week, we'll briefly cover the <abbr>HTML</abbr>5 vs Flash debate, whether to use <code>&#60;body&#62;</code> or <code>&#60;div&#62;</code>, <abbr>HTML</abbr>5 rich text editors, and the <abbr>HTML</abbr>5 charset and doctype.</p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> The latest round of <abbr>HTML</abbr>5 prescriptions is in! This week, we&#8217;ll briefly cover the <abbr>HTML</abbr>5 vs Flash debate, whether to use <code>&lt;body&gt;</code> or <code>&lt;div&gt;</code>, <abbr>HTML</abbr>5 rich text editors, and the <abbr>HTML</abbr>5 charset and doctype.</p>
<p>    <!-- more --></p>
<section>
<h2><abbr>HTML</abbr>5 vs Flash</h2>
<p>Yaniv opens the great debate:</p>
<blockquote>
<p>Hi, why is it said all the time that <abbr>HTML</abbr> 5 is going to replace Flash and in the near future flash will not be used again?</p>
</blockquote>
<p>This is over-simplifying.</p>
<p>Historically, Flash has been used especially for games, video, and rich interaction because it wasn’t possible to do these things natively (i.e., without using a plugin). <abbr>HTML</abbr>5 introduces <code>&lt;canvas&gt;</code> and a native <code>&lt;video&gt;</code> element, and recently JavaScript libraries like jQuery make it much easier to create rich interaction. An additional benefit of Flash was its ubiquity, but thanks to the iPhone and now iPad, this isn’t true anymore.</p>
<p>I expect the usage of Flash to decrease as browsers support web standards, but Flash will still be used for a while to come. The enormous number of pages using Flash aren’t going to vanish (or change) overnight.</p>
<p>Peace &#8211; Oli</p>
</section>
<section>
<h2>Body or div?</h2>
<p>Erik asked:</p>
<blockquote>
<p>Hi there, I have noticed that several implementations of <abbr>HTML</abbr>5 (including this blog), set a width of the body rather than using a wrapping div-tag to create a centered layout.</p>
<p>It somehow feels awkward to set a width of the body, but is that the actual, proper way of doing it? I understand that a wrapping div is non-semantic, but how would one deal with background images etc, if the body has a width set to it? I&#8217;m guessing it would work to set background images on the html-tag, as well, though.</p>
</blockquote>
<p>If you need a <code>&lt;div&gt;</code> for styling purposes, that&#8217;s perfectly fine. You could also achieve the same effect by doing as you suggest and setting a background on the <code>&lt;html&gt;</code> element. For more, take a look at our recent article <a href="http://html5doctor.com/you-can-still-use-div/">You can still use <code>&lt;div&gt;</code></a>.</p>
<p>If you need any help on using <code>&lt;body&gt;</code> as a wrapper, check out Kroc Camen&#8217;s <a href="http://camendesign.com/developpeurs_sans_frontieres">How to Centre and Layout Pages Without a Wrapper</a>.</p>
<p>Peace &#8211; Oli</p>
</section>
<section>
<h2>Rich text editor</h2>
<p>Dave asked:</p>
<blockquote>
<p>We use our own bespoke <abbr>CMS</abbr> and part of the admin has a Javascript based rich-text editor (ck editor i think)for editing the main content of the pages.</p>
<p>The problem we&#8217;ve come across is that I&#8217;m building the site in <abbr>HTML</abbr>5 and it appears the text editor doesn&#8217;t recognise the new <abbr>HTML</abbr>5 tags (section, aside, article etc.) Do you know of any text editor that can handle <abbr>HTML</abbr>5 as I can’t seem to find anything in terms of Javascript based components or any other alternative. Many Thanks</p>
</blockquote>
<p>Generally, JavaScript-based <abbr>WYSIWYG</abbr> editors are <strong>complete shite</strong> (excuse my British <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Unfortunately, I don&#8217;t think this is gonna change soon because the established players were developed in the bad old days and have the code baggage to prove it. Perhaps with <abbr>IE</abbr>9 someone will cut the support anchor on older versions of <abbr>IE</abbr> (Safari, etc) and actually do a decent one, but don’t hold your breath <img src='http://html5doctor.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can customise most editors, however, and possibly even add your own elements. As a start, here&#8217;s an article I wrote on <a href="http://boblet.tumblr.com/post/32491901/semantic-text-entry-for-mt4">hacking FCKEditor into some semblance of shape for <abbr>MT</abbr>4</a>.</p>
<p>Beyond that, the editor&#8217;s documentation and forums are the place to check.</p>
<p>In addition, migrating to <abbr>HTML</abbr>5 is not all-or-nothing. You can get benefits from just the doctype (better validator, more detailed spec). Also, <a href="http://html5doctor.com/you-can-still-use-div/" title="You can still use div | HTML5 Doctor"><code>&lt;div&gt;</code> is still a perfectly fine <abbr>HTML</abbr>5 element</a>. Should new structural elements overwhelm the editor, you can always do something like <code>&lt;div class="article"&gt;</code> and <code>&lt;div class="nav"&gt;</code> (so-called <abbr>HTML</abbr>4.5 <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . This way you&#8217;re not using new elements, but you&#8217;re still benefitting from thinking in <abbr>HTML</abbr>5 semantics, and should you want to change down the road, you&#8217;ll already be half way there.</p>
<p>Peace &#8211; Oli</p>
</section>
<section>
<h2>Recommended charset for <abbr>HTML</abbr>5</h2>
<p>Guy asked:</p>
<blockquote>
<p>I have always used ISO-8859-1 as things like £ work better (being <abbr>UK</abbr> based)</p>
<p>But I have noticed a strong tendency for <abbr>UTF</abbr>-8 when it comes to <abbr>HTML</abbr>5. Is there a reason for this? what do you recommend?</p>
<p>Many thanks, Guy</p>
</blockquote>
<p>The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset"><abbr>HTML</abbr>5 spec says use <abbr>UTF</abbr>-8</a>: “Authors are encouraged to use <abbr>UTF</abbr>-8”. The reason is <abbr>UTF</abbr>-8 is a superset of ISO-8859-1, and <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1" title="ISO/IEC 8859-1 - Wikipedia, the free encyclopedia">can represent many more characters</a>. To get a £ symbol, you can write <code>&amp;#163;</code> (or <code>&amp;pound;</code>), but with <abbr>UTF</abbr>-8, just writing “£” is fine.</p>
<p>In fact, using <abbr>UTF</abbr>-8 in <abbr>HTML</abbr>5, we only need to escape &amp; and &lt; (and maybe &#8216;,&#8221;, and > depending on context — e.g., <code>alt</code> text). All other <abbr>UTF</abbr>-8 characters can be used as-is (e.g., “” not <code>&amp;ldquo;&amp;rdquo;</code>). Just look at the source for this paragraph!</p>
<p>Peace &#8211; Oli</p>
</section>
<section>
<h2>Mobile doctype</h2>
<p>Franceso asked:</p>
<blockquote>
<p>Hello guys! I was wondering, since I found no reference at all online&#8230; does the <abbr>HTML</abbr>5 doctype cause problems on mobile browsers (besides the iPhone/iPod/iPad. I tested it and it works like a charm)?</p>
<p>I don&#8217;t mean &#8220;advanced&#8221; <abbr>HTML</abbr>5 properties like <code>video</code> or even <code>article</code> and other semantic tags. Just the simple <abbr>HTML</abbr>5 doctype, that causes no problems whatsoever with classic desktop browsers. Because I tried it, and it does seem to cause layout problems on Symbian (the only other browser I could test it).</p>
<p>Any suggestions? Because I do use the <code>video</code> tag in there (to degrade gracefully in all mobile browsers but the iPhone&#8217;s, I&#8217;d hope), but I hate using that with the classic mobile <abbr>XHTML</abbr> doctype declaration. Thanks!</p>
</blockquote>
<p>The <abbr>HTML</abbr>5 doctype was chosen to be backward compatible with current browsers, and for desktop I think that&#8217;s completely true. I doubt many mobile browsers were tested, though. Anything not running Opera Mini or Mobile Webkit is most probably still partying like it&#8217;s 1999, and <abbr title="Your Mileage May Vary">YMMV</abbr>. I&#8217;d recommend testing thoroughly.</p>
<p>By the way, anything that doesn’t support the <abbr>HTML</abbr>5 doctype definitely will not support <code>&lt;video&gt;</code>. Hope that helps.</p>
<p>Peace &#8211; Oli</p>
</section>
<section>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions. If you&#8217;ve got a query about the <abbr>HTML</abbr>5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help.</p>
</section>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark" class="crp_title">Your Questions Answered #10</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-1/" rel="bookmark" class="crp_title">Your questions answered #1</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-11/" rel="bookmark" class="crp_title">Your Questions Answered #11</a></li>
<li><a href="http://html5doctor.com/your-questions-14/" rel="bookmark" class="crp_title">Your Questions #14</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-2/" rel="bookmark" class="crp_title">Your questions answered #2</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/your-questions-12/" rel="bookmark">Your Questions Answered #12</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on August 12, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Your questions answered #2</title>
		<link>http://html5doctor.com/your-questions-answered-2/</link>
		<comments>http://html5doctor.com/your-questions-answered-2/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 08:39:09 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[web sockets]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=618</guid>
		<description><![CDATA[Last month we decided to pull together a post that covered some of the emails that were sent in through the contact page. Since the publication of the last post we have received a lot more questions regarding the HTML 5 spec and have decided that some of these  warranted another post.]]></description>
			<content:encoded><![CDATA[<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" />Since the launch of the site we&#8217;ve be welcoming questions regarding the HTML 5 spec through the <a href="/contact/">contact form</a>.  It doesn&#8217;t matter if you think your question is too &#60;H1&#62;big&#60;/H1&#62; or &#60;small&#62;small&#60;/small&#62; we&#8217;re here to help.</p>
<p>Last month we decided to pull together a post that covered some of the emails that were sent in through the contact page. Since the publication of the last post we have received a lot more questions regarding the HTML 5 spec and have decided that some of these  warranted another post.</p>
<h2>Content Type</h2>
<p>Christian asked:</p>
<blockquote><p>
In checking out various implementations of html5 around the web with a quick &#8220;view source&#8221;, I find everyone seems to specify content type in the headers like so; &#60;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html;charset=utf-8&#8243;&#62; even though it&#8217;s already a part of the HTTP header.</p>
<p>Does it really need to be in both locations, or can we all cut out that redundancy as long as our servers are specifying the content type appropriately in the HTTP header?
</p></blockquote>
<p>If you take a look at Dr.Bruce&#8217;s weblog <a href="http://www.brucelawson.co.uk/" title="Bruce Lawson">http://www.brucelawson.co.uk/</a> you will see that most of the information can be cut out and simplified. As more and more sites make the jump to HTML 5 you will be able to see what elements can and cannot be left out. If you&#8217;re interested in checking out more sites then please feel free to visit our sister site <a href="http://html5gallery.com">HTML 5 Gallery</a> where you will be able to view the source of plenty of sites that are already sporting HTML 5 elements in their markup.</p>
<p>If you&#8217;re looking to take your reading even further then Dr. Remy has recently published an article entitled <a href="/html-5-boilerplates/" title="HTML 5 Boilerplates">HTML5 boilerplates</a> which should give you more information on the above.</p>
<h2>HTML 5 &amp; SEO</h2>
<p>Julio asked:</p>
<blockquote><p>
I&#8217;m thinking of using HTML 5 in my projects as soon as possible, but I need to be sure that everything will work just as fine as HTML 4. My question is: Google (and other search engines) is already indexing HTML 5 sites? In terms of SEO, will I have any drawbacks?
</p></blockquote>
<p>In answer to your question, yes Google is indexing HTML 5 sites. Between <a href="/about/" title="the HTML 5 doctors">us</a> we run several sites built with HTML 5 markup and none of the Doctors have had any issues with our sites being indexed or competitive on key phrases.</p>
<aside><q>Yes, Google is indexing <abbr>HTML<abbr> 5.</q></aside>
<p>In fact if you look at the source code of google.com you&#8217;ll see that their doctype is declared as &#60;! doctype html&#62; meaning it&#8217;s using HTML 5! Another site that is part of the Google group, Youtube, has also recently created a mock-up of their layout that can be found at <a href="http://www.youtube.com/html5">http://www.youtube.com/html5</a> and this definitely shows that they are thinking about it. One last fact to help settle your nerves, if we&#8217;ve not managed to do it already, is that Ian Hickson who is writing the bulk of the HTML 5 spec works for Google so we don&#8217;t think you&#8217;ll have any problems.</p>
<h2>HTML 5 Templates</h2>
<p>Klaus asked:</p>
<blockquote><p>
Where can if find HTML 5 Templates?
</p></blockquote>
<p>When this email came in, we weren&#8217;t too sure by what Klaus meant so we&#8217;re tackling his question with two responses.</p>
<p>For static HTML pages you&#8217;d be hard pushed to find a better resource than Remy&#8217;s boilerplate explained here: <a href="/html-5-boilerplates/" title="HTML 5 templates">http://html5doctor.com/html-5-boilerplates/</a></p>
<p>However, if you are looking for some HTML 5 WordPress themes then have a look at the following:</p>
<ul>
<li><a href="http://www.brucelawson.co.uk/2009/redesigning-with-html-5-wai-aria/" title="Bruce Lawson HTML 5 wordpress theme">http://www.brucelawson.co.uk/2009/redesigning-with-html-5-wai-aria/</a></li>
<li><a href="http://diggingintowordpress.com/2009/07/free-html-5-wordpress-theme/" title="Digging into WordPress HTML 5 theme">http://diggingintowordpress.com/2009/07/free-html-5-wordpress-theme/</a></li>
<li><a href="http://www.thatstandardsguy.co.uk/blog/2009/04/03/brave-new-world-wordpress-theme/" title="That Standards guy HTML 5 wordpress theme">http://www.thatstandardsguy.co.uk/blog/2009/04/03/brave-new-world-wordpress-theme/</a></li>
</ul>
<h2>WebSocket Support</h2>
<p>Dave asked:</p>
<blockquote><p>
There&#8217;s a lot of features, and I can&#8217;t find anywhere that lists current support in major browser versions (and/or with Google Gears).  The particular one I&#8217;m looking for is WebSocket support
</p></blockquote>
<p>This is a good resource for checking the state of browser support for a particular feature: <a href="http://a.deveria.com/caniuse/">http://a.deveria.com/caniuse/</a> Regarding web workers specifically, we&#8217;ve come across a library that implements Web Sockets and falls away when it&#8217;s available natively.</p>
<p>None of the doctors have used these personally but feel that they will be useful in answer to your question:</p>
<ul>
<li><a href="http://orbited.org/ title="Orbited.org"">http://orbited.org/</a></li>
<li><a href="http://molly.com/html5/html5-0709.html" title="Molly on HTML 5">http://molly.com/html5/html5-0709.html</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)" title="HTML 5 layout engines">http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)</a></li>
<li><a href="http://wiki.whatwg.org/wiki/Implementations_in_Web_browsers" title="Working group on implementation in web browsers">http://wiki.whatwg.org/wiki/Implementations_in_Web_browsers</a></li>
</ul>
<h2>Reusing Elements Within Same Page</h2>
<p>Daniel asked:</p>
<blockquote><p>
Dear Doctor,<br />
Just a quick confirmation please. Am I right in thinking that nav, like header and footer, can be used more than once in a single page?  For example, surrounding a menu at the top of the page and surrounding next/previous buttons at the bottom. Come to think of it, is it fair to say that all tags except html, head and body can be used more than once?<br />
Thanks in advance, doctor.<br />
I&#8217;ll be back soon about my dodgy knee.
</p></blockquote>
<p>Yes, for more information please reference this article &#8211; <a href="/designing-a-blog-with-html5/" title="designing a blog with HTML 5">http://html5doctor.com/designing-a-blog-with-html5/</a> and this diagram of a single blog entry (of course, there can be many blog entries on a page) <a href="http://html5doctor.com/wp-content/uploads/2009/06/html5-article-outline.gif" title="diagram of HTML 5 blog">http://html5doctor.com/wp-content/uploads/2009/06/html5-article-outline.gif</a> probably.</p>
<p>Other articles that we have already covered on the site &#8211; <a href="/the-header-element/" title="HTML 5 header element">http://html5doctor.com/the-header-element/</a>, <a href="/the-footer-element/" title="HTML 5 footer element">http://html5doctor.com/the-footer-element/</a> and a great article on the <a href="/nav-element/" title="HTML 5 nav element">http://html5doctor.com/nav-element/</a>.</p>
<h2>Learning HTML/XHTML Before Reading About HTML 5</h2>
<p>Manuel asked:</p>
<blockquote><p>
Hi, I&#8217;m new to this field and I would like to learn HTML.</p>
<p>If I understand correctly, most future web sites will be written in HTML5 (served using the text/html MIME type) and just a few sites will use XHTML5 (served using the application/xhtml+xml MIME type). As a consequence, I will focus on HTML5.</p>
<p>HTML5 can use both the HTML syntax and the stricter XHTML syntax, but since I&#8217;m starting from scratch I suppose I could safely ignore the XHTML syntax and focus on the HTML syntax (HTML 4.1/5). Why bother about XHTML syntax in 2009? Unfortunately all modern introductory book/online resources about HTML are focused on the XHTML syntax. Where I could learn the pure HTML syntax without any reference to the useless and distracting (for my purposes) XHTML syntax?
</p></blockquote>
<p>Your best bet would be to get into the good coding practices of <abbr>XHTML</abbr> (lowercase tag, always closing tags, etc.) while writing HTML, there are a number of resources on the Internet for learning HTML 4.01 which you shouldn&#8217;t have any problems finding. A particular favorite of mine when I was starting out was <a href="http://htmldog.com/">HTMLDog</a>.</p>
<p>We understand the issue of a number of the resources use the XHTML sytax but as I said above this will get you into good coding habits when writing HTML (particularly as HTML is less strict).</p>
<blockquote><p>
thank you for your quick reply. You won me: I will learn XHTML (from HTMLDog). Just a last question: when in the next future I will make the transition to HTML5 (served using the text/html MIME type) I hope the XHTML syntax validates anyway, so that I will have just to change the doctype of my pages to &#60;!DOCTYPE html&#62;. Right? (My fear is that the XHTML syntax will require a XHTML5 doctype).
</p></blockquote>
<p>This is correct though you won&#8217;t get the extra semantics added by HTML 5. For that I suggest you read the articles that appear on the site. If you want to use semantic class naming in your current XHTML I suggest you see the related links after &#8216;Automated Conversion&#8217; in this post. &#8211; <a href="/your-questions-answered-1/">http://html5doctor.com/your-questions-answered-1/</a></p>
<h2>There we have it folks&hellip;</h2>
<p>Another quick round up of some of the more difficult questions we&#8217;ve had to respond to over the last few weeks. We hope that you&#8217;ll find this article helpful and remember that if you have a question that hasn&#8217;t been covered in an article so far feel free to get in touch, you never know, your question might just appear in one of these posts.
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/your-questions-answered-3/" rel="bookmark" class="crp_title">Your Questions Answered #3</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-1/" rel="bookmark" class="crp_title">Your questions answered #1</a></li>
<li><a href="http://html5doctor.com/html-5-xml-xhtml-5/" rel="bookmark" class="crp_title">HTML 5 + XML = XHTML 5</a></li>
<li><a href="http://html5doctor.com/your-questions-17/" rel="bookmark" class="crp_title">Your Questions #17</a></li>
<li><a href="http://html5doctor.com/your-questions-14/" rel="bookmark" class="crp_title">Your Questions #14</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/your-questions-answered-2/" rel="bookmark">Your questions answered #2</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on August 20, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

