<?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>Webmonkey &#187; HTML</title>
    <atom:link href="http://www.webmonkey.com/tag/html/feed/" rel="self" type="application/rss+xml" />
    <link>http://www.webmonkey.com</link>
    <description>The Web Developer&#039;s Resource</description>
    <lastBuildDate>Mon, 06 May 2013 17:29:19 +0000</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://wordpress.org/?v=3.4.2</generator>
    
    <item>
        <title>The Very First Website Returns to the Web</title>
        <link>http://www.webmonkey.com/2013/04/the-very-first-website-returns-to-the-web/</link>
        <comments>http://www.webmonkey.com/2013/04/the-very-first-website-returns-to-the-web/#comments</comments>
        <pubDate>Tue, 30 Apr 2013 13:09:54 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=61742</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[history]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/04/WWW_logo_by_Robert_Cailliau_200_0-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/04/WWW_logo_by_Robert_Cailliau_200_0.jpg" alt="The Very First Website Returns to the Web" /></div>CERN has resurrected the very first webpage that Tim Berners-Lee and the WWW team ever put online, offering a hands-on look at the proto-web.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_61746" class="wp-caption alignleft" style="width: 230px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/04/WWW_logo_by_Robert_Cailliau_200_0.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2013/04/WWW_logo_by_Robert_Cailliau_200_0.jpg" alt="" title="WWW_logo_by_Robert_Cailliau_200_0" width="220" height="167" class="size-full wp-image-61746" /></a><p class="wp-caption-text">Robert Cailliau&#8217;s original WWW logo. <em>Image: <a href="http://first-website.web.cern.ch/">CERN</a></em>.</p></div>
