<?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>Mozilla Hacks - the Web developer blog &#187; Debugging</title>
	<atom:link href="http://hacks.mozilla.org/category/debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://hacks.mozilla.org</link>
	<description>hacks.mozilla.org</description>
	<lastBuildDate>Wed, 08 Feb 2012 22:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Firefox &#8211; tons of tools for web developers!</title>
		<link>http://hacks.mozilla.org/2011/11/firefox-tons-of-tools-for-web-developers/</link>
		<comments>http://hacks.mozilla.org/2011/11/firefox-tons-of-tools-for-web-developers/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 08:25:17 +0000</pubDate>
		<dc:creator>Robert Nyman</dc:creator>
				<category><![CDATA[Add-ons]]></category>
		<category><![CDATA[Aurora]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Developers]]></category>

		<guid isPermaLink="false">http://hacks.mozilla.org/?p=10242</guid>
		<description><![CDATA[One of the goals of Firefox have always been to make the lives of web developers as easy and productive as possible, by providing tools and a very extensible web browser to enable people to create amazing things. The idea here is to list a lot of the tools and options available to you as [...]]]></description>
			<content:encoded><![CDATA[<p>One of the goals of Firefox have always been to make the lives of web developers as easy and productive as possible, by providing tools and a very extensible web browser to enable people to create amazing things. The idea here is to list a lot of the tools and options available to you as web developers using Firefox.</p>
<p><span id="more-10242"></span></p>
<h2>Native developer tools in Firefox</h2>
<p>We are working on building a great set of developer tools for you included in Firefox. They are described much more in detail in <a href="http://hacks.mozilla.org/2011/11/developer-tools-in-firefox-aurora-10/">Developer Tools in Firefox Aurora 10</a> and there are some very interesting implications for what we can accomplish with them!</p>
<p>We are evaluating and experimenting with a number of user interfaces and code approaches to try and find the most optimal ways to work with code in a page. If you install <a href="http://www.mozilla.org/en-US/firefox/channel/">Firefox Aurora</a> you can try them out right now! Let us know what you think.</p>
<p><img src="http://blog.mozilla.com/devtools/files/2011/11/Breadcrumbs.png" alt="A picture of the native Developer Toosl in Firefox Aurora"></p>
<p>Also stay tuned to this blog, since we will post updates on progress and features for the native Developer Tools.</p>
<h2>Firebug</h2>
<p>By far, the most well-known web developer tool in a web browser is the <a href="http://getfirebug.com/">Firebug extension</a>, and without a doubt, for a long time it set the bar for how web developing and debugging should be. Firebug is still a very important tool with lots of powerful features, including a vast number of extensions (see below).</p>
<p>Just something you need to be aware of, though, is with everything that Firebug offers it can be quite heavy when it comes to consuming memory, so use it accordingly.</p>
<h2>Firefox extensions for web developers</h2>
<p>Over the years, a lot of extensions have been developed to help web developers utilize Firefox to the maximum. Some of the most used and well-known are these ones, but please let us know if we have missed any that helps you!</p>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/accessibility-evaluation-toolb/">Accessibility Evaluation Toolbar</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/5809-32.png?modified=1314753183">Support web developers in testing web resources for accessibility features.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/all-in-one-sidebar/">All in One Sidebar</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/1027-64.png?modified=1308857467">AiOS lets you open various windows as sidebar panels, and quickly switch between them. So it put an end to the window chaos! In addition to bookmarks and history it opens dialogues such as downloads, add-ons and more in the sidebar.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/cache-status/">Cache Status</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Easy cache status &amp; management from status.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/cachetoggle/">CacheToggle</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Disable (and optionally clear) the browser cache with the flick of a switch.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/colorzilla/">Colorzilla</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/271-64.png?modified=1317665348">Advanced Eyedropper, ColorPicker, Gradient Generator and other colorful goodies.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/console²/">Console²</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/1815-64.png?modified=1311219845">Console² (pronounced Console Squared or Console Two) replaces the JavaScript Console with what could be the next generation Error Console. From v0.5 includes the Console Filter extension previously available separately from the Console² website.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/css-reloader/">CSS Reloader</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">CSS Reloader is an extension that allows you to reload all the CSS of any site without you have to reload the page itself.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/dom-inspector-6622/">DOM Inspector</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM can be navigated using a two-paned window displaying a variety of different views on the document and all nodes within.
</div>
<div class="add-on">
<h3>
        <a href="http://firefogg.org/">Firefogg</a><br />
    </h3>
<p>    <img src="http://firefogg.org/png/firefogg.png">Video and audio encoding for Firefox. With Firefogg you can encode most media files to Ogg and WebM. Firefogg also provides an API to integrate encoding into the upload process.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/fireftp/">FireFTP</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/684-64.png?modified=1315905886">FireFTP is a free, secure, cross-platform FTP/SFTP client for Mozilla Firefox which provides easy and intuitive access to FTP/SFTP servers.
</div>
<div class="add-on">
<h3>
        <a href="http://fireunit.org/">FireUnit</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">JavaScript Unit Testing Extension
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/foxguide/">FoxGuide</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/235272-64.png?modified=1295335696">Display horizontal and vertical floating guides, exactly the way you use it in photoshop. Helps improving layout, placing elements in proper grids, laying out elements symmetrically and structure a design.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/">FoxyProxy Standard</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2464-64.png?modified=1320149104">FoxyProxy is an advanced proxy management tool that completely replaces Firefox&#8217;s limited proxying capabilities. It offers more features than SwitchProxy, ProxyButton, QuickProxy, xyzproxy, ProxyTex, TorButton, etc.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/geolocater/">Geolocater</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Geolocate you where you want.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/">GreaseMonkey</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/748-64.png?modified=1321050245">Customize the way a web page displays or behaves, by using small bits of JavaScript.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/html-validator/">HTML Validator</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/249-64.png?modified=1322054526">HTML Validator is a Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen on the form of an icon.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/httpfox/">HttpFox</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/6647-64.png?modified=1314147649">An HTTP analyzer addon for Firefox.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/">iMacros for Firefox</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/3863-64.png?modified=1318544883">Automate Firefox. Record and replay repetitious work. If you love the Firefox web browser, but are tired of repetitive tasks like visiting the same sites every days, filling out forms, and remembering passwords, then iMacros for Firefox is the solution you’ve been dreaming of!
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/jenkins-build-monitor/">Jenkins Build Monitor</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/7522-64.png?modified=1314882701">Monitor Jenkins (<a href="http://jenkins-ci.org">http://jenkins-ci.org</a>) builds and display the status on Firefox status bar.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/jquery/">jQuery extension</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/14637-64.png?modified=1305548437">jQuery and jQuery UI embedded in browser.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/jsonovich/">JSONovich</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/10122-64.png?modified=1320745806">Pretty-prints JSON content in the browser for easy, unobtrusive viewing.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/jsonview/">JSONView</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/10869-64.png?modified=1319983383">View JSON documents in the browser.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/jsview/">JSView</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2076-64.png?modified=1317668162">If the website you are viewing contains any external js/css files, an icon will appear that says &#8220;SS&#8221;, &#8220;JS&#8221;, or both. Each individual file can then be viewed by clicking on the filename. The file will be opened in a new window.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/link-widgets/">Link Widgets</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Eases navigation within sequences of pages (e.g. Web comics, forums, or technical specifications such as the HTML 4 Recommendation) by providing toolbar buttons for the first, previous, next, and last page.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/">Live HTTP Headers</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/3829-64.png?modified=1305324425">View HTTP headers of a page and while browsing.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/livereload/">LiveReload</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/276301-64.png?modified=1319675424">LiveReload refreshes a web page when files change.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/measureit/">MeasureIt</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/539-64.png?modified=1314145326">Draw a ruler across any webpage to check the width, height, or alignment of page elements in pixels.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/modify-headers/">Modify Headers</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Add, modify and filter the HTTP request headers sent to web servers. This addon is particularly useful for Mobile web development, HTTP testing and privacy.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/noscript/">NoScript</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/722-64.png?modified=1321574645">The best security you can get in a web browser! Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks.
</div>
<div class="add-on">
<h3>
        <a href="http://code.google.com/speed/page-speed/download.html">PageSpeed</a><br />
    </h3>
<p>	<img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Page Speed is an open-source project started at Google to help developers optimize their web pages by applying web performance best practices.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/phoenix/">Phoenix</a><br />
    </h3>
<p>	<img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/11708-64.png?modified=1309374246"> An editor with real time syntax highlighting which allows edit, run and test CSS, HTML and JavaScript code. Phoenix will tell you how many CSS and JS files are loaded into a page, how big these are, it will let you edit, pack and de-obfuscate them.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/pixelzoomer/">PixelZoomer</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/116725-64.png?modified=1309267310">PixelZoomer takes a screenshot of the current website and provides various tools for pixel analysis. You can zoom into websites (up to 3200%), measure distances and pick colors with an eye dropper.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/pixlr-grabber/">Pixlr Grabber</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/9924-64.png?modified=1295997130">Grabbing screens and pulling images from the web just got a bit easier. With the Pixlr Grabber add-on, you can copy, save, share or even edit your final grabs &#8211; including any image or background &#8211; with just a right-click.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/poster/">Poster</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">A developer tool for interacting with web services and other web resources that lets you make HTTP requests, set the entity body, and content type. This allows you to interact with web services and inspect the results.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/quickjava/">QuickJava</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/1237-64.png?modified=1306175238">Allows quick enable and disable of Java, Javascript, Flash, Silverlight, Images, Stylesheets and Proxy from the Statusbar and/or Toolbar without having to open any dialogs!
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/rainbow-color-tools/">Rainbow Color Tools</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/14328-64.png?modified=1315255384">Color tools for web development. Color picker and eyedropper + saving colors and trying out colors with drag and drop.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/rext/">Regular Expressions Tester</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2077-64.png?modified=1320753209">Testing tool for regular expressions with color highlighting (including submatches) and helpers for creating expressions.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/remove-cookies-for-site/">Remove Cookie(s) for Site</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/1595-64.png?modified=1312907482">A very simple extension to remove all the cookies of currently opened site. It adds an option to the Right Click menu of the page, and a Clear Cookies Button to perform this operation. It displays the status of operation in the status bar.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/screenshot-pimp-screengrab-scr/">Screenshot Pimp</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/247573-64.png?modified=1319466784">Capture, grab, save, download, or copy anything you see in your web browser with only one click! Screenshot pimp is by far the most customizable, and user friendly screenshot toolbar available for both Windows and Mac!
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/">SQLite Manager</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/5817-64.png?modified=1313440219">Manage any SQLite database on your computer.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/selenium-ide-buttons/">Selenium IDE Buttons</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/46131-64.png?modified=1302711233">Just one simple toolbar button to open Selenium IDE. You need to have installed Selenium IDE: <a href="http://seleniumhq.org/projects/ide/">http://seleniumhq.org/projects/ide/</a>
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/seoquake-seo-extension/">SeoQuake SEO extension</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/3036-64.png?modified=1321843566">Seoquake is a Firefox SEO extension aimed primarily at helping web masters who deal with search engine optimization (SEO), social media optimization (SMO) and internet promotion. Seoquake allows to investigate many important SEO parameters.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/showip/">ShowIP</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/590-64.png?modified=1306952435">Show the IP address(es) of the current page in the status bar. It also allows querying custom information services by IP (right click) and hostname (left click), like whois, netcraft, etc. Additionally you can copy the IP address to the clipboard.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/stylish/">Stylish</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2108-64.png?modified=1320627544">Restyle the web with Stylish, a user styles manager. Stylish lets you easily install themes and skins for Google, Facebook, YouTube, Orkut, and many, many other sites. You can even customize Firefox and other programs themselves.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/tamper-data/">Tamper Data</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">Use tamperdata to view and modify HTTP/HTTPS headers and post parameters.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/taw3-with-a-click/">TAW3</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/1158-64.png?modified=1275608204">You can have an idea, with a single click, of how accesible web sites are.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/tilt/">Tilt 3D</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/336188-64.png?modified=1320910624">A WebGL-based 3D visualization of a webpage.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/total-validator/">Total Validator</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2318-64.png?modified=1321560970">Perform many different validations in one go. This multiple validator works with external, internal, or local web pages using a local copy of the desktop tool obtained from <a href="http://www.totalvalidator.com/downloads/extensiontool.html">http://www.totalvalidator.com/downloads/extensiontool.html</a>.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/tryagain/">TryAgain</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/2462-64.png?modified=1296721813">TryAgain keeps trying to load a webpage when the server cannot be reached.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/">User Agent Switcher</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/59-64.png?modified=1294322111">The User Agent Switcher extension adds a menu and a toolbar button to switch the user agent of a browser.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/">Wappalyzer</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/10229-64.png?modified=1320449464">Wappalyzer is a browser add-on that uncovers the technologies used on websites.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/web-developer/">Web Developer</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/60-64.png?modified=1294338485">The Web Developer extension adds various web developer tools to a browser.
</div>
<h2>Firebug extensions</h2>
<p>There exists a lot of extensions for Firebug for a number of different use cases, and a number of them are listed here: </p>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/acebug/">Acebug</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/279230-64.png?modified=1319099556">Syntax highlighting for the Firebug command line using Ace. Fuzzy auto completion.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/code-coverage-v2-for-firebug/">Code Coverage v2 for Firebug 0.1</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">This Firebug extension is used to report the Javascript code coverage.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/css-usage/">CSS Usage</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/10704-64.png?modified=1316552583">Firebug extension to view which CSS rules are actually used.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/firecookie/">Firecookie</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/6683-64.png?modified=1321576925">Firecookie is an extension for Firebug that makes possible to view and manage cookies in your browser.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/firefinder-for-firebug/">Firefinder</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/11905-64.png?modified=1315193414">Finds HTML elements matching chosen CSS selector(s) or XPath expression.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/firephp/">FirePHP</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/6149-64.png?modified=1314741183">FirePHP enables you to log to your Firebug Console using a simple PHP method call.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/firequery/">FireQuery</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/12632-64.png?modified=1309313168">Firebug plugin for jQuery development.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/friendly-bug/">friendly bug</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/264087-64.png?modified=1313439064">Makes firebug friendlier and easier to use
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/inline-code-finder-for-firebug/">Inline Code Finder for Firebug</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/9641-64.png?modified=1315192854">Inline Code Finder is an add-on to Firebug, to be able to find HTML elements with any of these issues: Inline JavaScript events, Inline style, javascript: links.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/firerainbow/">FireRainbow</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/9603-64.png?modified=1309314365">Javascript syntax highlighting for Firebug.
</div>
<div class="add-on">
<h3>
        <a href="http://www.softwareishard.com/blog/netexport/">NetExport</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/media//img/addon-icons/default-64.png">NetExport is a Firebug extension that allows exporting all collected and computed data from the Net panel. The structure of the created file uses HTTP Archive (HAR) format (based on JSON).
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/pixel-perfect/">Pixel Perfect</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/7943-64.png?modified=1320924609">Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML.
</div>
<div class="add-on">
<h3>
        <a href="https://addons.mozilla.org/en-US/firefox/addon/yslow/">YSlow</a><br />
    </h3>
<p>    <img src="https://static-cdn.addons.mozilla.net/en-US/firefox/images/addon_icon/5369-64.png?modified=1319008626">YSlow analyzes web pages and why they&#8217;re slow based on Yahoo!&#8217;s rules for high performance web sites.
</div>
<p>There are even more extensions available for Firebug, available in the <a href="http://getfirebug.com/wiki/index.php/Firebug_Extensions">Firebug Extensions wiki</a>.</p>
<style>
	.add-on {overflow: hidden;}
	.add-on h3 {margin-bottom: 10px;}
	.add-on img {float: left; max-width: 28px; vertical-align: top; margin: 0 10px 35px 0;}
</style>
]]></content:encoded>
			<wfw:commentRss>http://hacks.mozilla.org/2011/11/firefox-tons-of-tools-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Debugging and editing webpages in 3D</title>
		<link>http://hacks.mozilla.org/2011/10/debugging-and-editing-webpages-in-3d/</link>
		<comments>http://hacks.mozilla.org/2011/10/debugging-and-editing-webpages-in-3d/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 14:47:09 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Add-ons]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://hacks.mozilla.org/?p=9896</guid>
		<description><![CDATA[Tilt is a Firefox addon that lets you visualize any web page in 3D. A new update is available, coming with more developer-oriented features. Try the addon. Since the first alpha version of Tilt was announced (a Firefox extension focused on creating a 3D visualization of a webpage), a lot of work has been done [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Tilt</strong> is a Firefox addon that lets you visualize any web page in 3D. A new update is available, coming with more developer-oriented features. Try the <a href="#availableasanaddon">addon</a>.</em></p>
<p><object width="500" height="375"><param name="movie" value="http://www.youtube.com/v/_7eG_PONHRw?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_7eG_PONHRw?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="500" height="375" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Since the <a href="http://hacks.mozilla.org/2011/07/tilt-visualize-your-web-page-in-3d/">first alpha version of Tilt was announced</a> (a Firefox extension focused on creating a 3D visualization of a webpage), a lot of work has been done to add a great number of developer-oriented features. These focus on debugging the structure of a webpage, inspecting styling and attributes for each node and seamlessly refreshing the visualization when the DOM structure changes or after contents of document are repainted.</p>
<h2>Solve nesting problems</h2>
<p>Tilt is useful when searching problems in the HTML structure (like finding unclosed DIV elements for example) by providing the extra third dimension, layering each node based on nesting in the DOM tree. Stacks of elements visually represent branches in the DOM, and each node can be inspected for the inner HTML contents, its computed CSS style and the attributes.</p>
<p>Clicking anywhere on the visualization highlights a color-coded rectangle surrounding the corresponding node. Double click shows up the source preview for that node. Tilt also tries to show the most relevant information when needed (one is most likely to inspect the attributes of an input, button or image element, for example, but can easily switch between HTML, CSS and attributes view at any time).</p>
<p><a href="http://hacks.mozilla.org/wp-content/uploads/2011/10/tilt3d2.png"><img class="aligncenter size-full wp-image-9911" src="http://hacks.mozilla.org/wp-content/uploads/2011/10/tilt3d2.png" alt="" width="500" height="312" /></a></p>
<h2>Minidom map</h2>
<p>The “minidom” is a tree view representation showing a minimalistic snapshot of the document object model. Each node is assigned a color associated by tag name (blue for div, green for span etc.) and represented as a strip, along with visual markers for the id and/or class if available. Each one of these strips also has a width relative to the type, id and class name length for the respective element, and the corresponding 3D stack in the visualization has color-coded margins. The coloring for individual elements is easily changeable using the color picker near to the minidom legend.</p>
<p>Clicking a strip in the tree view (or directly a stack on the 3D document visualization mesh) also highlights the node with a colored quad. This behavior is a good way to relate with the Style Inspector, and a more unified interaction between Tilt and other Developer Tools is planned in the future. All of these additions make it easier to analyze the bounds of each node, along with the HTML, computed CSS and attributes.</p>
<h2>Realtime editing</h2>
<p>Because Tilt is able to detect when a webpage’s DOM structure changes or when a repaint is necessary, integration is seamless with existing Developer Tools. Using Tilt and Firebug or Style Editor at the same time is easy. One can enable or disable CSS properties, changing the style of a node, and the visualization changes accordingly.</p>
<p><object width="500" height="375"><param name="movie" value="http://www.youtube.com/v/ae1p5W20Ug8?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ae1p5W20Ug8?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="500" height="375" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><em>To enable realtime updates for the 3D webpage, go to the Options menu and check “Refresh visualization”.</em></p>
<h2>Useful for learning</h2>
<p>Developer tools such as &#8220;view source&#8221; have always been used to help people learn about web development. The 3D view highlights the structure of a page better than a flat view, thus anyone can immediately understand the parent-child relationship between nodes in a webpage, their positioning and how the layout is influenced.</p>
<p>One use case for this is the Hackasaurus mashup. The <a href="http://hackasaurus.org/goggles/" target="_blank">X-Ray Goggles</a> is a nice and fun tool designed to make it easier to learn about the different document node types, the “building blocks” which create a webpage.</p>
<h2>Export</h2>
<p>A requested feature was the ability to export the visualization as a 3D mesh, to be used in games or other 3D editors. Tilt adds the ability to export to <em>.obj</em>, along with a material <em>.mtl</em> file and a <em>.png</em> texture (a screenshot of the entire webpage). The open <em>.obj</em> format ensures the fact that the mesh can be opened with almost any editor. Here’s a ray-traced rendering of <a href="http://hacks.mozilla.org/2011/07/tilt-visualize-your-web-page-in-3d/" target="_blank">hacks.mozilla.org</a> in <a href="http://www.blender.org/" target="_blank">Blender</a>:</p>
<p style="text-align: center"><a href="http://hacks.mozilla.org/wp-content/uploads/2011/10/tilt3d3.png"><img class="aligncenter size-full wp-image-9927" src="http://hacks.mozilla.org/wp-content/uploads/2011/10/tilt3d3.png" alt="" width="500" height="305" /></a></p>
<h2>Fun with experiments</h2>
<p>As soon as it was released, many people found clever and interesting alternative ways to interact with Tilt. One experiment was creating a 3D visualization of an image, by exporting chunks of pixels to a HTML representation. The result was a voxel-like representation, with node blocks and stacks instead of pixels. A simple <a href="http://tinyurl.com/Img2Tilt" target="_blank">Image2Tilt converter</a> was written in JavaScript, and you can try it directly in the browser.</p>
<p><object width="500" height="375"><param name="movie" value="http://www.youtube.com/v/7YXq4gylERE?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7YXq4gylERE?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="500" height="375" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Accelerometer support was another addition based on community request. This shows how easy it is to add functionality that wasn’t originally planned.</p>
<p><object width="500" height="281"><param name="movie" value="http://www.youtube.com/v/rbTLwVEfPn0?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rbTLwVEfPn0?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="500" height="281" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can view the source code, fork it and also contribute to the addon with ideas or feature requests on Github, at <a href="https://github.com/victorporof/Tilt" target="_blank">github.com/victorporof/Tilt</a>.</p>
<h2><a name="availableasanaddon"></a>Available as an addon</h2>
<p>The latest version of <a href="https://github.com/victorporof/Tilt/raw/master/bin/Tilt.xpi" target="_blank">Tilt</a> can be found on <a href="https://github.com/victorporof/Tilt/raw/master/bin/Tilt.xpi" target="_blank">Github</a>, but you can also download Tilt as an <a href="https://addons.mozilla.org/en-US/firefox/addon/tilt/" target="_blank">addon from addons.mozilla.org</a>.</p>
<p>For compatibility, Tilt requires WebGL capabilities. Go to <a href="http://get.webgl.org/" target="_blank">get.webgl.org</a> to check availability and troubleshoot any issues. The current version works with Firefox 6.0 to latest <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">10.0 Nightly releases</a> (latest Nightly builds now also support WebGL anti-aliasing, working great with Tilt).</p>
<p>To start Tilt, hit <em>Control+Shift+M</em> (or <em>Command+Shift+M</em> if you&#8217;re on Mac OS), or go to <strong>Web Developer -&gt; Tilt</strong>, available in the Firefox application menu (or the Tools menu on Mac OS). You can modify this hotkey (and other properties) from the Options menu after starting Tilt.</p>
<p>More information about Tilt, the development process and milestone updates can be found on <a href="http://blog.mozilla.com/tilt">blog.mozilla.com/tilt</a>.</p>
<h2>Future</h2>
<p>Tilt has become an active Developer Tools project, and an ongoing effort is made to integrate it with other existing tools like Style Inspector and Style Editor (<a href="https://github.com/neonux/StyleEditor" target="_blank">source code</a> and <a href="http://neonux.com/StyleEditor/builds/" target="_blank">latest builds</a>). As the 3D view of a webpage has proven to be useful for debugging, this main functionality will gradually become part of Firefox in future releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://hacks.mozilla.org/2011/10/debugging-and-editing-webpages-in-3d/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>A call for quality HTML5 demo markup</title>
		<link>http://hacks.mozilla.org/2010/12/a-call-for-quality-html5-demo-markup/</link>
		<comments>http://hacks.mozilla.org/2010/12/a-call-for-quality-html5-demo-markup/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 20:32:29 +0000</pubDate>
		<dc:creator>Janet Swisher</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web Developers]]></category>
		<category><![CDATA[bestpractices]]></category>
		<category><![CDATA[cleancode]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[maintainability]]></category>

		<guid isPermaLink="false">http://hacks.mozilla.org/?p=6836</guid>
		<description><![CDATA[HTML5 is a necessary evolution to make the web better. Before the HTML5 specs were created we used (and still use) a hacked together bunch of systems meant for describing and linking documents to create applications. We use generic elements to simulate rich interaction modules used in desktop development and we make assumptions as to [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 is a necessary evolution to make the web better. Before the HTML5 specs were created we used (and still use) a hacked together bunch of systems meant for describing and linking documents to create applications. We use generic elements to simulate rich interaction modules used in desktop development and we make assumptions as to what the user agent (browser) can do for the end user. </p>
<p>The good thing about this mess is that it taught us over the last few years to be paranoid in our development approach &#8211; we realised that in order to deliver working, accessible, maintainable and scalable systems we have to be professional and intelligent in our decisions and especially in our planning and architecting. </p>
<p>The trouble is that with the excitement around the cool new HTML5 things to play with a lot of these principles get lost and discarded as outdated. They aren&#8217;t &#8211; part of the mess that the web is in is that in 1999 a lot of people discarded everything else and instead worked only on the new hotness that was Internet Explorer 6 and DHTML. Let&#8217;s not repeat that mistake.</p>
<h2>The two faces of HTML5 enthusiasm</h2>
<p>Right now there are two things to get really excited about in HTML5: the richer, more meaningful semantics of new elements and the APIs that give us deep access into the workings of the browser and the operating system. The former allows us to build much richer interfaces and the latter allows us to build much more complex applications. </p>
<p>All of this comes with the awesome of view source (or check in development tools) for debugging. You can advocate HTML5 by writing clean and useful markup. You can kill it by treating the markup as a second class citizen which is only there to serve the script. </p>
<p>The markup enthusiasts are very happy about HTML5 and make it easy for people to upgrade &#8211; lots of cool new <a href="http://nicolasgallagher.com/anatomy-of-an-html5-wordpress-theme/">blog templates</a> and <a href="http://html5boilerplate.com/">boilerplate HTML templates</a> are being built and <a href="http://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills">polyfills</a> created to allow using the new features and not leave behind outdated browsers. </p>
<p>On the app development side of things it looks much different and that is just sad. My only possible explanation is that people who come from desktop environments now tackle the HTML5 APIs without ever having to care about markup. The pragmatism of HTML5 allows a much more forgiving syntax than XHTML but it shouldn&#8217;t mean that we can just re-apply all the bad mistakes that held us back when it comes to maintenance for years. </p>
<p>During my career as a web developer I realised a few things make a lot of sense when building web apps:</p>
<ul>
<li><strong>If there is an element for a certain task &#8211; use that one</strong>. It is very likely that the element comes with accessibility and interaction features for free that you would otherwise have to simulate.</li>
<li><strong>Separate CSS, JavaScript and HTML</strong> &#8211; which means it is easy to refactor your code without having to change all of them. It also means you can work in parallel with others instead of breaking each other&#8217;s code</li>
<li><strong>Never rely on markup or content</strong> &#8211; as sooner or later some editing tool will come into place that messes with everything you created</li>
</ul>
<p>This means a lot of things: </p>
<ul>
<li>For starters it means that inline styles are simply evil as they override any settings you have in your style sheets. Only use them when this is exactly what you need to do or when you calculate them dynamically.</li>
<li>The same applies to inline scripting. If you have an <code>onclick="foo()"</code> somewhere in your HTML and <code>foo()</code> changes to <code>bar()</code> you have to rename it in every HTML document (of course nowadays it is one template, but it still means hunting down a reference you might miss)</li>
<li>If instead of using a native HTML element for a certain job you use SPANs and DIVs you&#8217;ll have to add classes to make them look and work &#8211; and simulate the keyboard accessibility, too.</li>
<li>You can&#8217;t rely on the text value of any element. A <code>&lt;button&gt;edit&lt;/button&gt;</code> using the &#8220;edit&#8221; as the trigger for certain functionality would have to have the JS localised, too when you create the German <code>&lt;button&gt;bearbeiten&lt;/button&gt;.</code></li>
</ul>
<h2>Bla bla bla&#8230; C&#8217;mon Chris, it isn&#8217;t that bad!</h2>
<p>The above best practices have been mentioned for years and a lot of people get sick of seeing them repeated. After all, this is intelligent development and standard practice in backend technologies. I came across a lot of &#8220;creative&#8221; uses lately though when doing a view-source on HTML5 demos &#8211; specifically the ones in the HTML5 advent calendar. And here is my yield of what people do.</p>
<h2>Simulating a navigation list</h2>
<p>One of the first things I encountered was a painting tool that had a gallery of created graphics as a background. Now, to me this would be a simple list:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;{link}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;{src}&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;{title}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  [...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The markup I found though was this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sky&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;skyTile&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;{calculated styles};display:block&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;skyThumb&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;{src}&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;{generated styles}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;images/thumb_dropShadow.png&quot;</span> </span>
<span style="color: #009900;">         <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;skyThumbShadow&quot;</span> </span>
<span style="color: #009900;">         <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;{generated styles}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  [...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This, of course is generated by the backend. My first gripe is the dropshadow image, after all this is an HTML5 showcase &#8211; just use CSS3. We also have the three instances of generated styles and double classes. Granted, an extra class gives you a handle to all images instead of tiles, so why not. But as there is no real link around the image, the click handler has to read the url from somewhere. There is a lot of unnecessary back and forth between DOM and scripting here which does slow down the whole demo. Seeing that this is also the main navigation from the entry page to the editor this could be a list inside a <a href="http://www.w3.org/TR/html5/sections.html#the-nav-element"><code>nav</code></a> element. A list groups these items together, a bunch of DIVs doesn&#8217;t (screen readers for example tell you how many items there are in a list). </p>
<p>Another list I found was supposed to be links to refresh the app and have a hierarchy but instead was a flat list with classes to define hierarchy and group:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mitems&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;hedtop&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Simple<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mol&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>{name}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  [... repeated ...]
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;hed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>{parent name}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mol&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>{name}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  [... repeated ...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This could be OK, granted you also shift keyboard focus, but why not:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nav<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mitems&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{parent name}
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;{url}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>{name}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      [... repeated ...]
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  [... repeated ...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nav<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This would give you styling hooks and functionality for free. Links and buttons are great to trigger functionality &#8211; but it seems that is too easy.</p>
<h2>Click (probably) here for functionality</h2>
<p>If I build a button for an application to trigger a certain functionality this is the markup:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;button</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;edit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Edit<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/button<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><a href="http://www.w3.org/TR/html5/the-button-element.html#the-button-element">Buttons</a> are what trigger functionality &#8211; both a backend script or a JavaScript. They are keyboard accessible, have a disabled state and sensible out-of-the-box styling that nowadays can be completely overwritten. The class can be the definition of what the button should do &#8211; instead of the text which will change. You could use an ID but a class allows to repeat buttons (for example on the top and the bottom of a results list).</p>
<p>The buttons I found though were slightly different:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;homeButtonPanel&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;homeButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;drawHomeButton&quot;</span> </span>
<span style="color: #009900;">       <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Start Drawing<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;homeButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;viewHomeButton&quot;</span> </span>
<span style="color: #009900;">       <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>View the Mural<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;controlPanel&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;titleButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{title}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainButton mainSelected&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;drawButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Draw<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;inkDisplay&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;inkMeter&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;width: 94px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuContainer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuButton drawMenuButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;behaviorsButton&quot;</span></span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block; opacity: 1;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Gesture<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;br<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Behaviors<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuContainer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuButton drawMenuButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;artworkButton&quot;</span> </span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block; opacity: 1;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Artwork<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuContainer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuButton drawMenuButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;resetButton&quot;</span> </span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block; opacity: 1;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Reset<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuContainer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuButton drawMenuButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;undoButton&quot;</span> </span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block; opacity: 1;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Undo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuContainer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;menuButton drawMenuButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveButton&quot;</span> </span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: block; opacity: 1;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Save<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;viewButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>View<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;secondaryButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;helpButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Help<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainShare shareButtonSmall&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainTwitterButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;twitter&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;images/twitter_icon.png&quot;</span> </span>
<span style="color: #009900;">           <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;opacity: 0.6;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainShare shareButtonLarge&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainFacebookButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;facebook&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;images/facebook_icon.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mainShare shareButtonSmall&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainEmailButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;images/email_icon.png&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;opacity: 0.6;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>So instead of using a nested list with classes for each button and the hierarchy in the nesting we have a lot of classes and a hand-rolled DIV construct. Instead of making buttons really disabled we rely on opacity and there is quite a mix of inline images and background images (if all were background images, they could be one sprite!). Keyboard navigation will have to be written for this and if you were to add a button you&#8217;d have to come up with another ID.</p>
<p>HTML5 actually has a construct for this. There is a <a href="http://www.w3.org/TR/html5/interactive-elements.html#menus"><code>menu</code></a> element with <a href="http://www.w3.org/TR/html5/interactive-elements.html#the-command">command</a> child elements. These are in use in Chrome&#8217;s side bar for example and should be what we use. If you want to make it work for everyone, a nested list with <code>button</code> elements is what to go for.</p>
<p>The overly complex DIV construct is quite used though &#8211; this was another example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;uiScreen&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;startScreen&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;panelBackground&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainResumeButton&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: none;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;largeUIButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;resumeButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Resume Game<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;panelBackground&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainStartButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;largeUIButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;startButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Start Game<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>		
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;panelBackground&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainHelpButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;largeUIButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;helpButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Help<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;panelBackground&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainHighscoreButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;largeUIButton&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;highscoreButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>High Scores<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>When in doubt &#8211; add an ID and class to everything.</p>
<p>Other buttons I encountered were actually links pointing to <code>javascript://</code> using an inline style to indicate hierarchy:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;navlist&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;play&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span> </span>
<span style="color: #009900;">         <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display: inline;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Play<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;pause&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Pause<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;padding-left: 2px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Effects:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;bw&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Bw<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;outline&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Outline<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;color&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Color<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;invert&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Invert<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;matrix&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Matrix<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;old&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript://&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Old<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Talking of inline &#8211; here&#8217;s a great example of a tool generating a lot of code that could be replaced by a single event handler and <a href="http://icant.co.uk/sandbox/eventdelegation/">event delegation</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;tools&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;buttonOut(1)&quot;</span> <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;buttonOver(1)&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;buttonClicked(1)&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;button1&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;button&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image/button/1.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;buttonOut(2)&quot;</span> <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;buttonOver(2)&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;buttonClicked(2)&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;button2&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;button&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image/button/2.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  [...repeated 20 times...]
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;toolsSeparator&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;toolbarButtonSave&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;toolbarButton&quot;</span></span>
<span style="color: #009900;">     <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:saveCanvas()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image/save.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;New&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;toolbarButtonNew&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;toolbarButton&quot;</span></span>
<span style="color: #009900;">     <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:newCanvas()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;New&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image/new.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #808080; font-style: italic;">&lt;!--[if !IE]&gt;&lt;![IGNORE[--&gt;&lt;!--[IGNORE[]]--&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;toolbarButtonMenu&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;toolbarButton&quot;</span></span>
<span style="color: #009900;">     <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span> <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;showMenuHover()&quot;</span></span>
<span style="color: #009900;">     <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:showMenu()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;&amp;gt;&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image/menu.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span> <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;overMenu()&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;saveMenu&quot;</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span> </span>
<span style="color: #009900;">       <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;overMenu()&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:saveCanvas()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      save normal
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;saveMenu&quot;</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span> </span>
<span style="color: #009900;">       <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;overMenu()&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:saveCanvasHi()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      save high quality
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;footnote&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #ddbb00;">&amp;nbsp;</span> (rename to *.png)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span> <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;overMenu()&quot;</span></span>
<span style="color: #009900;">       <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;javascript:showAbout()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      about...
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;lastMenu&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;_top&quot;</span> <span style="color: #000066;">onmouseout</span>=<span style="color: #ff0000;">&quot;closeMenuDelay()&quot;</span></span>
<span style="color: #009900;">       <span style="color: #000066;">onmouseover</span>=<span style="color: #ff0000;">&quot;overMenu()&quot;</span> </span>
<span style="color: #009900;">       <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;{url}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;footnote&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>elsewhere:<span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>a sound memory game<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #808080; font-style: italic;">&lt;!--&lt;![endif]--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Notice that if the images for the button couldn&#8217;t be loaded for one reason or another (or you can&#8217;t see them at all) this application is very confusing indeed &#8211; no alternative text for the images and no text content to fall back to. I am also very much sure that the in and out handlers trigger visual effects CSS could handle better.</p>
<h2>Reasons and effects</h2>
<p>I know there are probably good reasons for all of this, and I am sure I will also do things wrongly when I am rushed or want to get things out quickly. What we have to understand though is that right now we have a responsibility to show the best of breed demos we can. </p>
<p>We cannot preach the open web and technologies and view-source over closed systems and at the same time forget the things we learnt in the last decade. Some of these things I found look like code Frontpage or Dreamweaver could have produced in the 90ies and resulted in a lot of badly performing, hard to maintain products that either still annoy people who have to use them or get replaced every 2 years.</p>
<p>We have a mandate to educate the new developers coming to the web. Unlearning something is much harder than learning it &#8211; so let&#8217;s not start with bloat and quick fixes that work but forget to advocate clean code and thinking about the impact your product has on the end users (thinking accessibility) and the poor sods that will have to maintain your product when you are gone. We are not here to advocate effects and products, we are here to promote the tools that allow anyone to easily build something cool that is also easy to understand. </p>
<p>HTML5 is about evolving the web as a platform &#8211; we also need to evolve with it and take more responsibility. We have app and we have markup enthusiasts. Let&#8217;s make them work together to build things that are great functionality and clean semantics.</p>
]]></content:encoded>
			<wfw:commentRss>http://hacks.mozilla.org/2010/12/a-call-for-quality-html5-demo-markup/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>debugging painting with MozAfterPaint</title>
		<link>http://hacks.mozilla.org/2009/06/mozafterpaint/</link>
		<comments>http://hacks.mozilla.org/2009/06/mozafterpaint/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 04:13:08 +0000</pubDate>
		<dc:creator>Christopher Blizzard</dc:creator>
				<category><![CDATA[35 Days]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Firefox 3.5]]></category>

		<guid isPermaLink="false">http://hacks.mozilla.org/?p=750</guid>
		<description><![CDATA[This was originally posted by Robert O&#8217;Callahan in the Mozilla web-tech blog. It&#8217;s an interesting feature in Firefox 3.5 and is worth repeating here as part of our 35 days effort. In addition, Thomas Robinson has created a very handy bookmarklet for debugging painting on a page you&#8217;ve loaded in the browser. Due to popular [...]]]></description>
			<content:encoded><![CDATA[<p><em>This was originally <a href="https://developer.mozilla.org/web-tech/2008/10/13/mozafterpaint/">posted</a> by Robert O&#8217;Callahan in the Mozilla <a href="https://developer.mozilla.org/web-tech/">web-tech blog</a>.  It&#8217;s an interesting feature in Firefox 3.5 and is worth repeating here as part of our 35 days effort.</em></p>
<p><em>In addition, Thomas Robinson has created a very handy <a href="http://tlrobinson.net/blog/2008/10/14/improved-browser-paint-events-bookmarklet/">bookmarklet</a> for debugging painting on a page you&#8217;ve loaded in the browser.</em></p>
<p>Due to popular demand, we&#8217;ve created a <em>very</em> experimental API for Firefox 3.5 to fire an event every time content is repainted. The event is is called <code>MozAfterPaint</code> and is fired at the document, bubbling up to the window. The event offers <a href="http://mxr.mozilla.org/mozilla-central/source/dom/public/idl/events/nsIDOMNotifyPaintEvent.idl">two attributes</a>, <code>clientRects</code> and <code>boundingClientRect</code>, which tell you what was repainted, using the same objects and coordinate system as the <a href="http://developer.mozilla.org/en/DOM/element.getClientRects">getClientRects</a> and <a href="http://developer.mozilla.org/En/DOM:element.getBoundingClientRect">getBoundingClientRect</a> methods.</p>
<p>This is <a href="http://www.oxymoronical.com/blog/2008/10/How-extensions-can-slow-down-Firefox-my-dirty-little-secret">very useful</a> for Firefox extensions and other &#8220;chrome&#8221; code that might be using the canvas.drawWindow method to capture the contents of windows. It might also be useful for tools like Firebug. But it&#8217;s also potentially useful for regular content, for example if you want to add some lightweight JS instrumentation to a page to measure what gets painted by Firefox, and when.</p>
<p><strong>Caveats</strong>:</p>
<ul>
<li>This is Gecko-only. Do not use this for actual functionality on public Web pages &#8211; although I&#8217;m not sure why anyone would, so I don&#8217;t currently see this as a candidate for standardization.
<li>For security reasons, regular Web content is only notified of repainting that occurred in its own document &#8211; repainting caused by IFRAMEs is not reported to untrusted listeners attached to the IFRAME&#8217;s ancestors. (Listeners added by &#8220;trusted&#8221; content such as Firefox chrome are notified of all repaints to the window, however.)
<li>Currently the event might fire before the actual repainting happens. This shouldn&#8217;t matter much, and we&#8217;ll fix that at some point.
<li>If your event handler does anything that triggers repainting, such as changing the style of an element, you will probably trigger an infinite loop. The browser should stay responsive but your machine will contribute to global warming.
<li>Repainting of areas scrolled outside the viewport is reported, but repainting of areas scrolled outside overflow:auto elements and the like is not reported.
<li>Repainting in windowed plugins (i.e. most plugins in Windows and GTK) is not reported.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hacks.mozilla.org/2009/06/mozafterpaint/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

