<?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; flash</title>
	<atom:link href="http://html5doctor.com/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Wed, 16 May 2012 11:31:21 +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 ;-). 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 :-)</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 ;-). 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 #10</title>
		<link>http://html5doctor.com/your-questions-answered-10/</link>
		<comments>http://html5doctor.com/your-questions-answered-10/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:45:00 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[block links]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[headings]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[outline]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1991</guid>
		<description><![CDATA[<p>The clinic is getting busy with more  <abbr>HTML</abbr>5 ailments. This week, we'll cover using sections within a footer, <code>&#60;canvas&#62;</code> vs. Flash security, why <abbr>HTML</abbr>5 elements are treated as inline, using offline with storage, and marking up block quotes.</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 clinic is getting busy with more  <abbr>HTML</abbr>5 ailments. This week, we&#8217;ll cover using sections within a footer, <code>&lt;canvas&gt;</code> vs. Flash security, why <abbr>HTML</abbr>5 elements are treated as inline, using offline with storage, and marking up block quotes.</p>

<section>
<h2>Footer with sections</h2>

<p>Tommie asked:</p>
<blockquote><p>Hi, I&#8217;ll get to the point right away. I want to use, lets say 3 section elements inside a footer each floating left and inside each of this sections I have some standard information. Is this the right way to go, or should I put my section elements outside the footer and only put copyright text etc. inside the footer?</p>

<p>Thanks!</p></blockquote>

<p>You could use a <code>&lt;section&gt;</code> within <code>&lt;footer&gt;</code>. <del>but <code>&lt;footer&gt;</code> is a sectioning root anyway</del> <ins><code>&lt;footer&gt;</code> is flow content and can contain sectioning content.</ins> If you want them to appear in the outline within the footer, then it makes perfect sense to do as you suggest.</p>

<p>See more in Jack&#8217;s article on <a href="http://html5doctor.com/the-footer-element/">the <code>&lt;footer&gt;</code> element.</a> There are also some more examples in <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element">the spec</a>.</p>

<p>Cheers, Rich</p>
</section>

<section>
<h2><code>&lt;canvas&gt;</code> vs. Flash (security and copyright)</h2>
<p>John asked:</p>
<blockquote><p>I&#8217;m seeing lots of opinions that the <code>canvas</code> element might free us of the Adobe Flash monopoly, but what mechanisms can we use to protect our works when using straight HTML and JavaScript?</p>

<p>Right now I&#8217;m thinking about simple flash games, but I&#8217;m sure this is a concern for others wanting to use (free) <abbr>HTML</abbr> methods to perform functions now reserved more for flash.</p>

<p>Thanks for any input.</p></blockquote>

<p>I&#8217;m not sure of any security mechanisms that we can use to protect <code>&lt;canvas&gt;</code> content. It isn&#8217;t really any different than an image or any other type of resource. Having said that, decompilers can circumvent some of Flash&#8217;s security measures as well, so you may not be much worse off using <code>&lt;canvas&gt;</code>.</p>

<p>If we come across anything, we&#8217;ll be sure to let you know.</p>

<p>Cheers, Rich</p>
</section>

<section>
<h2><abbr>HTML</abbr>5 tags inline?</h2>
<p>Tami asked:</p>
<blockquote><p>So, I&#8217;ve been experimenting with the new <abbr>HTML</abbr>5 elements, and one frustration I have is understanding the native display of the new elements, and how it works within the document flow. So far, experimenting with them has shown them to be very unpredictable. At best, they&#8217;re kind of behaving like a bastard span. They seem to be behaving like inline elements but that seems like it is wrong. In some cases, setting to display: block gives the expected behavior, but on the footer tag, it&#8217;s not interacting with floated elements properly.</p>

<p>So, are these new elements inline or are browsers still just trying to catch up? I tried looking in in the <abbr>HTML</abbr>5 working draft spec, but so far I am not understanding the way its written (<abbr>HTML</abbr>4&#8242;s specs clearly spelled out whether an element was display or inline).</p></blockquote>

<p>Here&#8217;s an article from my personal blog that I wrote a while ago describing <a href="http://www.brucelawson.co.uk/2009/why-browsers-treat-html5-elements-as-inline/">why browsers treat <abbr>HTML</abbr>5 elements as inline</a>.</p>

<p>Thanks, Bruce.</p>
</section>

<section>
<h2>Offline + Storage</h2>
<blockquote><p>Dear Doctor, I&#8217;m trying to work out if <abbr>HTML</abbr>5 will be able to do the job that I want. I have a number of documents (<abbr>PDF</abbr>, <abbr>PPT</abbr>, etc.) that I want to share with people in my team. These documents may change from time to time. Also, the people may not always be connected online.</p>

<p>Would it be possible to &#8220;cache&#8221; documents in an offline database in the browser so that when they are not connected they can still view them but when they are, they get the latest versions (which also refresh the cache)?</p>

<p>That way I can do a fairly pretty interface for sorting these documents so that they can easily find them.</p>

<p>Thanks in advance for any help you can provide.</p></blockquote>

<p>You <em>can</em>, but I would strongly encourage you to think carefully about whether it&#8217;s worth it.</p>

<p>You can include these &#8220;assets&#8221; in the manifest, which will make the files available to the offline applications (note that this <strong>isn&#8217;t</strong> storage, just caching, which is what you&#8217;re after).</p>

<p>The problem is that when the visitor first hits the page with the manifest — which contains all the <abbr>PDF</abbr>s, <abbr>PPT</abbr>s, etc. — it will download <strong>all</strong> of these files. This is the bit that I&#8217;d encourage you to consider carefully. To compound that, I believe there&#8217;s a 5MB limit on the cache, so you might run into problems if you&#8217;re trying to cache more than that.</p>

<p>I&#8217;ve not covered offline cache on <abbr>HTML</abbr>5 Doctor yet (though it&#8217;s on the list), but I have described the process on my <a href="http://24ways.org/2009/breaking-out-the-edges-of-the-browser">24ways article</a>.</p> 

<p>If there are new versions of the cached files, you need to change the <em>contents</em> of the manifest — e.g., include a version number, which will trigger a download of <strong>all</strong> the assets again.  Not ideal, but that&#8217;s the current situation.</p>

<p>Hope that helps a bit, Remy</p>
</section>

<section>
<h2>Correct markup with blockquote</h2>
<p>Phil asked:</p>
<blockquote><p>Hi, in <abbr>HTML</abbr> 4.0 Strict and <abbr>XHTML</abbr> 1.0 Strict, text inside a <code>blockquote</code> element is required to be nested inside another block-level element, e.g. <code>p</code>.</p>

<p>In <abbr>HTML</abbr>5 that requirement seems to have been relaxed, as the following element validates successfully:</p>

<pre><code>&lt;blockquote&gt;This is a blockquote.&lt;/blockquote&gt;</code></pre>

<p>The HTML5 spec uses the <code>p</code> element in the usage examples, but does not mention whether it is required.</p>

<p>Can you please confirm if this requirement has now been deprecated?</p></blockquote>

<p>Great question. As I expected, this validates:</p>

<pre><code>&lt;!doctype html&gt;
&lt;meta charset=utf-8&gt;
&lt;title&gt;blockquote test&lt;/title&gt;
&lt;blockquote&gt;Tiger tiger burning bright&lt;/blockquote&gt;</code></pre>

<p>We double-checked with the <abbr>WHATWG</abbr> mailing list and confirmed that <code>&lt;blockquote&gt;</code> can contain &#8216;flow&#8217; content (i.e., text, paragraphs, etc.).</p>

<p>To summarise, it would be valid not to further mark up content within a <code>&lt;blockquote&gt;</code>, but authors are encouraged to use a <code>&lt;p&gt;</code> (or other more appropriate element).</p>

<p>Bruce</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/go-offline-with-application-cache/" rel="bookmark" class="crp_title">Go offline with application cache</a></li><li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li><li><a href="http://html5doctor.com/your-questions-16/" rel="bookmark" class="crp_title">Your Questions #16</a></li><li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li><li><a href="http://html5doctor.com/your-questions-12/" rel="bookmark" class="crp_title">Your Questions Answered #12</a></li></ul></div><p><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark">Your Questions Answered #10</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on July 9, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-10/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