<p>Twenty years ago today CERN <a href="https://cds.cern.ch/record/1164399">published a statement</a> that made the World Wide Web freely available to everyone. To celebrate that moment in history, CERN is bringing the very first website back to life at its original URL.</p>
<p>If you&#8217;d like to see the very first webpage Tim Berners-Lee and the WWW team ever put online, point your browser to <a href="http://info.cern.ch/hypertext/WWW/TheProject.html">http://info.cern.ch/hypertext/WWW/TheProject.html</a>. </p>
<p>For years now that URL has simply redirected to the root info.cern.ch site. But, because we all know <a href="http://www.w3.org/Provider/Style/URI.html">cool URIs don&#8217;t change</a>, CERN has brought it back to life. Well, sort of anyway. The site has been reconstructed from an archive hosted on the W3C site, so what you&#8217;re seeing is a 1992 copy of the first website. Sadly this is, thus far, the earliest copy anyone can find, though the team at CERN is hoping to turn up an older copy.</p>
<p>Be sure to view the source of the first webpage. You&#8217;ll find quite a few things about early HTML that have long since changed &#8212; like the use of <code>&lt;HEADER&gt;</code> instead of <code>&lt;HEAD&gt;</code> or the complete absence of a root <code>&lt;HTML&gt;</code> tag. There&#8217;s also a trace of Berners-Lee&#8217;s <a href="http://www.w3.org/People/Berners-Lee/WorldWideWeb.html">famous NeXT machine</a> in the <code>&lt;NEXTID N="55"&gt;</code> tag.</p>
<p>CERN has big plans for the original website, starting with bringing the rest of the pages back online. &#8220;Then we will look at the first web servers at CERN and see what assets from them we can preserve and share,&#8221; writes CERN&#8217;s Dan Noyes. &#8220;We will also sift through documentation and try to restore machine names and IP addresses to their original state.&#8221;</p>
<p>In the mean time, have a look at the web&#8217;s <a href="http://info.cern.ch/hypertext/WWW/Bugs.html">original todo list</a> and read more about <a href="http://markboulton.co.uk/journal/firstwebsite">the project to restore the first website</a> over on Mark Boulton&#8217;s blog.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/04/the-very-first-website-returns-to-the-web/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>It&#8217;s the End of the &#8216;Blink&#8217; Tag as We Know It</title>
        <link>http://www.webmonkey.com/2013/04/its-the-end-of-the-blink-tag-as-we-know-it/</link>
        <comments>http://www.webmonkey.com/2013/04/its-the-end-of-the-blink-tag-as-we-know-it/#comments</comments>
        <pubDate>Wed, 10 Apr 2013 13:39:19 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=61569</guid>
        		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Visual Design]]></category>
		<category><![CDATA[HTML]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/04/endisnigh_by_Almita_Ayon_flickr-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/04/endisnigh_by_Almita_Ayon_flickr.jpg" alt="It&#8217;s the End of the &#8216;Blink&#8217; Tag as We Know It" /></div>And we feel fine, really. In fact, the whole web will feel fine should Firefox -- the last browser still supporting the non-standard and highly-annoying blink tag -- decide to finally drop support for it.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_61571" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/04/endisnigh_by_Almita_Ayon_flickr.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2013/04/endisnigh_by_Almita_Ayon_flickr.jpg" alt="" title="endisnigh_by_Almita_Ayon_flickr" width="580" height="359" class="size-full wp-image-61571" /></a><p class="wp-caption-text">The end is nigh. <em>Image: <a href="https://secure.flickr.com/photos/almitaayon/8029801761/">Almita Ayon/Flickr</a></em>.</p></div>Mozilla developers are currently <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857820">debating</a> how to drop support for the much-maligned <code>&lt;blink&gt;</code> tag. </p>
<p>With Opera moving to Google&#8217;s <a href="http://www.webmonkey.com/2013/04/what-googles-webkit-fork-means-for-the-web-and-web-developers/">new Blink rendering engine</a>, which, despite the name, does not support the blink tag, Mozilla finds itself in the strange position of having the only rendering engine that does in fact parse and display blinking text like it&#8217;s 1996.</p>
<p>Originally conceived (and implemented) as <a href="http://www.montulli.org/theoriginofthe%3Cblink%3Etag">a drunken joke</a>, blinking text isn&#8217;t just bad usability &#8212; usability guru Jakob Nielsen famously called <code>&lt;blink&gt;</code> &#8220;<a href="http://www.nngroup.com/articles/original-top-ten-mistakes-in-web-design/">simply evil</a>&#8221; &#8212; it can potentially induce seizures. Even if you aren&#8217;t prone to seizures, blinking text is downright annoying.</p>
<p>But while few may mourn the passing of the <code>&lt;blink&gt;</code> scourge, really, where would we be without it? Despite never being part of any HTML specification the blink tag managed to take the early web by storm, driven especially by the design prowess of early Geocities homepage creators. </p>
<p>Indeed without <code>&lt;blink&gt;</code> would there have been a Geocities? And without Geocities would there have been a MySpace? And without MySpace would there have been, well, let&#8217;s stop there.  </p>
<p>Sadly, the end of the blink tag will not mean the end of blinking text on the web. It will ruin this <a href="http://divshot.github.io/geo-bootstrap/">fabulous Twitter Bootstrap theme</a> we&#8217;ve had our eye on, but there are still plenty ways to get text to blink &#8212; CSS and JavaScript are both, regrettably, up to the task.</p>
<p>So far there&#8217;s been <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857820">little protest</a> about removing <code>&lt;blink&gt;</code> support from Firefox. There&#8217;s been some debate as to where or not the CSS 2.1 <code>text-decoration: blink;</code> rule should go with it (yes!), but the tag itself is most likely headed for the dustbin of web history.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/04/its-the-end-of-the-blink-tag-as-we-know-it/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>&#8216;Main&#8217; Element Lands a Starring Role in HTML</title>
        <link>http://www.webmonkey.com/2013/02/main-element-lands-a-starring-role-in-html/</link>
        <comments>http://www.webmonkey.com/2013/02/main-element-lands-a-starring-role-in-html/#comments</comments>
        <pubDate>Mon, 04 Feb 2013 16:03:41 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60791</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[Main]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/02/mainstar1-200x100.png" type="image/png" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/02/mainstar1.png" alt="&#8216;Main&#8217; Element Lands a Starring Role in HTML" /></div>HTML5 introduces a lot of new tags, but none of them help you indicate the main point of a webpage. The aptly named "main" element will change that. The proposed main element is now part of the HTML draft specification and you can use it today.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_60797" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/02/mainstar1.png"><img src="http://www.webmonkey.com/wp-content/uploads/2013/02/mainstar1.png" alt="" title="mainstar" width="580" height="352" class="size-full wp-image-60797" /></a><p class="wp-caption-text"><em>Original Image by <a href="https://secure.flickr.com/photos/christianhaugen/3556081167/in/photostream/">Christian Haugen/Flickr</a></em></p></div>HTML5 introduces several new tags that give HTML more semantic meaning. There&#8217;s <code>&lt;nav&gt;</code> for navigation elements, <code>&lt;header&gt;</code> for headers, <code>&lt;footer&gt;</code> for footers and now a new element has been <a href="http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-main-element">added to the HTML draft spec</a> &#8212; <code>&lt;main&gt;</code>, to wrap around, well, the main content on a page.</p>
<p>As we reported back when the W3C&#8217;s HTML Working Group <a href="http://www.webmonkey.com/2012/12/proposed-main-element-would-help-html-get-to-the-point/">first considered adding it to the list of HTML elements</a>, the primary purpose of the main element is to map the <a href="http://www.w3.org/TR/wai-aria/roles#landmark_roles">WAI-ARIA landmark role</a> &#8220;main&#8221; to an HTML element. </p>
<p>Thanks to the hard work of developer <a href="http://www.paciellogroup.com/blog/author/admin/">Steve Faulkner</a>, who wrote up the <a href="http://www.w3.org/html/wg/wiki/User:Sfaulkne/main-usecases">proposal for <code>&lt;main&gt;</code></a> and did much of the hard work convincing the Working Group that it was worth adding to the spec, you can start using the main element today. In fact <code>&lt;main&gt;</code> is already natively supported in nightly builds of Firefox and Chrome.</p>
<p>There&#8217;s an ongoing debate as to whether more than one <code>&lt;main&gt;</code> element should be allowed on the page. Currently the W3C&#8217;s draft of the spec explicitly prohibits more than one <code>&lt;main&gt;</code> per page, but the WHATWG&#8217;s version of the spec is less specific. </p>
<p>It might sound counter-intuitive to have more than one <code>&lt;main&gt;</code> per page, but the argument is that the rest of the new block level tags have no such restrictions. In other words, there can be more than one <code>&lt;header&gt;</code>, more than one <code>&lt;footer&gt;</code> and more than one <code>&lt;nav&gt;</code> so why not more than one <code>&lt;main&gt;</code>? Developer Jeremy Keith has a post on <a href="http://adactio.com/journal/6014/">why more than one <code>&lt;main&gt;</code> could be a good idea</a>. [Update: There's also been some <a href="http://lists.w3.org/Archives/Public/public-html/2013Feb/thread.html#msg3">discussion on the HTML WG mailing list</a> and a call for <a href="http://lists.w3.org/Archives/Public/public-html/2013Feb/0007.html">supporting data</a>. As Steven Falkner notes in the comments below "the discussion continues, but at this stage there is no evidence that such a change will bring a benefit to users and may well complicate the usage of the feature and dilute its meaning and benefit for users."]</p>
<p>For now we suggest sticking to just one main element per page, which simplifies using <code>&lt;main&gt;</code>. Chances are you have something like <code>&lt;div id="main"&gt;</code> in your code right now. To use the new main element, just rewrite that to be <code>&lt;main role="main"&gt;</code>.</p>
<p>The <code>role="main"</code> may seem redundant, and someday it will be, but right now it acts as a polyfill for older web browsers, ensuring that they map the element to accessibility APIs. Older browsers will also need to be told about the element&#8217;s block level status with <code>main {display:block;}</code>. <a href="https://github.com/aFarkas/html5shiv/">HTML5 shiv</a>, a popular way to add support for the new elements to older browsers, has already been updated to support <code>&lt;main&gt;</code>.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/02/main-element-lands-a-starring-role-in-html/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Skip the Lists for a More Accessible Web</title>
        <link>http://www.webmonkey.com/2013/01/html-basics-do-menus-need-list-tags/</link>
        <comments>http://www.webmonkey.com/2013/01/html-basics-do-menus-need-list-tags/#comments</comments>
        <pubDate>Wed, 30 Jan 2013 19:45:36 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60750</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Basics]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/01/soupoftheday-tags-200x100.png" type="image/png" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/soupoftheday-tags.png" alt="Skip the Lists for a More Accessible Web" /></div>Long ago it was decided that website menus shall be marked up with HTML list elements. But that was long ago; now we have the new elements in HTML5. Developer Chris Coyier argues its time to ditch the lists and simplify your menu code.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_60752" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/01/soupoftheday-tags.png"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/soupoftheday-tags.png" alt="" title="soupoftheday-tags" width="580" height="395" class="size-full wp-image-60752" /></a><p class="wp-caption-text">Soupe du jour: tags. <em>Image: <a href="https://secure.flickr.com/photos/clogozm/3863502019/">clogozm/Flickr</a></em></p></div>Somewhere far in the web&#8217;s primordial past it was decided that the best way to mark up a menu in HTML was to use the unordered list element: <code>&lt;ul&gt;</code>. The vast majority of tutorials &#8211; if not all &#8211; you&#8217;ll ever see for creating navigation menus use the familiar list element structure, nesting links inside <code>&lt;li&gt;</code> tags. Menu plugins for WordPress and other popular publishing systems use lists for menus as well. Even the HTML5 spec uses an unordered list in its <a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#the-nav-element"><code>&lt;nav&gt;</code> element examples</a>.</p>
<p>There is, as CSS-Tricks&#8217; Chris Coyier <a href="http://css-tricks.com/navigation-in-lists-to-be-or-not-to-be/">writes</a>, &#8220;no debate&#8221; about how menus should be marked up. But HTML5 adds the <code>&lt;nav&gt;</code> element and there&#8217;s also a <code>navigation</code> role in <a href="http://www.webmonkey.com/2011/01/styling-webpages-with-arias-landmark-roles/">WAI-ARIA</a> so should we still be using lists to mark up menus?</p>
<p>Coyier says no. He&#8217;s dropped lists from his <code>&lt;nav&gt;</code> elements and instead uses just links and span tags. Coyier cites a talk by Reinhard Stebner, who is blind, and suggests that with most screen readers the far better solution for menus is to use divs and spans for menus.</p>
<p>Be sure to read through Coyier&#8217;s post for some more data on why ditching the list might be a good idea and <a href="http://jimdoran.net/joy/webdesign/refresh-web-accessibility">check out Jim Doran&#8217;s write up on Stebner&#8217;s original talk</a>, which makes a distinction between <em>accessible</em> and <em>usable</em>. That is, a technically &#8220;accessible&#8221; site might still be a usability nightmare for some users.</p>
<p>However, as Mozilla&#8217;s Chris Heilmann points out in the comments of Coyier&#8217;s post, the problems lists cause in some screen readers are really a result of the sorry state of screen readers. &#8220;Screen readers are damn slow to update and vary immensely between different versions… I gave up a long time ago calling something accessible or not when it works in Jaws.&#8221;</p>
<p>Lists for menus have advantages over the div and span route, like some extra elements for styling and the fact that they render as, well, lists even in the absence of CSS.</p>
<p>What do you think? Are lists for menus a legacy workaround we no longer need in the day and age of <code>&lt;nav&gt;</code> and <code>role=&quot;navigation&quot;</code>? Or do they still offer enough advantages to keep using for menus?</p>
<p>For his part Coyier says he&#8217;s going to keep building list-free menus. &#8220;Until I see some solid research that suggests that&#8217;s dumb, I&#8217;m sticking to it,&#8221; he writes. &#8220;As always, the best would be to get more information from real screen reader users like Reinhard.&#8221;</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/01/html-basics-do-menus-need-list-tags/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>HTML5 Inches Closer to the Finish Line</title>
        <link>http://www.webmonkey.com/2012/12/html5-inches-closer-to-the-finish-line/</link>
        <comments>http://www.webmonkey.com/2012/12/html5-inches-closer-to-the-finish-line/#comments</comments>
        <pubDate>Tue, 18 Dec 2012 16:02:29 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60389</guid>
        		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[W3C]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/12/5_w.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/12/5_w.jpg" alt="HTML5 Inches Closer to the Finish Line" /></div>Creating a new web standard is a long, slow process, but every now and then there's visible progress. Today the W3C -- the group that oversees the development of web standards -- has announced that HTML5 is moving to "Candidate Recommendation" status, which puts it just two heartbeats away from becoming an official standard. ]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_59200" class="wp-caption alignleft" style="width: 310px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/09/html5.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/09/html5.jpg" alt="" title="html5" width="300" height="342" class="size-full wp-image-59200" /></a><p class="wp-caption-text"><em>Image: Screenshot/Webmonkey</em>.</p></div>The W3C has an early Christmas present for web developers: The standards body that oversees the lingua franca of the web has <a href="http://www.w3.org/News/2012#entry-9667">published</a> the complete definition of the HTML5 specification. </p>
<p>HTML5 isn&#8217;t an official standard yet, but the move to what the W3C calls &#8220;Candidate Recommendation&#8221; (CR) status means that the spec is largely stable, features are frozen, and testing can begin. In other words, the W3C is on track to <a href="http://www.webmonkey.com/2012/09/w3c-unveils-plan-to-finish-html5-in-2014/">publish the final version of HTML5 by 2014</a>.</p>
<p>While developers targeting modern web browsers are already using HTML5 and many of its accompanying APIs, the move to CR status is nevertheless important because it marks the beginning of the interoperability and testing phase. Testing helps ensure that HTML5 can be implemented compatibly across browsers, servers, authoring tools and the dozens, if not hundreds, of other potential HTML5 clients &#8212; think your television, your car, your refrigerator and beyond. </p>
<p>HTML5 will likely be the language of the fabled <a href="http://www.wired.com/opinion/2012/12/20-12-st_thompson/">Internet of Things</a> and the lengthy testing period &#8212; the W3C plans for testing to last through 2014 &#8212; is designed to make sure that everything in the web of the future plays nicely together.</p>
<p>To go along with HTML5&#8242;s progress, the W3C has also published the <a href="http://www.w3.org/html/wg/drafts/html/FPWD51/Overview.html">First Public Working Draft</a> of HTML5&#8242;s successor &#8212; HTML5.1. Although the W3C has &#8220;modularized&#8221; much of HTML5 over the years, spinning off sections like Web Workers, WebSockets, Microdata and half a dozen others, which are all now separate specifications at the W3C, the group plans to continue with versioned releases as well.</p>
<p>At the moment there isn&#8217;t much to see in the HTML5.1 spec, but look for the HTML5.1 draft to grow as new ideas are proposed. </p>
<p>It&#8217;s worth noting that, while the CR publication is generally a good thing, there are <a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;component=HTML5%20spec&amp;product=HTML%20WG&amp;list_id=3367">still over 100 known bugs</a> and <a href="https://twitter.com/tabatkins/status/280825291620896770">not everyone is happy</a> with the decision to move HTML5 forward. But moving forward it is. After the CR stage is finished, the next step for HTML5 will be &#8220;proposed recommendation&#8221; status. From there HTML5 will become a final standard &#8212; if all goes according to plan &#8212; in 2014. </p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/12/html5-inches-closer-to-the-finish-line/feed/</wfw:commentRss>
        <slash:comments>1</slash:comments>

        
    </item>
    
    <item>
        <title>Proposed &#8216;Main&#8217; Element Would Help Your HTML Get to the Point</title>
        <link>http://www.webmonkey.com/2012/12/proposed-main-element-would-help-html-get-to-the-point/</link>
        <comments>http://www.webmonkey.com/2012/12/proposed-main-element-would-help-html-get-to-the-point/#comments</comments>
        <pubDate>Tue, 11 Dec 2012 19:36:28 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60295</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[HTML5]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/12/point3-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/12/point3.jpg" alt="Proposed &#8216;Main&#8217; Element Would Help Your HTML Get to the Point" /></div>HTML5 introduces a lot of new tags, but none of them help you indicate the main point of a page. The aptly named "main" element would change that.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_60370" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/12/point3.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/12/point3.jpg" alt="" title="point" width="580" height="387" class="size-full wp-image-60370" /></a><p class="wp-caption-text"><em>Photo: <a href="https://secure.flickr.com/photos/horiavarlan/4268119107/" target="_blank">Horia Varlan</a>/Flickr</em></p></div></p>
<p>HTML5 has several new tags designed to make HTML more semantic &#8212; there&#8217;s <code>&lt;nav&gt;</code> for navigation elements, <code>&lt;header&gt;</code> for headers, <code>&lt;footer&gt;</code> for footers and now there just might be <code>&lt;main&gt;</code> to wrap around, well, the main content on a page.</p>
<p>The W3C&#8217;s HTML Working Group, which is charged with creating HTML, has <a href="http://lists.w3.org/Archives/Public/public-html/2012Nov/0232.html">accepted a proposal to add a draft specification for the <code>&lt;main&gt;</code> tag to HTML</a>. The actual HTML spec hasn&#8217;t been updated yet, but you can read through the earlier, <a href="https://dvcs.w3.org/hg/html-extensions/raw-file/tip/maincontent/index.html">unofficial <code>&lt;main&gt;</code> docs</a>.</p>
<p>The proposal has been around for some time, but former W3C HTML editor Ian Hickson opposed it on the grounds that its use case was too close to <code>&lt;article&gt;</code>. Since then the mailing list discussion has turned up enough supporters and use cases for a <code>&lt;main&gt;</code> element &#8212; including for a &#8220;reader&#8221; mode like that <a href="http://www.webmonkey.com/2010/06/safari-5s-reader-simplifies-the-web/">offered by Apple&#8217;s Safari</a>, or to exclude non-main content from a search &#8212; that it looks like it will make the cut (Update: <a href="http://www.w3.org/html/wg/wiki/User:Sfaulkne/main-usecases">check out this W3C wiki page</a> for more use cases).</p>
<p>It&#8217;s unlikely that <code>&lt;main&gt;</code> will make it into HTML5, which is about to reach the stable stage after which no new elements can be added, but it could make it to HTML 5.1, due to be finalized by 2016.</p>
<p>As Mozilla WHAT WG member Henri Sivonen <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038219.html">writes</a> on that group&#8217;s mailing list, &#8220;I think it was unfortunate that didn’t make it to the same round of added elements as <code>&lt;header&gt;</code>, <code>&lt;footer&gt;</code>, <code>&lt;nav&gt;</code> and <code>&lt;aside&gt;</code>&#8230; but it&#8217;s not too late to add it &#8212; browsers update faster than they used to.&#8221;</p>
<p>The purpose behind <code>&lt;main&gt;</code> is to give web authors a more semantic way to indicate a page&#8217;s main content. In many ways it mirrors what <a href="http://www.webmonkey.com/2011/11/wai-aria-gets-ready-for-a-starring-role-in-html5/">WAI-ARIA does with the &#8220;main&#8221; role</a>.</p>
<p>In fact, because a <code>&lt;main&gt;</code> element would more or less bring the semantic power of ARIA&#8217;s <code>role=main</code> to HTML proper, you can get most of the benefits of the proposed <code>&lt;main&gt;</code> tag today, by just adding the &#8220;main&#8221; role to your primary content wrapper, something like:</p>
<pre class="brush: js">&lt;div role="main"&gt;
    &lt;article&gt;
        &lt;h1&gt;Top 10 Linkbait Headlines for Hacker News&lt;/h1&gt;
        &lt;time datetime="2012-12-11T03:21:22"&gt;December 11th, 2012&lt;/time&gt;
        &lt;p&gt;... etc &lt;/p&gt;
    &lt;/article&gt;
    &lt;div id="comments"&gt;
        &lt;article&gt;
            &lt;h5&gt;Comment Title&lt;/h5&gt;
            &lt;p&gt;Comment body&lt;/p&gt;
        &lt;/article&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p>In this bit of pseudocode the main role tells the user agent &#8212; a web browser, search engine spider, etc. &#8212; that the primary content of the page is the article and the ensuing discussion in the comments.</p>
<p>So if you can do it already with ARIA why add <code>&lt;main&gt;</code>? The simple truth is that hardly any sites use ARIA roles. Because <code>&lt;main&gt;</code> is simple to use, web developers are more likely to use it and use it correctly (try searching for tutorials on how and when to use <code>&lt;article&gt;</code> and <code>&lt;section&gt;</code> to see the opposite effect), which in turn makes it a more reliable indicator for search engine spiders.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/12/proposed-main-element-would-help-html-get-to-the-point/feed/</wfw:commentRss>
        <slash:comments>1</slash:comments>

        
    </item>
    
    <item>
        <title>W3C Names Four New HTML Editors</title>
        <link>http://www.webmonkey.com/2012/07/w3c-names-new-html-editors/</link>
        <comments>http://www.webmonkey.com/2012/07/w3c-names-new-html-editors/#comments</comments>
        <pubDate>Mon, 30 Jul 2012 16:27:57 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=58101</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WHATWG]]></category>
        <description><![CDATA[How many editors does it take to change a web standard? As it happens, four. Yes, the W3C has named four replacement editors for its temporarily-editor-less HTML5 specification. Perhaps most surprising, two of the four are Microsoft employees.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2011/01/html5logo.jpg" />The World Wide Web Consortium (W3C) has named four new editors of the HTML5 spec to <a href="http://www.webmonkey.com/2012/07/html-groups-part-ways/">replace departing editor Ian Hickson</a>.</p>
<p>The W3C&#8217;s HTML Working Group co-chair Paul Cotton announced the four-way editorship in a <a href="http://lists.w3.org/Archives/Public/public-html/2012Jul/0183.html">e-mail to the W3C&#8217;s public HTML mailing list</a>.</p>
<p>The four new editors include two Microsoft employees, Travis Leithead and Erika Doyle Navara, Apple&#8217;s Ted O&#8217;Conner and Silvia Pfeiffer of Ginger Technologies, a company specializing in HTML video. </p>
<p>&#8220;The Chairs received a large number of applications for the position of HTML5 editor,&#8221; writes Cotton. &#8220;After evaluating all the applications, we chose the above HTML5 editorial team based on the individual qualifications of the new editors as well as the combination of the individual appointee&#8217;s qualifications.&#8221;</p>
<p>The heavy representation of Microsoft is interesting given that Microsoft is not currently a member of the Web Hypertext Application Technology Working Group (WHATWG), the other standards body that oversees HTML. It would seem that Microsoft is doubling down on the W3C version of HTML.</p>
<p>The editor change is part of <a href="http://www.webmonkey.com/2012/07/html-groups-part-ways/">the recent split</a> that sees the two standards bodies jointly responsible for developing the HTML specification, moving in different directions.</p>
<p>The W3C and the WHATWG have long acted as separate bodies, but previously shared an editor, Ian Hickson, who helped ensure that the two specs remained in sync. Then last year the WHATWG announced it was <a href="http://www.webmonkey.com/2012/07/html-groups-part-ways/">dropping the &#8220;5&#8243; version number</a> and would work on HTML as a &#8220;living standard&#8221; sans version numbers. The W3C continued to focus on HTML &#8220;snapshots&#8221; like HTML5.</p>
<p>&#8220;The WHATWG effort is focused on developing the canonical description of HTML,&#8221; <a href="http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0119.html">wrote</a> when he stepped down as W3C editor last week. &#8220;The W3C effort, meanwhile, is now focused on creating a snapshot developed according to the venerable W3C process.&#8221;</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/07/w3c-names-new-html-editors/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Two HTML Standards Diverge in a Wood</title>
        <link>http://www.webmonkey.com/2012/07/html-groups-part-ways/</link>
        <comments>http://www.webmonkey.com/2012/07/html-groups-part-ways/#comments</comments>
        <pubDate>Mon, 23 Jul 2012 14:55:05 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=58055</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WHATWG]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/07/html5logo-w.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/07/html5logo-w.jpg" alt="Two HTML Standards Diverge in a Wood" /></div>The two groups that oversee the lingua franca of the web no longer share a single editor, making them farther apart than ever. So which road should you follow? Hopefully the answer will continue to be both. ]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2011/01/html5logo.jpg" />The two standards bodies that are jointly responsible for developing the HTML specification have cut the final tie that was binding them together.</p>
<p>The World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG) began to move apart last year when the WHATWG announced it would <a href="http://www.webmonkey.com/2011/01/meet-html-the-spec-formerly-known-as-html5/">drop the version number</a> and work on a &#8220;living standard&#8221; sans version numbers. The W3C continued to focus on HTML &#8220;snapshots&#8221; like HTML5.</p>
<p>However, despite that split the two shared an editor, Ian Hickson, who oversees both specs. Or did. In <a href="http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0119.html">an e-mail to the WHATWG mailing list</a>, Hickson announced that he is no longer the editor of the W3C HTML WG spec. The change isn&#8217;t unexpected; in fact Hickson announced it would happen over a year ago, but it does emphasize the growing distance between the two standards.</p>
<p>&#8220;The WHATWG effort is focused on developing the canonical description of HTML,&#8221; writes Hickson on the mailing list. &#8220;The W3C effort, meanwhile, is now focused on creating a snapshot developed according to the venerable W3C process.&#8221;</p>
<p>With different goals for each version of the spec Hickson says that &#8220;the chairs of the W3C HTML working group and myself decid[ed] to split the work into two, with a different person responsible for editing the W3C HTML5, canvas, and microdata specifications than is editing the WHATWG specification.&#8221;</p>
<p>Now, more than ever before there seems to be two versions of HTML. The question for developers is, what does this mean for the future of HTML? In the short term, very little. </p>
<p>The W3C will continue to develop its <a href="http://dev.w3.org/html5/spec/spec.html">fixed-in-time snapshot of HTML5</a> and the WHATWG will keep going with <a href="http://developers.whatwg.org/">the &#8220;living standard&#8221; approach</a>. What some developers fear is that down the road the two specs will diverge in significant ways and HTML will become a messy set of forked standards and varying browser support that lands us back in the bad old days of IE 6. </p>
<p>Anything is possible, but we remain hopeful that that won&#8217;t happen, at least in part because the W3C standard is more of a branch than a fork. </p>
<p>If all goes well the process will remain essentially as it has been for the last few years: a browser adds some shiny new feature, the WHATWG documents it and other browsers implement their own versions. There&#8217;s an awkward, sometimes frustrating period for web developers while browsers tweak and refine their support, but eventually the dust settles and a new standard is added to the W3C&#8217;s version. It may not be a completely ideal process, but it is what&#8217;s managed to bring us this far.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/07/html-groups-part-ways/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Ready or Not, Adaptive-Image Solution Is Now Part of HTML</title>
        <link>http://www.webmonkey.com/2012/05/ready-or-not-adaptive-image-solution-is-now-part-of-html/</link>
        <comments>http://www.webmonkey.com/2012/05/ready-or-not-adaptive-image-solution-is-now-part-of-html/#comments</comments>
        <pubDate>Thu, 17 May 2012 17:00:25 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=56634</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[responsive images]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/05/tablets-screens-w.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/05/tablets-screens-w.jpg" alt="Ready or Not, Adaptive-Image Solution Is Now Part of HTML" /></div>Don't make a web browser? Then you don't have a voice in the future of the web. That seemed to be the message from the WHATWG earlier this week, but fortunately for web developers things aren't really as bad as they may seem.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_56148" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/04/Photo_AdobeShadow2012-03-011.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/04/Photo_AdobeShadow2012-03-011.jpg" alt="" title="Photo_AdobeShadow2012-03-01" width="580" height="328" class="size-full wp-image-56148" /></a><p class="wp-caption-text">So many screens, so few images (testing responsive sites with <a href='http://www.webmonkey.com/2012/03/adobe-shadow-simplifies-mobile-web-testing/'>Adobe Shadow</a>). <em>Photo: Adobe</em>.</p></div></p>
<p>The web needs a more intelligent way to serve images.</p>
<p>No one wants to waste bandwidth sending large images over limited mobile pipes, but everyone wants images to look good on the myriad screens connecting to today&#8217;s web. Currently web authors use a <a href="http://www.webmonkey.com/2012/05/use-your-head-for-a-better-way-to-serve-images/">variety of hacks</a> to (incompletely) work around this problem, but to really solve it the web likely needs new tools. </p>
<p>Unfortunately, thanks to miscommunication between standards bodies, web developers and browser makers, instead of a solution to the image problem what developers got this week feels more like a slap in the face. Eventually an adaptive image solution will likely emerge, but the real lesson for many developers will be about how the standards process works and how they fit into it, if at all.</p>
<p>Webmonkey has previously looked at some proposed solutions to the adaptive image problem. Some very smart web developers came up with the idea of a <code>&lt;picture&gt;</code> element that works much like the current HTML <code>&lt;video&gt;</code> element. These developers thought they had the attention of the Web Hypertext Application Technology Working Group, better known as the WHATWG. Then, earlier this week, Edward O&#8217;Connor, Apple&#8217;s WHATWG representative, proposed another method of solving the problem, using a new <code>srcset</code> attribute on the <code>&lt;img&gt;</code> element. See our <a href="http://www.webmonkey.com/2012/05/use-your-head-for-a-better-way-to-serve-images/">earlier coverage</a> of the <code>srcset</code> attribute for a more detailed look at how it works and compares to the <code>&lt;picture&gt;</code> proposal.</p>
<p>What has web developers up in arms is that Ian Hickson, editor of the WHATWG spec (and better known as Hixie) has already added the <code>srcset</code> attribute to the WHATWG&#8217;s HTML draft spec, seemingly ignoring the months of effort that went into <code>&lt;picture&gt;</code>. Worse, members of the WHATWG apparently weren&#8217;t even aware that developers were putting forth the effort to come up with a solution via the <a href="http://www.w3.org/community/respimg/">Responsive Images community group</a>. Nor were concerns about the <code>srcset</code> syntax given much consideration. Hickson does address some objections to <code>srcset</code> in his <a href="http://lists.w3.org/Archives/Public/public-whatwg-archive/2012May/0247.html">message to the WHATWG</a>, but ends up dismissing most of them.</p>
<p>That doesn&#8217;t match up with how most people envision the web standards process. But as web developer and standards advocate Jeremy Keith <a href="http://adactio.com/journal/5474/">writes</a>, &#8220;this is exactly how the WHATWG is supposed to work. Use-cases are evaluated and whatever Hixie thinks is the best solution gets put in the spec, regardless of how popular or unpopular it is.&#8221;</p>
<p>In fact, think of the WHATWG as the source for initial, rapid development of new features. The group was started by browser makers because the W3C&#8217;s HTML Working Group (HTMLWG) moved too slowly. But if the WHATWG is the source of rapid development, the W3C is an effective check on that speed, ensuring that even those of us who don&#8217;t make web browsers still have a voice in the future of HTML. (see our earlier overview for more on the <a href="http://www.webmonkey.com/glossary/the-difference-between-the-whatwg-and-the-htmlwg/">history and differences between the HTML WG and the WHATWG</a>.)</p>
<p>While the HTML WG is also chaired by Hickson (a position he will soon step down from), it offers a much more democratic (and consequently slower) process and has overridden the WHATWG&#8217;s rash decisions in the past. For example the W3C <a href="http://www.webmonkey.com/2011/11/w3c-adds-time-element-back-to-html5/">added the time element back</a> after <a href="http://www.webmonkey.com/2011/10/html5-drops-the-time-element/">Hickson removed it from the WHATWG spec</a>. </p>
<p>Confused yet? It gets worse. The WHATWG is working on an ever-evolving standard, what it calls <a href="http://www.webmonkey.com/2011/01/meet-html-the-spec-formerly-known-as-html5/">a &#8220;living standard,&#8221;</a> which is different from &#8212; and may well diverge from &#8212; the <a href="http://www.webmonkey.com/2011/02/html5-will-be-done-in-2014-what-comes-next/">snapshot-based standards issued by the W3C</a>, like HTML5. In a comment on longtime web standards champion Jeffery Zeldman&#8217;s <a href="http://www.zeldman.com/2012/05/17/editor-vs-constituencies/">post on the matter</a>, Jeremy Keith writes, &#8220;I don&#8217;t mind if the srcset attribute is in the WHATWG HTML spec but not in the W3C HTML5 spec. If it works, it&#8217;ll end up in a future W3C version number.&#8221;</p>
<p>Implicit in Keith&#8217;s statement is that if the <code>srcset</code> attribute doesn&#8217;t end up working out it won&#8217;t be in HTML5.x and would likely just fade away like the blink tag, the applet tag and other HTML ideas tried and later discarded.</p>
<p>Which is another way of saying developers need not panic. Perhaps web developers don&#8217;t have a voice in the WHATWG simply because we&#8217;ve been using the wrong channels (W3C community groups don&#8217;t seem to be an effective means of communicating with standards bodies, in fact they seem more like <a href="http://i.imgur.com/PXY6u.jpg">this</a>.). If you&#8217;ve got ideas and would like a voice in the future of the web join the <a href="http://www.whatwg.org/mailing-list#standards">WHATWG mailing list</a> and login to the <a href="irc://irc.freenode.net/#whatwg">IRC channel</a>. Introduce yourself, learn the rules and contribute. </p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/05/ready-or-not-adaptive-image-solution-is-now-part-of-html/feed/</wfw:commentRss>
        <slash:comments>1</slash:comments>

        
    </item>
    
    <item>
        <title>Use Your &#8216;Head&#8217; For a Better Way to Serve Images</title>
        <link>http://www.webmonkey.com/2012/05/use-your-head-for-a-better-way-to-serve-images/</link>
        <comments>http://www.webmonkey.com/2012/05/use-your-head-for-a-better-way-to-serve-images/#comments</comments>
        <pubDate>Mon, 14 May 2012 18:08:48 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=56520</guid>
        		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[responsive images]]></category>
        <description><![CDATA[Serving the right image to the right screen can be tricky. Developers need to account for not just screen size, but available bandwidth as well. A new solution solves the problem with just a few lines of code, provided of course that browser makers accept it.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_53661" class="wp-caption alignleft" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/01/tablets.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/01/tablets.jpg" alt="" title="tablets" width="580" height="434" class="size-full wp-image-53661" /></a><p class="wp-caption-text">A better way to serve responsive images. <em>Photo: Ariel Zambelich/Wired.com</em> <a href='http://creativecommons.org/licenses/by-nc/3.0/' ><img style='float:right;padding:0;' src='http://www.wired.com/about/wp-content/gallery/global/creative-commons.gif' class='creative-commons'></a></p></div>Responsive web design has grown well beyond its humble beginnings &#8212; using liquid layouts and media queries to scale websites so they fit any screen &#8212; and now means developers must wrestle with much more complex problems, like serving the right image to the right screen.</p>
<p>Mobile screens are small; downloading full-size images is a waste of bandwidth (and quite possibly users&#8217; money as bandwidth caps become more common). But serving tiny pixelated images to <a href="http://www.webmonkey.com/2012/03/the-web-needs-to-get-ready-for-the-the-high-resolution-future/">increasingly high-resolution screens</a> doesn&#8217;t help users either. There are already dozens of <a href="http://www.webmonkey.com/2011/09/the-current-state-of-responsive-images/">creative solutions to the problem of handling images intelligently in responsive design</a>, but ultimately the web needs more than hacks; it needs a built-in responsive image solution.</p>
<p>The <a href="http://www.w3.org/community/respimg/">Responsive Images community group</a> has been wrestling with this problem for some time and has proposed and refined the <code>&lt;picture&gt;</code> tag, one possible solution. The picture element would work much like the HTML5 <code>&lt;video&gt;</code> tag, with code that looks something like this:</p>
</p>
<pre class="brush: js">
<picture alt="image description">
<source src="mobile.jpg" /> <!-- Matches by default -->
<source src="high-res.jpg" media="min-width: 800px" /> <!-- Avoids duplicate load by overriding previous request. -->
<img src="mobile.jpg" /> <!-- Fallback -->
</picture>
</pre>
<p>Due to a communication breakdown between the WHAT WG, which actually writes the standards, and the community group, which is a way for outsiders to contribute to standards, the WHAT WG is already considering  <a href="http://www.w3.org/community/respimg/2012/05/11/respimg-proposal/">a different proposed solution</a> that involves adding some elements to the good old <code>&lt;img&gt;</code> tag.</p>
<p>The proposed solution comes from Apple&#8217;s Edward O’Connor and mirrors <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035746.html">a similar syntax for background images in CSS</a>. Neither are standards yet and we&#8217;re hoping neither ever become standards. Here&#8217;s an example of the proposed syntax:</p>
<pre class="brush: js">
&lt;img src="face-600-200@1.jpeg" alt=""
set="face-600-200@1.jpeg 600w 200h 1x,
face-600-200@2.jpeg 600w 200h 2x,
face-icon.png       200w 200h"&gt;
</pre>
<p>That&#8217;s a code tangle only a browser maker could love and in the subsequent discussion on the community group post developers are nearly unanimous in preferring the <code>&lt;picture&gt;</code> tag (though many dislike its verboseness). The truth is neither this nor the  <code>&lt;picture&gt;</code> tag is a very appealing solutions.</p>
<p>However, toward the bottom of that discussion thread Denis Leblanc proposes another possible solution, namely, header tags. Matt Wilcox, who created the <a href="http://www.webmonkey.com/2011/08/speed-up-your-responsive-designs-with-adaptive-images/">Adaptive Images solution</a> we&#8217;ve covered before, takes Leblanc&#8217;s idea and <a href="http://www.w3.org/community/respimg/2012/05/13/an-alternative-proposition-to-and-srcset-with-wider-scope/">runs with it in another post</a>. What Leblanc proposes is creating a new head tag that would allow web developers to create breakpoints with a media-query-like syntax:</p>
<pre class="brush: js">
&lt;head&gt;
&lt;meta name='case' data='breakpoint1' media='min-width:350px' /&gt;
&lt;meta name='case' data='breakpoint2' media='min-width:1000px' /&gt;
&lt;/head&gt;
</pre>
<p>Here&#8217;s Wilcox&#8217;s explanation of how it would work:</p>
<blockquote>
<p>What the code above does is set &#8220;case&#8221; to equal a particular value, when a media query expression is matched. And if that&#8217;s done in the HTML <code>&lt;head&gt;</code> we know that absolutely everything else can rely on it &#8212; the <code>&lt;head&gt;</code> is the very first thing parsed by a browser, even before anything inside <code>&lt;body&gt;</code>. Anyone familiar with working on the ‘responsive images’ problem should at this point be getting very excited. It means that the browser can be aware of the need to adapt before any pre-fetch behaviours have been triggered by finding an <code>&lt;img /&gt;</code> element in the mark-up. That is a major advantage and is how this solution solves the problem of image pre-fetch.</p>
</blockquote>
<p>In other words, this solution neatly avoids downloading anything other than only the image needed, saving bandwidth and processing power. Then in your body you would simply write:</p>
<pre class="brush: js">
&lt;img src='/content/images/{case}/photo.jpg' alt='' /&gt;
</pre>
<p>It&#8217;s certainly less verbose than either of the other proposals, needing only a single image element with no custom properties or other code. It&#8217;s also backward-compatible provided you either create a directory called &#8220;{case}&#8221; on your server or alias the path to an existing file. Browsers that don&#8217;t understand the syntax simply serve the image referenced and those that do choose the appropriate image from the meta tag breakpoints you&#8217;ve set. </p>
<p>In short, this looks like a very ideal solution from a web author&#8217;s point of view. Whether or not browser makers and the standards bodies agree remains to be seen. One possible strike against it is that it would add variables to HTML in the form of the {case} syntax, but variables are already part of CSS and JavaScript, so why not HTML?</p>
<p>None of these proposals is anything more than an idea at this stage &#8212; though there is already a <a href="http://pci.github.com/metavar_polyfill/">JavaScript polyfill</a> for the new head tag idea &#8212; but if you&#8217;d like to keep up with what&#8217;s happening, be sure to keep an eye on the W3C&#8217;s <a href="http://www.w3.org/community/respimg/">Responsive Images community group</a>. It&#8217;s not going to happen overnight, but eventually standards bodies and browser makers are going to start implementing solutions and the more experimenting web developers have done, the better those solutions will be. It&#8217;s your web after all, so make it better.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/05/use-your-head-for-a-better-way-to-serve-images/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    </channel>
</rss>
