<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>The Livetyping blog</title><link href="http://livetyping.capcloud.com/blog/" rel="alternate"></link><link href="http://livetyping.capcloud.com/blog/feeds/all.atom.xml" rel="self"></link><id>http://livetyping.capcloud.com/blog/</id><updated>2016-05-07T00:00:00+01:00</updated><entry><title>Bootstrap: not the solution to every problem</title><link href="http://livetyping.capcloud.com/blog/bootstrap-not-the-solution-to-every-problem.html" rel="alternate"></link><published>2016-05-07T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2016-05-07:blog/bootstrap-not-the-solution-to-every-problem.html</id><summary type="html">&lt;p&gt;&lt;em&gt;or&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;How to deal with the fiddly shit&lt;/h3&gt;
&lt;p&gt;Responsive frameworks are awesome. Whether it's Foundation (my favourite) or Bootstrap (most other people's favourite), they really do save you a lot of time, effort, and pullling-out-of-hair. Using one is real standing-on-the-shoulders-of-giants stuff.&lt;/p&gt;
&lt;p&gt;But they're not perfect. &lt;/p&gt;
&lt;p&gt;You will always run up against something that they just can't help you with. And then you're on your own. Just you, whatever HTML and CSS knowledge you have, and Google to fill in the gaps.&lt;/p&gt;
&lt;p&gt;This post covers one such problem that I had to deal with recently, and shows you how to overcome it. (This isn't one of those "These three easy steps will solve all your Bootstrap woes" posts. There are lots of problems like this, each with its own solution. Or several possible solutions. If you're wrestling with a different problem, send me an &lt;a href="mailto:martin@capcloud.com"&gt;email&lt;/a&gt; or a &lt;script type="text/javascript" async src="https://platform.twitter.com/widgets.js"&gt;&lt;/script&gt;&lt;a href="https://twitter.com/intent/tweet?text=%40martinpolley%20"&gt;tweet&lt;/a&gt; and I'll try to help.)&lt;/p&gt;
&lt;p&gt;The problem I was having (with Bootstrap, so I'll use that here too) was that there was content that was displayed in a modal dialog, but sometimes the content was too wide&amp;mdash;a very long string with no spaces or other natural breaks, and by default, it just ran out of the edge of the modal. And it was generated content that I had no control over, so I couldn't just insert some spaces. Oh, and there was also a Bootstrap label at the beginning of the line of text that had to be handled correctly too.&lt;/p&gt;
&lt;p&gt;It looked something like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A modal with too-long text" src="images/text_overflow_modal.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tikici/3/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;So I had to figure out how to make it wrap. This should be easy. There are a couple of different CSS properties that you can use to force text to wrap. &lt;code&gt;word-break&lt;/code&gt; seemed to work best:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="na"&gt;.modal-header&lt;/span&gt;
&lt;span class="err"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;word-break:&lt;/span&gt; &lt;span class="nf"&gt;break-all&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And it seemed to do the trick:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The text wraps now" src="images/text_overflow_modal_fixed_1.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tikici/8/edit?html,css,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;But I don't really like the way the text on the second line starts under the label, instead of lining up nicely with the text on the first line. Surely it should be easy enough to fix that, right?&lt;/p&gt;
&lt;p&gt;I mean, we should just be able to use Bootstrap's responsive grid. We can just nest another grid in there. And&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Oops" src="images/text_overflow_modal_fixed_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tiqatu/2/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Aughhh! No! That's not what I meant! Why is it like that?&lt;/p&gt;
&lt;p&gt;Ah, I see, it's that close button. It's not even part of the &lt;code&gt;row&lt;/code&gt; that we added, but because of the way it's being positioned (using a &lt;code&gt;float&lt;/code&gt;), it's messing things up. Maybe if we try putting it in its own column?&lt;/p&gt;
&lt;p&gt;&lt;img alt="Nearly there now" src="images/text_overflow_modal_fixed_3.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tiqatu/4/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;That's a lot better. But something still isn't right here. Look at the label. The text wasn't that small before, was it? (I'll save you the trouble of going back and checking&amp;mdash;it wasn't.)&lt;/p&gt;
&lt;p&gt;If we take a look at the label in Chrome dev tools, we can see its font size is 75%:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Label font size" src="images/label_font_size.png" /&gt;&lt;/p&gt;
&lt;p&gt;But 75% of &lt;em&gt;what?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Well, before, it was 75% of whatever our heading 4's font size was. Now I suppose it must be 75% of the base font size, which is presumably less. So. What to do?&lt;/p&gt;
&lt;p&gt;We could go and figure out the font size for &lt;code&gt;h4&lt;/code&gt; and apply that to this label. Or we could just wrap it in &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt; tags. (And we have to add the same class as our existing &lt;code&gt;h4&lt;/code&gt;, otherwise it gets some margins added to it which makes it look crap.) How's that?&lt;/p&gt;
&lt;p&gt;&lt;img alt="Almost done now" src="images/text_overflow_modal_fixed_4.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tiqatu/6/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;One other annoying thing. There's a big gap between the label and the text. Maybe the two columns we gave it were too much. Would just one work?&lt;/p&gt;
&lt;p&gt;&lt;img alt="Kind of" src="images/text_overflow_modal_fixed_5.png" /&gt;&lt;/p&gt;
&lt;p&gt;Well, kind of. But it's touching the text. And on smaller screens it really doesn't work:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Small screen: not good" src="images/text_overflow_modal_fixed_6.png" /&gt;&lt;/p&gt;
&lt;p&gt;Also, if the label text is a bit longer, it will make the label wider, which will also screw things up. Which highlights the point that you need to know the actual content you're going to be displaying and set up your layout with that in mind.&lt;/p&gt;
&lt;p&gt;In fact, on small screens it would probably make more sense to make the label stack above the text&amp;mdash;it's a better use of space. So maybe we should use the small (&lt;code&gt;col-sm-&lt;/code&gt;) or medium (&lt;code&gt;col-md-&lt;/code&gt;) column classes instead of the extra-small (&lt;code&gt;col-xs-&lt;/code&gt;) ones I used to make sure that happens:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Small screen: better" src="images/text_overflow_modal_fixed_7.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tiqatu/8/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;And now we have yet another problem. The "x" close button is now in the wrong place. (Like I said, &lt;em&gt;fiddly shit&lt;/em&gt;.) So let's think, what can we do here? There are a couple of things that come to mind. One thing that Bootstrap lets you do is to &lt;a href="http://getbootstrap.com/css/#grid-column-ordering"&gt;change the order of the columns&lt;/a&gt; depending on the screen size. But I've always found this to be very unintuitive and hard to get my head round.&lt;/p&gt;
&lt;p&gt;A more pragmatic approach might be to say, OK, on a small screen, that tiny "x" is next to useless, and anyway we've got a close button, so let's just hide the "x". Bootstrap's &lt;a href="http://getbootstrap.com/css/#responsive-utilities"&gt;responsive utilities&lt;/a&gt; let you do this (by adding the &lt;code&gt;hidden-xs&lt;/code&gt; class to the &lt;code&gt;div&lt;/code&gt; containing the button):&lt;/p&gt;
&lt;p&gt;&lt;img alt="Small screen: better still" src="images/text_overflow_modal_fixed_9.png" /&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://jsbin.com/tiqatu/10/edit?html,output"&gt;View on JS Bin.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I'm pretty happy with the way this looks now. In the next post, I'll go through an even more fiddly and annoying problem. And if you're wrestling with something fiddly too, &lt;a href="mailto:martin@capcloud.com"&gt;get in touch&lt;/a&gt;&amp;mdash;maybe I'll be able to help.&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;If you found this useful, and you don't want to miss out on other posts like this, &lt;a href="http://livetyping.capcloud.com/news.html"&gt;sign up for my newsletter&lt;/a&gt;.&lt;/p&gt;</summary></entry><entry><title>The Easiest Way to Set Up a Static Prototype/Site</title><link href="http://livetyping.capcloud.com/blog/the-easiest-way-to-set-up-a-static-prototypesite.html" rel="alternate"></link><published>2016-04-30T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2016-04-30:blog/the-easiest-way-to-set-up-a-static-prototypesite.html</id><summary type="html">&lt;p&gt;Often, when you're building a prototype or a simple (maybe static) website, you'll find yourself making a bunch of static HTML pages that you link together. And most of the time, there are things that are the same on every single page. The header. The footer. An email signup form. Etc.&lt;/p&gt;
&lt;p&gt;There are many different ways of avoiding the bother of having to copy and paste this common content between pages (not to mention what a pain it is to edit every single page whenever you need to change something).&lt;/p&gt;
&lt;p&gt;When I was looking for a solution to this problem, I found that most of these ways are quite complicated. There are static site generators like Jekyll, Pelican, and Octopress. (And &lt;a href="https://www.staticgen.com/"&gt;many, many others&lt;/a&gt;.) There are the templating languages, such as Handlebars, Mustache, and Jinja2. And there are powerful but complex frameworks like AngularJS that come with this of functionality built in.&lt;/p&gt;
&lt;p&gt;I've looked at all of these at various times and for various reasons, and I was left gibbering – they were all complete overkill for what I was trying to do. Their learning curves just weren't worth it. &lt;/p&gt;
&lt;p&gt;And then I found &lt;a href="https://github.com/braceio/tags"&gt;Brace Tags&lt;/a&gt;. All it does is pull pieces of content into HTML pages. That's it. Nothing more.&lt;/p&gt;
&lt;p&gt;Let me show you.&lt;/p&gt;
&lt;p&gt;Let's say you've got a web page that looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My homepage&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to my homepage&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Look at all this content!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And you want to add a footer to this page (and to all your other pages). You create a folder called &lt;code&gt;_partials&lt;/code&gt; in the same folder as your HTML files and create a file containing your footer markup in it. Call it, say, &lt;code&gt;footer.html&lt;/code&gt;. Something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Copyright &lt;span class="ni"&gt;&amp;amp;copy;&lt;/span&gt; Martin Polley 2016&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then add one line to the first file to pull in the footer, so it looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My homepage&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to my homepage&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Look at all this content!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    {% include _partials/footer.html %}
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you run Brace Tags on it by typing &lt;code&gt;tags build&lt;/code&gt; at the command line in the folder containing your files. It assembles the pages and puts them in a folder called &lt;code&gt;_site&lt;/code&gt;. That's it. Dead simple, with a minimum of faffing about. &lt;/p&gt;
&lt;p&gt;The thing is, it only runs on OS X or Linux. But I'm on Windows at the moment, so I've set up a virtual machine running Linux &lt;em&gt;just so I can run Brace Tags&lt;/em&gt;. It's worth the hassle of setting up a VM to have access to such a simple, useful tool. &lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;If you found this useful, and don't want to miss out on more like it, &lt;a href="http://livetyping.capcloud.com/news.html"&gt;sign up for my (rather irregular) newsletter&lt;/a&gt;.&lt;/p&gt;</summary></entry><entry><title>Which designers should do what?</title><link href="http://livetyping.capcloud.com/blog/which-designers-should-do-what.html" rel="alternate"></link><published>2016-04-24T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2016-04-24:blog/which-designers-should-do-what.html</id><summary type="html">&lt;p&gt;I really like &lt;a href="https://designnotes.blog.gov.uk/2016/04/22/the-different-types-of-design-in-government/"&gt;this post&lt;/a&gt; from Louise Downe at the UK's Government Digital Service. It lays out very concisely the different type of designers they have, what each one does, and, most importantly, &lt;em&gt;why&lt;/em&gt; they think that's the best way of doing things. Obviously, this is what works for them&amp;mdash;YMMV&amp;hellip;&lt;/p&gt;
&lt;p&gt;This is the sort of thing that makes me proud to be British.&lt;/p&gt;</summary></entry><entry><title>Start learning to code... and why maybe you shouldn't</title><link href="http://livetyping.capcloud.com/blog/start-learning-to-code-and-why-maybe-you-shouldnt.html" rel="alternate"></link><published>2016-04-23T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2016-04-23:blog/start-learning-to-code-and-why-maybe-you-shouldnt.html</id><summary type="html">&lt;p&gt;I've been known to go on about how designers should learn to code. As if it's a universal good. Always true for everyone. &lt;/p&gt;
&lt;p&gt;But maybe that's not the case. Maybe it's more nuanced than that... Peter Merholz thinks so. And he's a pretty smart guy. Lots of experience in the field. In a &lt;a href="http://www.peterme.com/2016/04/13/should-designers-code-fetishizes-tech-over-other-crucial-design-skills/"&gt;recent blog post&lt;/a&gt;, he says that the whole "Should designers code?" argument "fetishizes tech over other crucial design skills."&lt;/p&gt;
&lt;p&gt;His point being that we've been putting too much emphasis on designers being able to code, at the expense of other, no less important skills. IA. User research. Writing, IxD. Etc.&lt;/p&gt;
&lt;p&gt;And he's right.&lt;/p&gt;
&lt;p&gt;Being able to code and being kind of flaky in these other, core UX design skills doesn't make you a good designer. Maybe it doesn't make you a designer at all. But if you have basic competency in these core areas, then you can choose to focus on an area that interests you, and make that your thing. (After all, UX is such a broad field that no-one can be an expert at everything.)&lt;/p&gt;
&lt;p&gt;Maybe that will be interaction design. Maybe it will be content strategy. Maybe IA. Maybe user research.&lt;/p&gt;
&lt;p&gt;Or maybe coding.&lt;/p&gt;
&lt;p&gt;Being able to code lets you create prototypes that work and feel like the real thing. And maybe they will &lt;em&gt;become&lt;/em&gt; the real thing, which means you'll be able to see the design through to delivery, and make sure that what was designed is what actually gets built.&lt;/p&gt;
&lt;p&gt;And if it &lt;em&gt;is&lt;/em&gt; coding, then you could do worse than take a look at my &lt;a href="http://livetyping.capcloud.com/"&gt;Livetyping&lt;/a&gt; course. &lt;/p&gt;</summary></entry><entry><title>Can You Prototype Native Apps in HTML?</title><link href="http://livetyping.capcloud.com/blog/can-you-prototype-native-apps-in-html.html" rel="alternate"></link><published>2015-04-07T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2015-04-07:blog/can-you-prototype-native-apps-in-html.html</id><summary type="html">&lt;p&gt;A thought has been bouncing around in my head for a while now: prototyping in HTML, CSS, and JavaScript is all well and good for web sites and webapps. But what about native apps (iOS and Android)? Can you prototype &lt;em&gt;them&lt;/em&gt; in HTML?&lt;/p&gt;
&lt;p&gt;Obviously, there are things that HTML prototypes (and webapps too for that matter) can't do that native apps can. The browser on your smartphone or tablet just doesn't have access to all the capabilities of the device and the OS that native APIs provide (e.g., location data, accelerometer, system notifications and so on). &lt;/p&gt;
&lt;p&gt;Aside from this though, is there any reason why we can't do this? If you use a &lt;a href="http://foundation.zurb.com"&gt;responsive framework&lt;/a&gt;, layout is a cinch. You can even change your page layout depending on device orientation. And we now have things like &lt;a href="http://foundation.zurb.com/apps/docs/#!/off-canvas"&gt;off-screen menus&lt;/a&gt; and &lt;a href="http://foundation.zurb.com/apps/docs/#!/grid"&gt;independently-scrolling sections&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;But one place where native apps really shine and provide opportunities to delight is in the sphere of animation. Most webapps don't attempt the fancy stuff that some native apps do.&lt;/p&gt;
&lt;p&gt;So I decided to do a little experiment. I picked an animation from a native iOS that I figured I should be able to replicate without too much difficulty, and tried recreating it in HTML, CSS, and JavaScript. The animation I chose is the one that the Tumblr app uses when you tap the new post button.&lt;/p&gt;
&lt;p&gt;When you tap the button, an overlay appears over the current content, and six buttons (one for each type of post) come flying up from below the screen and bounce into position. Immediately after this, a "Nevermind" button slides up at the bottom of the screen. If you tap one of the buttons, the six buttons fly up off the top of the screen and are replaced by a photo selector, text entry area, or whatever. If you tap "Nevermind", the buttons fly off and the overlay fades out so you're back where you started.&lt;/p&gt;
&lt;p&gt;I decided to just replicate the "Nevermind" action. (I didn't bother getting every last little detail right&amp;mdash;I used numbers instead of icons for the buttons, the buttons themselves are a bit small, etc.)&lt;/p&gt;
&lt;p&gt;I used Foundation for layout and &lt;a href="https://twitter.com/shapiro"&gt;Julian Shapiro&lt;/a&gt;'s excellent &lt;a href="http://julian.com/research/velocity/"&gt;velocity.js&lt;/a&gt; for animation. The result looks like this (try clicking &lt;strong&gt;New&lt;/strong&gt;):&lt;/p&gt;
&lt;iframe id="tum_ifr" src="http://projects.capcloud.com/velocity.js/tumblr_ios/" width="300" height="552" style="margin-bottom: 2rem;"&gt;&lt;/iframe&gt;

&lt;p&gt;(In some mobile browsers, this doesn't display correctly. So you might want to &lt;a href="http://projects.capcloud.com/velocity.js/tumblr_ios/" target="_blank"&gt;open it in a new tab&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;And here's a video showing the original Tumblr animation, my version in a desktop browser, and my version in Mobile Safari:&lt;/p&gt;
&lt;div class="flex-video" style="margin-bottom: 2rem;"&gt;
  &lt;iframe width="960" height="720" src="https://www.youtube.com/embed/kVTm1YWZsUE" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;I think it's pretty convincing. There's a "but" coming though&amp;hellip;&lt;/p&gt;
&lt;p&gt;And this is it: &lt;em&gt;but there are limitations&lt;/em&gt;. For example, the overlay that the Tumblr animation adds also blurs the content that it covers. This is easy enough to do in CSS, and you can animate the blur using velocity.js. It looks great in a desktop browser, but in Mobile Safari, it makes the animation a bit clunky.&lt;/p&gt;
&lt;p&gt;And this is a fairly simple animation. Other, more complex animations that require more processing power will most likely perform more poorly in mobile browsers.&lt;/p&gt;
&lt;p&gt;So is this a viable approach? It depends what you are trying to do. &lt;/p&gt;
&lt;p&gt;If you want to show people your prototype on the desktop (maybe in something like my &lt;a href="http://projects.capcloud.com/workshop/iphone_viewer/"&gt;iPhone viewer&lt;/a&gt; (&lt;a href="https://github.com/martinpolley/iphone_viewer"&gt;code&lt;/a&gt;), then it works great. If you want to actually show it working on a smartphone, then you may run into performance issues, depending on what you're trying to achieve. (If you have a newer phone than mine, it may work better.)&lt;/p&gt;
&lt;p&gt;I'll definitely be experimenting more to see what works and what doesn't.&lt;/p&gt;
&lt;p&gt;If you want to poke around in the code, &lt;a href="https://github.com/martinpolley/tumblr_ios"&gt;it's on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And if this pushes your buttons (sorry), you should check out my &lt;a href="http://livetyping.capcloud.com/workshop.html"&gt;upcoming workshops&lt;/a&gt;, which will cover this and oh my goodness so much more. If you're a UX designer and you want to learn how to make stuff like this, give it a look.&lt;/p&gt;</summary></entry><entry><title>The UX Designer's CSS3 Cheat Sheet</title><link href="http://livetyping.capcloud.com/blog/the-ux-designers-css3-cheat-sheet.html" rel="alternate"></link><published>2015-03-26T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2015-03-26:blog/the-ux-designers-css3-cheat-sheet.html</id><summary type="html">&lt;p&gt;&lt;img alt="CSS3 logo" src="static/images/css3.png" /&gt;&lt;/p&gt;
&lt;p&gt;A while back, I put together an &lt;a href="http://livetyping.capcloud.com/stuff/The_UX_Designers_HTML5_Cheat_Sheet_v2.pdf"&gt;HTML5 cheat sheet&lt;/a&gt; for UX designers, which seemed to go down rather well. But what's HTML without CSS? Not much. So now I've made another cheat sheet, this time for CSS. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/The_UX_Designers_CSS3_Cheat_Sheet.pdf"&gt;Grab your copy here.&lt;/a&gt; I hope you like it! (If you do, I'd realy appreciate it you'd &lt;a href="http://ctt.ec/1rC8e"&gt;share it&lt;/a&gt;.)&lt;/p&gt;</summary></entry><entry><title>Size DOES Matter: How Responsive Designs Often Get It Wrong (and How to Fix It)</title><link href="http://livetyping.capcloud.com/blog/size-does-matter-how-responsive-designs-often-get-it-wrong-and-how-to-fix-it.html" rel="alternate"></link><published>2014-09-29T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-09-29:blog/size-does-matter-how-responsive-designs-often-get-it-wrong-and-how-to-fix-it.html</id><summary type="html">&lt;p&gt;Responsive web design is awesome. Just look at how it has swept the web design world in the last couple of years. But it is not a panacea. We can't just build a site responsively and leave it at that, without using our brains a bit. (Meaning that we need to get into the &lt;a href="http://www.lukew.com/ff/entry.asp?933"&gt;mobile first&lt;/a&gt; mindset.)&lt;/p&gt;
&lt;p&gt;One example of this is when a page looks great on the desktop, but on a small screen, it turns into an interminably long strip of content. Just want to get to the footer to find a link to the support page? Good luck.&lt;/p&gt;
&lt;p&gt;I appreciate that many sites use a CMS, and that any technique that requires additional markup to accomplish its goal may well require changes to the CMS and the workflow of the content authors and editors. However, even in such cases, it may be useful to consider these approaches just for specific pages (such as the homepage).&lt;/p&gt;
&lt;p&gt;Let's take a look at a few different ways to get around the overly-long-content problem.&lt;/p&gt;
&lt;h3&gt;Just put less stuff on the page.&lt;/h3&gt;
&lt;p&gt;Do you really need all that content on one page? In the spirit of mobile first, maybe splitting it up into multiple pages would work better for both small &lt;em&gt;and&lt;/em&gt; large screens. &lt;a href="http://filamentgroup.com"&gt;Filament Group's homepage&lt;/a&gt; is a nice example of how not to overload your homepage with too much crap:  &lt;/p&gt;
&lt;figure&gt;
  &lt;img src="static/images/filament_homepage.png" alt="Filament Group's uncluttered homepage" /&gt;
  &lt;figcaption&gt;Filament Group's homepage&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;Just hide stuff&lt;/h3&gt;
&lt;p&gt;Some content may just be luxuries that you can't afford on small screens. One solution is to simply not show it at all on smaller screens. &lt;/p&gt;
&lt;p&gt;The responsive version of the BBC News site uses this approach. The ads that appear on large screens are not shown on small screens. Also, the "Watch" section shows three items on large screens and just two on mobile:&lt;/p&gt;
&lt;figure&gt;
  &lt;img  width="423" src="static/images/bbc_news_watch_desktop.png" alt="The BBC News &amp;quot;Watch&amp;quot; section on a large screen" /&gt;
  &lt;img  width="196" src="static/images/bbc_news_watch_mobile.png" alt="The same section on a small screen" /&gt;
  &lt;figcaption&gt;The "Watch" section of BBC News on large and small screens&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;And on big screens, there is a "Most watched/read" section that isn't shown at all on small screens:&lt;/p&gt;
&lt;figure&gt;
  &lt;img  width="310" src="static/images/bbc_news_most_read.png" alt="The BBC News Most Watched/Read section" /&gt;
  &lt;figcaption&gt;The BBC News Most Watched/Read section&amp;mdash;gone on small screens&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;Accordion&lt;/h3&gt;
&lt;p&gt;Instead of showing all the content, show a heading and a control to expand it. Most sites that do this just do it for &lt;em&gt;some&lt;/em&gt; of the content on the page.&lt;/p&gt;
&lt;figure&gt;
  &lt;img width="423" src="static/images/coolblue_shops_desktop.png" alt="coolblue.nl's store selector on desktop" /&gt;
  &lt;img width="196" src="static/images/coolblue_shops_mobile.png" alt="The same selector on mobile" /&gt;
  &lt;figcaption&gt;The store selector on Dutch ecommerce site Coolblue on big and small screens&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Wikipedia's mobile site takes a similar approach:&lt;/p&gt;
&lt;figure&gt;
  &lt;img width="310" src="static/images/wikipedia_accordion_closed.png" alt="Wikipedia accordion closed" /&gt;
  &lt;img width="310" src="static/images/wikipedia_accordion_open.png" alt="Wikipedia accordion open" /&gt;
  &lt;figcaption&gt;Wikipedia's mobile accordion&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;Teasers&lt;/h3&gt;
&lt;p&gt;On small screens, show the start of a piece of content, then show a link to the full content. This could either take you to a new page containing the full content, or expand (or load) the content in-place. (Having a separate page has a downside&amp;mdash;content is duplicated, which means having to maintain two copies of the content, or using some kind of include mechanism.)&lt;/p&gt;
&lt;p&gt;The App Store on iOS is a good example of the latter approach&amp;mdash;by default, you get a short version of the content, with an ellipsis and a "more" link. Tapping on the link shows the full content.&lt;/p&gt;
&lt;figure&gt;
  &lt;img width="310" src="static/images/app_store_short_ios.png" alt="A truncated app description from Apple's iOS App Store" /&gt;
  &lt;img width="310" src="static/images/app_store_long_ios.png" alt="The full version of the same app description" /&gt;
  &lt;figcaption&gt;Truncated and full versions of the description of an app in Apple's iOS App Store&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The App Store simply truncates the content to a fixed length. A variation would be to have a hand-crafted teaser. This could be a tl;dr version of the content, or a hand-picked extract. (For sites using a CMS, this could be tricky though.)&lt;/p&gt;
&lt;p&gt;Amazon does something similar with product descriptions on its mobile site:&lt;/p&gt;
&lt;figure&gt;
  &lt;img width="310" src="static/images/amazon_teaser.png" alt="A product description on Amazon's mobile site" /&gt;
  &lt;img width="310" src="static/images/amazon_expanded.png" alt="The same description, expanded" /&gt;
  &lt;figcaption&gt;Teaser and full versions of a product description on Amazon's mobile site&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;The How&lt;/h3&gt;
&lt;p&gt;If you're using Foundation or Bootstrap, you can show and hide elements depending on screen size by simply adding classes. If you're not using a front-end framework, you can add some media queries to your CSS to achieve the same results.&lt;/p&gt;
&lt;p&gt;You can use this technique for straight showing and hiding, for replacing regular content with a teaser, and for replacing content with the same content contained within an accordion.&lt;/p&gt;
&lt;h3&gt;The Specifics&lt;/h3&gt;
&lt;h4&gt;Hiding stuff&lt;/h4&gt;
&lt;p&gt;Bootstrap has what it calls &lt;a href="http://getbootstrap.com/css/#responsive-utilities"&gt;responsive utilities&lt;/a&gt; that let you show and hide elements depending on viewport width. Just apply the appropriate classes. Foundation has its &lt;a href="http://foundation.zurb.com/docs/components/visibility.html"&gt;visibility classes&lt;/a&gt; that work in much the same way. &lt;/p&gt;
&lt;p&gt;In addition to showing and hiding stuff based on screen size, Foundation also lets you show and hide based on device orientation and whether the device is determined to be touch-enabled or not. (Modernizr &lt;a href="http://modernizr.com/docs/#touch"&gt;does the detection&lt;/a&gt; here. It tells you whether the browser supports touch events, which is not necessarily the same as knowing whether you are dealing with a touch-enabled &lt;em&gt;device&lt;/em&gt;.) &lt;/p&gt;
&lt;p&gt;This is handy&amp;mdash;you can use touch as a proxy for other device capabilities, such as the ability to upload files other than images (so you can hide those file upload controls where you know they'll be inappropriate).&lt;/p&gt;
&lt;p&gt;If you're not using a framework, you can roll this behavior yourself using media queries. For example, you can add a &lt;code&gt;hide-on-small&lt;/code&gt; class to the elements you want to hide on small screens, and add a media query rule like this to hide them:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;640px&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.hide-on-small&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you have elements that you only want to display on small screens, you'll need a second class (say, &lt;code&gt;show-on-small&lt;/code&gt;) and a second media query rule:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;min-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;641px&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.show-on-small&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h4&gt;Teasers&lt;/h4&gt;
&lt;p&gt;To implement teasers, you need three things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A short version of the content (which will be displayed for all screen sizes)&lt;/li&gt;
&lt;li&gt;The remaining content (which will be displayed by default on larger screens, and hidden on smaller screens)&lt;/li&gt;
&lt;li&gt;Something that users can click or tap on to to show or hide the extra content&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Put all the content in your page, with the appropriate visibility classes (see above) so that the additional content is hidden on small screens, but not on larger screens. At the end of the short content, add the link for showing/hiding.&lt;/p&gt;
&lt;p&gt;Then add a little bit of JavaScript so that when the user taps the link, the additional content gets shown.&lt;/p&gt;
&lt;p&gt;Here's &lt;a href="http://uxcod.es/uxcod.es/show_hide_media_queries/index.html"&gt;a simple example&lt;/a&gt;. Check out the source code &lt;a href="https://github.com/martinpolley/uxcod.es/tree/master/show_hide_media_queries"&gt;on GitHub here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;(My version has "Show more" and "Show less" links, with JavaScript to show and hide the right one.)&lt;/p&gt;
&lt;p&gt;Note that if your shortened content is a specially-crafted summary, rather than just the first part of the larger piece of content, you'll need to toggle between it and the whole of the larger content, instead of just showing and hiding the remaining content, as I've done here.&lt;/p&gt;
&lt;h4&gt;Accordion&lt;/h4&gt;
&lt;figure&gt;
  &lt;img src="static/images/accordion_for_small_screens.gif" alt="Animation showing accordion on small screens only" /&gt;
  &lt;figcaption&gt;Regular content on larger screens, an accordion on smaller screens&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;If you want to replace your regular content with an accordion on small screens, you need to duplicate the content. You'll have your regular content, and the same content within the accordion.&lt;/p&gt;
&lt;p&gt;Foundation includes an &lt;a href="http://foundation.zurb.com/docs/components/accordion.html"&gt;accordion&lt;/a&gt;, as does &lt;a href="http://getbootstrap.com/javascript/#collapse"&gt;Bootstrap&lt;/a&gt;. If you don't like these (or if you're not using a framework), you can use &lt;a href="http://jqueryui.com/accordion/"&gt;jQuery's accordion&lt;/a&gt;. (Note that you will need to include both the jQuery and jQuery UI libraries in this case.)&lt;/p&gt;
&lt;p&gt;Again, you can just use the visibility classes to hide the regular content and show the accordion on small screens, and vice-versa on larger screens.&lt;/p&gt;
&lt;p&gt;If you're uncomfortable with the idea of having to duplicate your content, fear not! There are things you can do to avoid it. Foundation has a component called &lt;a href="http://foundation.zurb.com/docs/components/interchange.html"&gt;Interchange&lt;/a&gt; that is intended to be used to insert different content (from external files) depending on the screen size. But you can also use it to insert &lt;em&gt;the same content&lt;/em&gt; more than once on the same page.&lt;/p&gt;
&lt;p&gt;Another way to do this is to use a templating language. These let you pull pieces of content into your page from separate files. They are usually used to do things like adding the same footer to all the pages in a site. But they're good for this sort of thing too. Some of them are a bit complicated and have quite a learning curve. But for simple stuff, check out &lt;a href="http://tags.brace.io"&gt;Brace Tags&lt;/a&gt;&amp;mdash;it's very easy to use. &lt;/p&gt;
&lt;p&gt;(Note that templating usually means you have to run a script at the command line to actually put all the pieces together. There are ways to automate this, though.)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://uxcod.es/uxcod.es/accordion_on_small/index.html"&gt;My example&lt;/a&gt; uses the Foundation accordion. It also uses Interchange to avoid the content duplication issue. By default, the Foundation accordion isn't animated, but you can make it animated with not much effort, &lt;a href="http://uxcod.es/uxcod.es/accordion_on_small/index_anim.html"&gt;like this&lt;/a&gt;. Both of these examples are on &lt;a href="https://github.com/martinpolley/uxcod.es/tree/master/accordion_on_small"&gt;GitHub here&lt;/a&gt;. (For more information, see &lt;a href="http://uxcod.es/accordion_mobile_only.html"&gt;this page&lt;/a&gt;.)&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;If you design or build responsive sites, apps, or prototypes, you will probably run into the too-much-content problem at some point. I hope that the techniques suggested here will help you overcome it. &lt;/p&gt;
&lt;p&gt;If I've missed other ways of handling this (or if you have any other feedback), I'd love to hear from you. I'm &lt;a href="https://twitter.com/martinpolley"&gt;@martinpolley&lt;/a&gt; on Twitter.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you enjoyed this post, you should sign up for my newsletter to make sure you don't miss the next one. (You also get a free lesson from Livetyping, my HTML prototyping course for UX designers.):&lt;/p&gt;
&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up for the newsletter&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Keep me posted" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>A Thing for Showing Your Design on an iPhone without an iPhone</title><link href="http://livetyping.capcloud.com/blog/a-thing-for-showing-your-design-on-an-iphone-without-an-iphone.html" rel="alternate"></link><published>2014-09-14T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-09-14:blog/a-thing-for-showing-your-design-on-an-iphone-without-an-iphone.html</id><summary type="html">&lt;p&gt;So. I wanted a thing that would let me show people what my designs look like on an iPhone, but in the desktop browser. Especially HTML prototypes that only live on my machine. So I cobbled this together:&lt;/p&gt;
&lt;div class="iframe_container"&gt;
&lt;iframe width="636" height="960" src="http://projects.capcloud.com/workshop/iphone_viewer/" frameborder="0"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://projects.capcloud.com/workshop/iphone_viewer/" target="_blank"&gt;(Open in a new tab.)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: If you're viewing this on your phone, the above probably looks a bit rubbish. But it's not meant for use on a phone, so that's OK.&lt;/p&gt;
&lt;p&gt;I know it's not the same as viewing stuff &lt;a href="http://livetyping.capcloud.com/blog/sharing-is-caring-the-best-ways-to-share-your-prototypes.html"&gt;on an actual device&lt;/a&gt; (or even on an emulator). But it's perfect for me. &lt;/p&gt;
&lt;p&gt;If you think it's useful, you can &lt;a href="https://github.com/martinpolley/iphone_viewer"&gt;grab it off GitHub&lt;/a&gt; and use it too. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Thanks to &lt;a href="http://99designs.com/designer-blog/2012/12/03/responsive-web-design-key-tips-and-approaches/"&gt;99designs&lt;/a&gt; for the transparent iPhone image.)&lt;/em&gt;&lt;/p&gt;</summary></entry><entry><title>How to Steal</title><link href="http://livetyping.capcloud.com/blog/how-to-steal.html" rel="alternate"></link><published>2014-07-28T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-07-28:blog/how-to-steal.html</id><summary type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Good artists copy, great artists steal."&lt;/strong&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So said Steve Jobs, attributing the words (incorrectly) to Picasso. &lt;/p&gt;
&lt;p&gt;It's my firmly-held belief that stealing is A Good Thing. I don't mean you should try to saunter out of your local supermarket with a bottle of expensive Scotch secreted in your trousers. Nor do I mean that I think it's OK to rip off the entire visual design of a site and use it on the one that you are designing. &lt;/p&gt;
&lt;p&gt;I mean that stealing a good idea and using it your own design is good for you and good &lt;em&gt;for the idea&lt;/em&gt;. This is how good ideas spread. Take the archetypal example: pull down to refresh, first introduced in Tweetie by Loren Brichter. Twitter bought Tweetie and it became the official Twitter client for iOS. And the pull-to-refresh pattern has been copied by just about every feed-based app out there. &lt;/p&gt;
&lt;p&gt;Another example is the swipe-from-edge gesture that many apps (including Apple’s own Mobile Safari) use to let you go back to the previous page. This gesture (originally from Blackberry, I believe) has become so ubiquitous that it’s downright annoying to come across an app that doesn't use it.&lt;/p&gt;
&lt;h3&gt;How ideas spread&lt;/h3&gt;
&lt;p&gt;Of course, it's not just gestures. Every commonly-used control, widget, or pattern started off as an innovation that spread by copying. Others never really worked well enough to be copied, and died out. It's like Darwinian evolution. The fittest ideas live to reproduce (get copied), while the weaker ideas become extinct. &lt;/p&gt;
&lt;p&gt;So how do we find out about these new species? And how do we go about copying one once have discovered it?&lt;/p&gt;
&lt;h3&gt;Finding good ideas&lt;/h3&gt;
&lt;p&gt;One way is to expose yourself to new things as much as possible. Try out new apps and sites. Look at what people are doing on Dribbble. (It's mostly visual design stuff, but if you dig, you can find some interesting things, such as &lt;a href="https://dribbble.com/shots/1254439--GIF-Float-Label-Form-Interaction"&gt;this&lt;/a&gt;.) Follow other designers on Pinterest and see what they are pinning. (Like &lt;a href="http://www.pinterest.com/danalonama/mobile/"&gt;this&lt;/a&gt;.) And when you come across something interesting, grab it and stick it somewhere. Bookmark it. Take a screenshot and put it in a dedicated Flickr album. Put it in Evernote or Dropbox. You could even Pin it. &lt;/p&gt;
&lt;p&gt;Another way is to regularly check out some of the many pattern libraries. See the new things that are being added. (&lt;a href="http://www.pttrns.com"&gt;There&lt;/a&gt; &lt;a href="http://ui-patterns.com"&gt;are&lt;/a&gt; &lt;a href="http://patterntap.com"&gt;quite&lt;/a&gt; &lt;a href="http://www.welie.com/patterns/"&gt;a&lt;/a&gt; &lt;a href="http://quince.infragistics.com/UX-Design-Patterns.aspx"&gt;few&lt;/a&gt; libraries like this.)&lt;/p&gt;
&lt;p&gt;But then what? You're working on a design and you think “That new pattern that I saw on &amp;lt;wherever&amp;gt; would be perfect for this!” How do you actually go about incorporating it into your design?&lt;/p&gt;
&lt;h3&gt;Using a good idea&lt;/h3&gt;
&lt;p&gt;Well, it depends. If you’re at the sketching stage, it’s only limited by your sketching abilities. But if you're wireframing or making a prototype, it really depends on the tools or technology you’re using, and the platform you're designing for. If you're using OmniGraffle or Photoshop, you can probably make a visual representation of it, maybe in the form of a storyboard of some kind. But it's not ideal. &lt;/p&gt;
&lt;p&gt;If you're using something like Axure, you're going to have to try and find the widget or pattern in one of the existing &lt;a href="http://www.axure.com/community/widget-libraries"&gt;libraries&lt;/a&gt;, or figure out how to make it yourself.&lt;/p&gt;
&lt;p&gt;If you're designing a mobile app, you'll probably want to get cozy with a developer who can put something together in code. (Though Facebook's &lt;a href="http://facebook.github.io/origami/"&gt;Origami&lt;/a&gt; looks promising for this sort of thing.)&lt;/p&gt;
&lt;p&gt;But if you're designing something for the web, and making prototypes in HTML, then you're in luck. Especially if the thing you want to copy also lives on the web. That means that it's been done. It's technically feasible. And because web sites and apps work the way they do, you can pick them apart and see how they work. &lt;/p&gt;
&lt;p&gt;How, exactly? Read on, friend.&lt;/p&gt;
&lt;h3&gt;The web makes stealing easy&lt;/h3&gt;
&lt;p&gt;Every browser lets you view a web page's source. And these days, all browsers include tools that will let you dig into this source code and really figure out how it works. (Chrome has its &lt;a href="https://developer.chrome.com/devtools/index"&gt;Developer Tools&lt;/a&gt;. Safari has its &lt;a href="https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html"&gt;Web Inspector&lt;/a&gt;. Firefox has its &lt;a href="https://developer.mozilla.org/en-US/docs/Tools"&gt;Web Developer Tools&lt;/a&gt;. And even Internet Explorer has its &lt;a href="http://msdn.microsoft.com/en-us/library/gg589507.aspx"&gt;F12 Web Developer Tools&lt;/a&gt;.) There is also a large number of browser extensions that provide similar or additional functionality (such as &lt;a href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt; for Firefox).&lt;/p&gt;
&lt;p&gt;So let's run through a quick example. &lt;/p&gt;
&lt;h3&gt;Stealing: a practical example&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://mailchimp.com"&gt;Mailchimp&lt;/a&gt; is a service that lets you send email newsletters. One thing that sticks out about it for me is its form controls. Instead of the standard browser controls (which look different on different operating systems), it uses custom elements. As well as looking nice and being big and easy to click, they look the same  on PC, Macs, phones, whatever.&lt;/p&gt;
&lt;p&gt;So how do they do it? I opened up Mailchimp in Firefox (where I already have the Firebug extension installed). Their radio buttons look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/mailchimp_radio_buttons.png" /&gt;&lt;/p&gt;
&lt;p&gt;Nice, eh?&lt;/p&gt;
&lt;p&gt;I right-clicked on one of the radio buttons and selected "Inspect with Firebug". The CSS for the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element didn't tell me much, but I noticed that when I hovered over the radio button, some extra classes were being added to the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/radio_button_container_div.png" /&gt;&lt;/p&gt;
&lt;p&gt;(Firebug highlights things that have just changed in yellow.)&lt;/p&gt;
&lt;p&gt;This suggests that they're actually using this container element to make the radio buttons look and behave the way they do, rather than trying to do anything to the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element itself. And the classes that are being added all start with &lt;code&gt;dijit&lt;/code&gt;. What the heck is Dijit?&lt;/p&gt;
&lt;p&gt;Well, it turns out that &lt;a href="http://dojotoolkit.org/reference-guide/1.10/dijit/#id1"&gt;Dijit&lt;/a&gt; is the UI library for &lt;a href="http://dojotoolkit.org/"&gt;Dojo&lt;/a&gt;, a JavaScript framework (kind of like jQuery, which has the jQuery UI library). Poking around on the Dojo site, I found something called the &lt;a href="http://demos.dojotoolkit.org/demos/themePreviewer/demo.html"&gt;Dijit Theme Tester&lt;/a&gt;. It has nice-looking radio buttons (that don't look like system radio buttons):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/dijit_theme_tester.png" /&gt;&lt;/p&gt;
&lt;p&gt;But they don't look like the ones in Mailchimp&amp;hellip; Looking in Firebug again, I can see that the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; in question is getting a &lt;code&gt;background-image&lt;/code&gt; applied to it:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/dijit_radio_sprite.png" /&gt;&lt;/p&gt;
&lt;p&gt;This image is what's called a sprite. It's a single image file that contains a number of separate images. Here, I can see that it contains images for all the different states of the radio button, as well as the same for checkboxes. Here's how it looks full-size:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/checkboxRadioButtonStates.png" /&gt;&lt;/p&gt;
&lt;p&gt;If I go back to Mailchimp, I can see that they use a &lt;em&gt;different&lt;/em&gt; sprite:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/mailchimp_sprite.png" /&gt;&lt;/p&gt;
&lt;p&gt;Here's what that looks like full-size:&lt;/p&gt;
&lt;!-- &lt;img src="https://us4.admin.mailchimp.com/release/9.4.43/js/dijit/themes/mcd/form/images/checkmarks-sprite.svg" /&gt; --&gt;

&lt;p&gt;&lt;img src="static/images/checkmarks-sprite.svg" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, this is how they make the same Dijit radio buttons look different (that is, &lt;em&gt;better&lt;/em&gt;).&lt;/p&gt;
&lt;h3&gt;Enjoying your ill-gotten gains&lt;/h3&gt;
&lt;p&gt;So if you wanted to do something similar in your own prototype (or production site/app for that matter), you now know that you can use Dijit and make your own sprite image to customize the way it looks. &lt;/p&gt;
&lt;p&gt;But please, don't just steal the Mailchimp one. That would be &lt;em&gt;wrong&lt;/em&gt; :). (Especially as Mailchimp are nice enough to explain how their forms are made over &lt;a href="https://ux.mailchimp.com/patterns/forms"&gt;here&lt;/a&gt;.)&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you're interested in HTML prototyping (because so many UX job postings are asking for front-end coding skills these days), you should check out &lt;a href="http://livetyping.capcloud.com/"&gt;Livetyping&lt;/a&gt;, my HTML prototyping course for UXers. &lt;/p&gt;
&lt;p&gt;And if you like stuff like this, you should sign up for my newsletter:&lt;/p&gt;
&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>Sharing Is Caring: the Best Ways to Share Your Prototypes</title><link href="http://livetyping.capcloud.com/blog/sharing-is-caring-the-best-ways-to-share-your-prototypes.html" rel="alternate"></link><published>2014-07-23T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-07-23:blog/sharing-is-caring-the-best-ways-to-share-your-prototypes.html</id><summary type="html">&lt;p&gt;Someone asked me the other day how he could view his HTML prototype on his phone. (It was only on his computer at that point.) He asked if using GitHub was a good approach. It is, but it's not the only one.&lt;/p&gt;
&lt;p&gt;There are two main reasons why you might want to be able to make your prototype viewable on a computer or device other than your own. First, if you want to check how your design looks and behaves on a different sized screen. (And much of the time &lt;a href="http://i.imgur.com/YkbaV.gif"&gt;browser wanking&lt;/a&gt; just doesn't cut it.) Second, if you want to show your design to someone else. This might be a colleague, a client, or a user in a usability test.&lt;/p&gt;
&lt;p&gt;These are two very different things, but they are two things I often find myself need to do, and some of the solutions apply to both scenarios, so I'm lumping them together for the purpose of this post.&lt;/p&gt;
&lt;p&gt;So, there are a bunch of different ways you can do this. Here goes!&lt;/p&gt;
&lt;h3&gt;Emulators&lt;/h3&gt;
&lt;p&gt;An emulator is an application that runs on your computer and pretends to be a particular device. There are emulators for both &lt;a href="http://developer.android.com/tools/devices/emulator.html"&gt;Android&lt;/a&gt; and &lt;a href="https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/Introduction/Introduction.html"&gt;iOS&lt;/a&gt;, but these are both aimed at developers, and are supplied as part of each platform's development kit. &lt;/p&gt;
&lt;p&gt;For just checking out prototypes, they are probably overkill. But there is a simpler alternative: the &lt;a href="http://www.opera.com/developer/mobile-emulator"&gt;Opera Mobile Emulator&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/opera_mobile_emu_galaxy_note.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A prototype in the Opera Mobile emulator, simulating a Samsung Galaxy Note&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This lets you see what a prototype (or any site, for that matter) looks like in the Opera Mobile browser on a wide variety of smartphones and tablets. And it plays nicely with prototypes that are just a bunch of files on your computer&amp;mdash;you can just paste the file path into the address box. It's not exactly the same as using a prototype on an actual device with that device's own browser, but it's pretty close.&lt;/p&gt;
&lt;h3&gt;Adobe Edge Inspect (and similar tools)&lt;/h3&gt;
&lt;p&gt;If you just want to be able to check out your design on your own phone or tablet, Adobe's Edge Inspect is a useful tool. It has three components: an &lt;a href="https://creative.adobe.com/products/inspect"&gt;application&lt;/a&gt; that runs on your computer, a &lt;a href="http://www.adobe.com/go/inspect_chrome_app"&gt;browser extension&lt;/a&gt; for Chrome, and an app for your &lt;a href="http://www.adobe.com/go/inspect_ios_app"&gt;iOS&lt;/a&gt; or &lt;a href="http://www.adobe.com/go/inspect_android_app"&gt;Android&lt;/a&gt; device. &lt;/p&gt;
&lt;p&gt;Once all three are up and running, you can connect from your device and see the same page that is open in Chrome, and if you interact with the page or reload it, it is updated on your device as well. It's handy, but I have experienced connection problems on occasion.&lt;/p&gt;
&lt;p&gt;Edge Inspect is currently free if you just want to connect one device (though you need a free Adobe Creative Cloud account). If you want to connect multiple devices, you need a $9.99/month subscription.&lt;/p&gt;
&lt;p&gt;The are several alternatives, such as &lt;a href="http://vanamco.com/ghostlab/"&gt;Ghostlab&lt;/a&gt; (paid, Mac only) and &lt;a href="https://github.com/viljamis/Remote-Preview"&gt;Remote Preview&lt;/a&gt; (open source, cross-platform), that look like they're worth a look. (I've only used Edge Inspect, so I can't comment on whether these two are any good or not. If you've used them, let me know :)&lt;/p&gt;
&lt;h3&gt;Dropbox&lt;/h3&gt;
&lt;p&gt;If you copy a prototype into the Public folder of your &lt;a href="https://www.dropbox.com/"&gt;Dropbox&lt;/a&gt;, you can then share the link with anyone (including yourself, so you can view the prototype on your phone).&lt;/p&gt;
&lt;p&gt;Note that opening it from the Dropbox &lt;em&gt;app&lt;/em&gt; on your phone &lt;strong&gt;won't work&lt;/strong&gt;. You need to paste or type the link in your browser.&lt;/p&gt;
&lt;p&gt;This is probably the easiest option on this list.&lt;/p&gt;
&lt;h3&gt;Use an online code editor&lt;/h3&gt;
&lt;p&gt;There are a number of online code editors available, such as &lt;a href="http://jsbin.com/"&gt;JS Bin&lt;/a&gt; and &lt;a href="http://codepen.io/"&gt;Codepen&lt;/a&gt;. (JS Bin is my fave.) You can copy and paste your prototype's HTML, CSS, and JavaScript into one of these, then open it up on your phone or share the link with someone else.&lt;/p&gt;
&lt;p&gt;For example, it just took me about two minutes to paste the code from a simple prototype into JS Bin. (I also added Foundation from JS Bin, and deleted the bits that referenced my local Foundation files.) &lt;/p&gt;
&lt;p&gt;&lt;a href="http://jsbin.com/kaqira/3/edit"&gt;This is the result&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://jsbin.com/kaqira/3/edit"&gt;&lt;img src="static/images/prototype_in_jsbin.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A prototype in JS Bin&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now I can open &lt;a href="http://jsbin.com/kaqira/3"&gt;http://jsbin.com/kaqira/3&lt;/a&gt; on my phone (or email it to someone, or whatever):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://jsbin.com/kaqira/3"&gt;&lt;img width="320" src="static/images/jsbin_on_phone.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The same prototype in JS Bin, viewed on my phone&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One advantage of this approach is that if you’re discussing the design with someone, you can make changes right then and there and see them reflected in the output.&lt;/p&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;'s Pages feature lets you host static websites inside GitHub repositories. GitHub is free (unless you want to do things like have private repositories). All the prototypes I create are static&amp;mdash;they don't rely on a server or a database. So this is quite a handy way to put your prototypes online so you can share them with others (or look at them on your phone).&lt;/p&gt;
&lt;p&gt;There's a bit of a learning curve, but &lt;a href="https://pages.github.com/"&gt;this page&lt;/a&gt; does a pretty decent job of explaining what you need to do. Just select "Project site" on that page, and it will guide you through the process. I followed their instructions, then used the GitHub desktop app (&lt;a href="https://mac.github.com/"&gt;Mac&lt;/a&gt;, &lt;a href="https://windows.github.com/"&gt;Windows&lt;/a&gt;) to add my prototype's files and commit them to my repository. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://martinpolley.github.io/4min_2/"&gt;Here's what that same prototype looks like, hosted as a GitHub Page.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Amazon S3&lt;/h3&gt;
&lt;p&gt;Amazon's &lt;a href="http://aws.amazon.com/s3/"&gt;Simple Storage Service (S3)&lt;/a&gt; is typically used by web applications for storing files (for example, photos that users have uploaded). But you can also use it for hosting static sites. Which means you can upload your prototypes to it for viewing anywhere, by anyone.&lt;/p&gt;
&lt;p&gt;Now, this option is not free, but it is ridiculously cheap. To give you an idea, I host this website on S3, along with a few other things, and it never costs me more than a couple of dollars a month.&lt;/p&gt;
&lt;p&gt;Getting it set up is not exactly simple, but if you follow &lt;a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html"&gt;the instructions&lt;/a&gt; to the letter, you'll be fine. You do need a domain name, though. Otherwise, you won't have a URL through which to access your prototypes. You also need an Amazon account (but who doesn't already have one of those?).&lt;/p&gt;
&lt;p&gt;For me, setting up additional storage for prototypes in S3 was easy, as I already have the capcloud.com domain name. I just set up a new storage area (a "bucket", in S3 lingo), set up a subdomain called &lt;em&gt;projects&lt;/em&gt; (through my domain name provider), and linked the two together. &lt;a href="http://projects.capcloud.com/4min_2/"&gt;Here's that same prototype, yet again&lt;/a&gt;, on my S3-powered project site.&lt;/p&gt;
&lt;p&gt;To upload files, you can use S3's own upload page, which is pretty good, or if you're used to using FTP, you can use a service like &lt;a href="https://cloudgates.net/"&gt;Cloud Gates&lt;/a&gt; to upload with your favorite FTP client.&lt;/p&gt;
&lt;h3&gt;Other options&lt;/h3&gt;
&lt;p&gt;These aren't the only options open to you. Others include setting up a web server on your own computer. But this is a bit of a hassle, and making it so that people outside your local network can access it is a pain.&lt;/p&gt;
&lt;p&gt;Another is to pay for web hosting and (for example, &lt;a href="http://www.hostgator.com/"&gt;here&lt;/a&gt; or &lt;a href="http://www.dreamhost.com/web-hosting/"&gt;here&lt;/a&gt;) and upload your prototypes to the web host (usually via FTP). But it's still a hassle and costs more than the most of the other options we've covered.&lt;/p&gt;
&lt;h3&gt;Privacy&lt;/h3&gt;
&lt;p&gt;All the options I've described (except for emulators and Edge Inspect) put your prototype in a place where anyone with the right URL can access it. This may not be desirable. Sure, you can give the URL only to the specific people you want to share it with, but there's nothing stopping &lt;em&gt;them&lt;/em&gt; giving it to someone else, whether intentionally or not.&lt;/p&gt;
&lt;p&gt;If this is important to you, a couple of the options are going to be better bets for you. &lt;/p&gt;
&lt;p&gt;If you have a &lt;a href="https://github.com/pricing"&gt;paid GitHub account&lt;/a&gt;, you can make repositories private. This lets you control who can access them. They do need to have a GitHub account though. The cheapest plan costs $7/month and lets you create up to five private repositories.&lt;/p&gt;
&lt;p&gt;If you pay for web hosting, your site's administration panel will usually let you make individual directories password-protected.&lt;/p&gt;
&lt;h3&gt;And the winner is&amp;hellip;&lt;/h3&gt;
&lt;p&gt;The simplest and easiest option has got to be &lt;a href="https://www.dropbox.com/"&gt;Dropbox&lt;/a&gt;. If you're already a user, you just copy your prototype into your Public folder and you're done. And even if you don't already have a Dropbox account, setting one up is easy and gives you 2GB of free storage.&lt;/p&gt;
&lt;p&gt;If you're already using one of the other services, like GitHub or S3, then you're already past the initial barrier to entry, so using it for hosting prototypes as well is an easy step to take.&lt;/p&gt;
&lt;p&gt;I hope you found this useful. If you know of any other ways of doing this that I've missed, ping me on Twitter: &lt;a href="https://twitter.com/martinpolley"&gt;@martinpolley&lt;/a&gt;.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you're interested in HTML prototyping (because so many UX job postings are asking for front-end coding skills these days), you should check out &lt;a href="http://livetyping.capcloud.com/"&gt;Livetyping&lt;/a&gt;, my HTML prototyping course for UXers. &lt;/p&gt;
&lt;p&gt;And if you like stuff like this, you should sign up for my newsletter:&lt;/p&gt;
&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>Wind of change: are we finally starting to agree on how UX should be done?</title><link href="http://livetyping.capcloud.com/blog/wind-of-change-are-we-finally-starting-to-agree-on-how-ux-should-be-done.html" rel="alternate"></link><published>2014-07-21T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-07-21:blog/wind-of-change-are-we-finally-starting-to-agree-on-how-ux-should-be-done.html</id><summary type="html">&lt;p&gt;&lt;em&gt;I originally sent this out as a &lt;a href="http://livetyping.capcloud.com/news.html"&gt;newsletter&lt;/a&gt;, but I think it deserves to be a blog post too.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A few weeks back, I sent out a &lt;a href="http://us4.campaign-archive2.com/?u=3f02f03a1e0d396f36b10c145&amp;amp;id=40521f9566"&gt;newsletter&lt;/a&gt; about some of the great stuff Peter Merholz has been writing recently on the best ways to "do UX" in a organization. (Should UX be a separate function? Or should designers be embedded in product teams?)&lt;/p&gt;
&lt;p&gt;In the last couple of days, I've seen a few more posts that address the same issues. &lt;/p&gt;
&lt;p&gt;Dan Brown (of EightShapes) wrote a &lt;a href="https://medium.com/@brownorama/one-brand-one-voice-one-system-1fde24ecafca"&gt;piece on Medium&lt;/a&gt; about the importance of design systems, and wondered why many organizations don't seem to have such systems in place. He asserts that the biggest barrier is designers' position in the organization. And then goes on on to say that the typical "service bureau" model, while effective, is ultimately limiting. That the whole organization needs to "get" design:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To have a design system is to have a pervasive language of design, one that everyone in the organization speaks natively.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This put me in mind of the fantastic stuff &lt;a href="http://www.disambiguity.com/"&gt;Leisa Reichelt&lt;/a&gt; has been writing recently about strategy. A lot of her writing comes from her experience working at the UK's Government Digital Service, the team tasked with the "digital transformation of government". No small task, but one that they seem to be doing incredibly well.&lt;/p&gt;
&lt;p&gt;GDS has its own blog, where Ben Terrett recently wrote a &lt;a href="https://gds.blog.gov.uk/2014/07/18/whats-the-design-process-at-gds/"&gt;post&lt;/a&gt; that echoed Leisa and Dan's points. Here are a couple of choice quotes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We don’t have a UX Team.&lt;/p&gt;
&lt;p&gt;... user experience is the responsibility of everyone in the team.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These things all seem to be pointing to one thing, despite the diversity of types of organizations they relate to: that UX is strategic, and it needs to be the concern of everyone in the organization.&lt;/p&gt;
&lt;p&gt;Something else caught my eye in that GDS post:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We don’t make wireframes or photoshop mockups ... We’re making a Thing, not pictures of a Thing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And, directly related to this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;All of the designers can code or are learning to code.&lt;/strong&gt; ... it’s important to belong to a group with shared skills and experiences. This helps people develop their skills, support each other and build a strong culture with shared standards.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which aligns with what I've been banging on about for ages: that UX designers should learn how to code, and by the way, &lt;a href="http://livetyping.capcloud.com/"&gt;here's my course&lt;/a&gt; that will teach you to do exactly that :)&lt;/p&gt;</summary></entry><entry><title>Forms—The Complete Guide—Part 4: Selection-dependent Inputs</title><link href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-4-selection-dependent-inputs.html" rel="alternate"></link><published>2014-06-19T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-06-19:blog/forms-the-complete-guide-part-4-selection-dependent-inputs.html</id><summary type="html">&lt;p&gt;In which we take a look at selection-dependent inputs, and see that they're a lot more simple to put together than they look.&lt;/p&gt;
&lt;p&gt;Forms. They're often the bane of users' online lives. But it doesn't look like they're going away any time soon. So its up to us, UX designers, to make them as smooth and easy to use as possible for our users, while still reaching the best business outcomes.&lt;/p&gt;
&lt;p&gt;If we prototype our forms, we can get them in front of users earlier and get feedback sooner, which we can use to iterate our designs. Previous posts in this series covered &lt;a href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-1-layout-and-alignment.html"&gt;form layout and alignment&lt;/a&gt;, &lt;a href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-2-input-types.html"&gt;input types&lt;/a&gt;, and &lt;a href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-3-grouping-and-inline-help.html"&gt;grouping and inline help&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this, the fourth post in this series, we take a look at &lt;strong&gt;selection-dependent inputs&lt;/strong&gt;. (I've also seen it referred to as "responsive enabling" and/or "responsive disclosure"). All this means is changing the fields that the user sees depending on some selection that they have made or some information that they have provided. For example, if we're asking the user for their postal address, we might have a field where they can enter (or select) the country that they live in. Then, depending on the country, we can change the other fields to match the standard address format for that country.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; "Responsive enabling" refers to having one or more fields that are disabled until the user makes a particular selection, in which case they become enabled, allowing the user to interact with them. "Responsive disclosure," on the other hand, &lt;em&gt;hides&lt;/em&gt; the fields, and makes them appear if the user makes a particular selection. I don't recall seeing many forms that use responsive enabling of late, but I'm sure it's useful in some circumstances, so I'll include an example.&lt;/p&gt;
&lt;h3&gt;Responsive enabling&lt;/h3&gt;
&lt;p&gt;I think one of the reasons that this pattern has fallen out of favor in recent years is that it can be distracting. You have all these disabled fields, and they just take up space and draw the user's attention away from the stuff that matters unless they click on a particular checkbox (which may only be relevant for a small percentage of users). &lt;/p&gt;
&lt;p&gt;One benefit is that things stay put. In you use responsive disclosure to make fields appear and disappear, the content below them suddenly jumps downward, which can be jarring and disorienting. But nowadays, it's easy to animate transitions like this, which can reduce the problem.&lt;/p&gt;
&lt;p&gt;Anyway, in some cases, responsive enabling is going to be the right approach (where there aren't too many disabled fields, and where it would be confusing &lt;em&gt;not&lt;/em&gt; to show them), so let's press on with an example. &lt;/p&gt;
&lt;p&gt;In this example, we're going to let the user opt in to receiving text messages from us to let them know about special offers. You would typically find things like this at the bottom of an order form. We'll have a field where they can enter their mobile number, which will be disabled until they click the opt-in checkbox. &lt;/p&gt;
&lt;p&gt;After you've set up a new Foundation project (&lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;this post&lt;/a&gt; explains how), add this HTML just after the opening &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag. (We're not going to waste time prototyping the whole form&amp;mdash;we'll just prototype the bit we're interested in.)&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/67f978ff1f58c60de77e.js"&gt;&lt;/script&gt;

&lt;p&gt;Somewhere within the page's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags, add this &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/989cc8359623ec8c4123.js"&gt;&lt;/script&gt;

&lt;p&gt;The result looks like this:&lt;/p&gt;
&lt;!-- TODO: fix all the image paths --&gt;

&lt;p&gt;&lt;img src="static/images/responsive_enabling_1.png" alt="Our form, with the phone number input disabled"&gt;&lt;/p&gt;
&lt;p&gt;What I've done here is not very complicated. Like in the previous posts, I've used Foundation's grid to lay out the form. In the second line of the HTML, I'm just squishing the form down into eight of Foundation's available twelve columns, and adding a two-column offset to center it on the page. &lt;/p&gt;
&lt;p&gt;The first bit of actual content is a paragraph to show where the actual form fields and labels would go if this was a real form.&lt;/p&gt;
&lt;p&gt;Then we've got a row containing a column that takes up all twelve columns. (&lt;code&gt;small-12 columns&lt;/code&gt; means it is twelve columns wide on small screen sizes and anything bigger, i.e., &lt;em&gt;all&lt;/em&gt; screen sizes.) This contains the checkbox &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; (with &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt;) and its label (which uses &lt;code&gt;for&lt;/code&gt; to link it to the checkbox, so that you can click on it to toggle the checkbox too).&lt;/p&gt;
&lt;p&gt;After that, there's another row that contains &lt;em&gt;two&lt;/em&gt; columns, for the phone number &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and its &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;. Notice how this divvies up the available space differently for small and medium (and bigger) screens.&lt;/p&gt;
&lt;p&gt;For small screens, we've got a three/nine column split, so together they fill up all the available width. But on medium-and-up screens, they are three and six columns wide. This is to prevent the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; from being ridiculously wide on larger screens&amp;mdash;Foundation makes each input 100% of the width of the column that it's in. (By default, if the number of columns doesn't add up to twelve, Foundation scoots the last column over so it is right-aligned. I've added the &lt;code&gt;end&lt;/code&gt; class to stop this happening.)&lt;/p&gt;
&lt;p&gt;The label gets the &lt;code&gt;right&lt;/code&gt; class to right-align it, and the &lt;code&gt;align&lt;/code&gt; class to align it vertically with the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;. It also gets an ID so we can style it and do stuff to it. And the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; gets the appropriate &lt;code&gt;type&lt;/code&gt; (&lt;code&gt;tel&lt;/code&gt;) and the &lt;code&gt;disabled&lt;/code&gt; property to make it disabled initially.&lt;/p&gt;
&lt;p&gt;The CSS in the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; just applies some styling to the placeholder text that shows where the real form fields would go and makes the "Mobile number" label grey so it looks disabled. (You can add the &lt;code&gt;disabled&lt;/code&gt; property to &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s, but not to &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;s&amp;mdash;you have to style these yourself so they'll look disabled.) &lt;/p&gt;
&lt;p&gt;It looks OK so far. The phone number input is disabled, and its label looks disabled too. But it doesn't get enabled when you check the checkbox. For that, we need a bit of JavaScript. Not much, just a smidge.&lt;/p&gt;
&lt;p&gt;At the bottom of the page, right before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag, add this &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/af2170b86f6b6d2e834b.js"&gt;&lt;/script&gt;

&lt;p&gt;This is pretty similar to what we saw in the &lt;a href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-3-grouping-and-inline-help.html"&gt;last post&lt;/a&gt;. All the code is inside the jQuery &lt;code&gt;$(document).ready()&lt;/code&gt; function. So it will only get run after the page has finished loading.&lt;/p&gt;
&lt;p&gt;Within &lt;code&gt;$(document).ready()&lt;/code&gt;, this part of the first line selects the checkbox:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#cb&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;that is, the element with the ID of &lt;code&gt;cb&lt;/code&gt;, then this part:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="na"&gt;.on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="no"&gt;change&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;calls the &lt;code&gt;on()&lt;/code&gt; function to detect when its state changes. The three lines within the curly braces (&lt;code&gt;{}&lt;/code&gt;) specify what happens when this change event is detected:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In the first line, this bit:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#mobilelabel&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;selects the label for the phone number field, which has an ID of &lt;code&gt;mobilelabel&lt;/code&gt;, then this bit:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="na"&gt;.toggleClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="no"&gt;disabled&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;calls &lt;code&gt;toggleClass()&lt;/code&gt; on it. This adds the &lt;code&gt;disabled&lt;/code&gt; class to the element if it doesn't already have it, and removes it if it does. This is the class that gives it the grey color, so removing it switches it back to its default color, black.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The second line declares a variable called &lt;code&gt;checked&lt;/code&gt;. Then this part:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#cb&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;selects the checkbox again and then checks whether it is checked or not like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="na"&gt;.is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;checked&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This gives us an answer of &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. The &lt;code&gt;!&lt;/code&gt; reverses this value. If it is &lt;code&gt;true&lt;/code&gt;, this makes it &lt;code&gt;false&lt;/code&gt;, and vice-versa. Then this value gets stored in our &lt;code&gt;checked&lt;/code&gt; variable. I'll explain why we need to reverse the value in a minute.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The third line selects the phone number input, which has an ID of &lt;code&gt;mobile&lt;/code&gt;, like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#mobile&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;and calls &lt;code&gt;prop()&lt;/code&gt; on it to set the value of its &lt;code&gt;disabled&lt;/code&gt; property. And the value we give it is whatever we just stored in our &lt;code&gt;checked&lt;/code&gt; variable. This way, if the checkbox is checked, &lt;code&gt;checked&lt;/code&gt; gets a value of &lt;code&gt;false&lt;/code&gt;, which we use to set &lt;code&gt;disabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt;. (Actually, I used trial and error to know whether I needed to reverse the value or not! I like to think of this kind of thing as being pragmatic.)&lt;/p&gt;
&lt;p&gt;In fact, &lt;code&gt;disabled&lt;/code&gt; doesn't take a value&amp;mdash;an element either has the property or it doesn't. But behind the scenes, jQuery correctly interprets us giving &lt;code&gt;disabled&lt;/code&gt; a value of &lt;code&gt;false&lt;/code&gt; and simply removes the property.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now checking the checkbox enables the input, so it looks like this (and unchecking it disables it again):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/responsive_enabling_2.png" alt="Our form, with the phone number input now enabled"&gt;&lt;/p&gt;
&lt;p&gt;You can see it in action &lt;a href="http://livetyping.capcloud.com/stuff/forms_11_responsive_enabling/index.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Responsive disclosure&lt;/h3&gt;
&lt;p&gt;For responsive disclosure, we're just going to take the previous example and change a couple of things. Here's the HTML:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/2a342f4be18ea686f81e.js"&gt;&lt;/script&gt;

&lt;p&gt;The only changes that I've made here are to remove the &lt;code&gt;disabled&lt;/code&gt; attribute from the phone number &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and to remove the &lt;code&gt;disabled&lt;/code&gt; class from its &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;. And I've added a new ID, &lt;code&gt;mobile_container&lt;/code&gt;, to the row &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains them so that I'll have something to attach behavior to.&lt;/p&gt;
&lt;p&gt;The CSS is a bit different too:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/af3e1b128ae9286b0972.js"&gt;&lt;/script&gt;

&lt;p&gt;Gone is the rule for styling the "disabled" label, and in its place is a rule that hides the row &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains the phone number input and its label by giving it a &lt;code&gt;display&lt;/code&gt; of &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As you can see, when the checkbox is unchecked, the phone number input and its label are nowhere to be seen:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/responsive_disclosure_1.png" alt="Our form, with the phone number input hidden"&gt;&lt;/p&gt;
&lt;p&gt;To make them appear when you check the checkbox, we need to modify our JavaScript:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/fac31e9b6b7b71e7e891.js"&gt;&lt;/script&gt;

&lt;p&gt;This is much simpler than it was before. All we've got now inside the function is one line, which toggles the visibility of the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains the phone number field. Using the &lt;code&gt;toggle()&lt;/code&gt; function means that whenever the state of the checkbox changes, we either show or hide the phone number field. We don't have to check the value of anything, store things in variables, or any of that stuff.&lt;/p&gt;
&lt;p&gt;Now when we check the checkbox, the phone number field appears:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/responsive_disclosure_2.png" alt="Our form, with the phone number input now shown"&gt;&lt;/p&gt;
&lt;p&gt;(You can see a live example &lt;a href="http://livetyping.capcloud.com/stuff/forms_12_responsive_disclosure/"&gt;here&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;If we had additional content below these elements, it would jump down when the phone number field appears. It doesn't take up much space, so it doesn't jump very much. But imagine if what we were making appear was a whole sub-section of the form that takes up half the height of the page. Pushing the following content down by so much can be very disorienting.&lt;/p&gt;
&lt;p&gt;It's worth taking a minute to look at how we can use animation to make changes like this more palatable. We'll add some more content after the phone number field, then add animation and see how it looks. Add another &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; containing some text below the hidden one, so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/4c76d25d83a2ea07a1e2.js"&gt;&lt;/script&gt;

&lt;p&gt;Now let's change our JavaScript to include animation. Luckily, in this case, it is very easy indeed. All we need to do is replace the call to &lt;code&gt;toggle()&lt;/code&gt; with a call to &lt;code&gt;slideToggle()&lt;/code&gt;, so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/d69a551815c3f1d773ab.js"&gt;&lt;/script&gt;

&lt;p&gt;Instead of just showing or hiding the element, &lt;code&gt;slideToggle()&lt;/code&gt; makes it appear by sliding it down from the top, or hides it by sliding it up. Try it out &lt;a href="http://livetyping.capcloud.com/stuff/forms_13_responsive_disclosure_animated/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We can control various aspects of how this animation happens. For example, we can make it faster or slower by putting a value (in milliseconds) in the parentheses, like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;slideToggle(1000)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_14_responsive_disclosure_animated/"&gt;This example&lt;/a&gt; shows this slower version in action.&lt;/p&gt;
&lt;p&gt;Another thing we can do is control the flow of the animation (what is referred to as its &lt;em&gt;easing&lt;/em&gt;). By default, jQuery animations start out slow, speed up in the middle, then slow down again at the end. We can change this by doing something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;slideToggle({easing: easeInCubic})
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that to use additional easings like this one, you need to include the jQuery UI library by adding these two lines near the bottom of the page (before the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block that contains our code):&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/4db7071e2957e47340cc.js"&gt;&lt;/script&gt;

&lt;p&gt;This starts off slow, like before, but speeds up and then doesn't slow down&amp;mdash;it just stops abruptly, as if it had hit a wall. Try it &lt;a href="http://livetyping.capcloud.com/stuff/forms_15_responsive_disclosure_animated/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We're off on a bit of a tangent here, but I'll just show you one more before we move on to the next thing. There are 32 different easings available in jQuery, and each one gives the animation a slightly different feel.&lt;/p&gt;
&lt;p&gt;For example, look what happens when we change the easing to &lt;code&gt;easeOutBounce&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;slideToggle({easing: easeOutBounce})
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Take a look &lt;a href="http://livetyping.capcloud.com/stuff/forms_16_responsive_disclosure_animated/"&gt;here&lt;/a&gt;. Fun, isn't it?&lt;/p&gt;
&lt;h3&gt;More complex scenarios&lt;/h3&gt;
&lt;p&gt;Sometimes we are faced with more complex scenarios than just disabling or enabling part of a form, or showing and hiding it. Often these more complex scenarios involve &lt;em&gt;replacing&lt;/em&gt; one set of inputs with another depending on what the user selects. The example that Luke Wroblewski uses in his &lt;a href="http://rosenfeldmedia.com/books/web-form-design/"&gt;book&lt;/a&gt; is a "contact me" form, where the user can choose to be contacted via email, phone, SMS, or IM. When the user makes a selection, the form changes to show just the relevant fields (email address for email, phone number for phone, and so on).&lt;/p&gt;
&lt;p&gt;There are lots of different ways that a form like this could work. You could have the initial selection as tabs, with the appropriate form fields inside each tab. You could have a drop-down list for email, SMS, etc, with the form fields right below it. You could have radio buttons for the initial selection, with the relevant fields appearing either below the radio button group or below the selected option. You could even go with a progressive-enabling-style design, with a disabled set of fields after each radio button, with the appropriate set of controls being enabled when the user selects one of the options.&lt;/p&gt;
&lt;p&gt;(And, of course, there are lots of other scenarios where one user selection changes something else. One that you see pretty often is two drop-down lists, where the first is for selecting a category and the second is for selecting a sub-category, or an item within the selected category. So on a site that lists second-hand cars, you might have one drop-down list for selecting the brand, and a second for selecting the model.)&lt;/p&gt;
&lt;p&gt;I could show you how to prototype one of these, but that wouldn't help at all with any of the others. And if I were to show you how to prototype them all, you would soon lapse into a boredom-induced coma. So what to do? &lt;/p&gt;
&lt;p&gt;Is there some common thread can we draw out of all these different scenarios? Maybe there's some technique can I show you that will be useful in prototyping all of these? Well, there isn't really. All I can do is give you some pointers, which will hopefully help you to avoid some wasted effort:&lt;/p&gt;
&lt;h4&gt;Be lazy.&lt;/h4&gt;
&lt;p&gt;There is the way that a proper programmer would do something, and then there are shortcuts. We're not writing production code here, so it doesn't matter if we cut corners. What matters is that it walks and quacks like the real thing. Or even just enough like the real thing to be moderately convincing. So going back to the example I just gave of a pair of drop-down lists, the proper way to build something like this would be to populate the first list dynamically using a list of car brands that you request from the server. Then, when the user selects a brand, you would make another server request for the list of models for the brand, and use that to dynamically build up the list.&lt;/p&gt;
&lt;p&gt;But for a prototype, you might not even &lt;em&gt;need&lt;/em&gt; all the possible car brands and their models. It might be enough to have half a dozen brands, and a few models for each. And instead of dynamically populating each &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element with the appropriate &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;s, you can put six separate &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;s in yout HTML, one for each brand, hide them all to start with, and just use JavaScript to show the right one depending on the brand that the user selects.&lt;/p&gt;
&lt;h4&gt;Learn a few key things in JavaScript/jQuery.&lt;/h4&gt;
&lt;p&gt;You don't need to know everything there is to know about JavaScript and jQuery to be able to do useful stuff with it. The ones I find myself using most often are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event handlers. Mostly, this means using jQuery's &lt;code&gt;on()&lt;/code&gt; function to detect when the user does something to some element, and performing some action when they do.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Chaining. Every function gives you something when it's done. (In programming parlance, it "returns" it.) You can then do something with the thing it returns. So if you call the &lt;code&gt;find()&lt;/code&gt; function on an element like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#myelement&amp;#39;).find(&amp;#39;li&amp;#39;);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;find()&lt;/code&gt; returns the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element that it found (if there was one within &lt;code&gt;#myelement&lt;/code&gt; for it to find). So then you can do stuff to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; by chaining another function on the end, like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;#myelement&amp;#39;).find(&amp;#39;li&amp;#39;).hide();
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;hide()&lt;/code&gt; returns the element that it just hid, so you could, if you wanted, tack on yet another function to the chain to do something else to it. (But we won't.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Simple conditional branching. The &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;if ... else&lt;/code&gt; constructs let you ask "is this thing true", and if it is, to perform some action. (&lt;code&gt;else&lt;/code&gt; lets you do something else if it isn't true.) &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Slightly less simple conditional branching. When you've got something that can have multiple different outcomes, each with a different action to be performed, &lt;code&gt;if&lt;/code&gt; becomes an overly-complicated way of doing things. The JavaScript &lt;code&gt;switch&lt;/code&gt; statement is perfect in these situations. It's ideal when you've got something like a drop-down list with several options, and you want to do a different thing for each selected option. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Making stuff appear and disappear. We can use &lt;code&gt;show()&lt;/code&gt;, &lt;code&gt;hide()&lt;/code&gt;, and &lt;code&gt;toggle()&lt;/code&gt;, as we've seen, to make stuff appear and disappear. And we can either supply additional arguments to these functions to animate them (and to control things like the speed and direction of the animation) or use special functions like &lt;code&gt;slideUp()&lt;/code&gt; and &lt;code&gt;slideDown()&lt;/code&gt; (and &lt;code&gt;slideToggle()&lt;/code&gt;, which we saw above) to do the same thing. There's also the &lt;code&gt;animate()&lt;/code&gt; function, for when we want full control over every aspect of an animation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Look stuff up.&lt;/h4&gt;
&lt;p&gt;The &lt;a href="http://api.jquery.com"&gt;jQuery documentation&lt;/a&gt; is pretty good. If you know the name of the function you're trying to use, it tells you everything you need to know about how to use it. And if you &lt;em&gt;don't&lt;/em&gt; know which function you need, it has category pages that list all the functions for, for example, &lt;a href="http://api.jquery.com/category/traversing/"&gt;getting from one element to another&lt;/a&gt;, or for &lt;a href="http://api.jquery.com/category/manipulation/"&gt;inserting, removing, and manipulating elements&lt;/a&gt;. (Note that jQuery is an addition to JavaScript. Some things, like &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;switch&lt;/code&gt;, are part of JavaScript, not jQuery, so you won't get very far searching for them in the jQuery docs.) And if you Google for the thing you're wrestling with, you'll usually end up at &lt;a href="http://stackoverflow.com"&gt;Stack Overflow&lt;/a&gt;, the Q&amp;amp;A site for programmers. 99.9% of the time, your question will have already been asked and answered. For example, I wanted to know the correct way to find out if a checkbox is checked or not. So I Googled &lt;a href="https://www.google.com/search?q=jquery+get+checkbox+value&amp;amp;hl=en"&gt;jquery checkbox get value&lt;/a&gt;, clicked the &lt;a href="http://stackoverflow.com/questions/2834350/get-checkbox-value-in-jquery"&gt;first result&lt;/a&gt;, and got the information I needed from the top answer. Easy-peasy.&lt;/p&gt;
&lt;h4&gt;Don't be afraid of doing it "wrong".&lt;/h4&gt;
&lt;p&gt;For anything you want to do, there are going to be several (even many) different ways to do it. Does it matter which one you choose? For a (disposable) prototype, it doesn't. The only thing that matters is: does it work or not? If it works, it's "right". I'm sure a "real" programmer would take one look at most of my prototype code and snicker to himself under his beard. But it serves the purpose for which it is intended, so it &lt;em&gt;doesn't matter&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Having said that, I do have a couple of examples that you can take a look at. &lt;a href="http://livetyping.capcloud.com/sample_selection_dependent_1_dropdown.html"&gt;The first&lt;/a&gt; shows a different form depending on what you select in a drop-down list. &lt;a href="http://livetyping.capcloud.com/sample_selection_dependent_2_dropdown_lazy_way.html"&gt;The second&lt;/a&gt; changes the contents of one drop-down list depending on what you select in another. Use the View Source option in your browser to see how they work&amp;mdash;they don't do anything particularly clever.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Changing parts of a form depending on what the user selects is pretty powerful. We can use it to hide complexity from the user and make our forms more simple to use. It means we need to learn a bit of JavaScript, but we can do a lot with a little. I think it's well worth the effort.&lt;/p&gt;
&lt;p&gt;This was originally published on &lt;a href="http://boxesandarrows.com/forms-the-complete-guide-part-4/"&gt;Boxes &amp;amp; Arrows&lt;/a&gt; on 27 May 2014.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you liked this post, you should really check out my upcoming book, &lt;a href="http://prototypingforms.com"&gt;Prototyping Forms&lt;/a&gt;. Just like this, only &lt;em&gt;more&lt;/em&gt; and &lt;em&gt;better&lt;/em&gt;!&lt;/p&gt;
&lt;!-- This is really just the tip of the iceberg when it comes to what you can do with HTML prototyping. [Livetyping](http://livetyping.capcloud.com/), my HTML prototyping course for UXers, will teach you how to do tons more things like this, including more form stuff, drag and drop, animation, and more. You should [check it out](http://livetyping.capcloud.com/).

And if you like stuff like this, you should sign up for my newsletter:

&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt; --&gt;</summary></entry><entry><title>Forms—The Complete Guide—Part 3: Grouping and Inline Help</title><link href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-3-grouping-and-inline-help.html" rel="alternate"></link><published>2014-04-29T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-04-29:blog/forms-the-complete-guide-part-3-grouping-and-inline-help.html</id><summary type="html">&lt;p&gt;Forms are important&amp;mdash;they're the most common way to get information from our users. But just making wireframes of a form misses a big piece of the picture&amp;mdash;what it's like to &lt;em&gt;interact with it&lt;/em&gt;. An HTML prototype of a form, on the other hand, can look and behave just like the real thing.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-1-layout-and-alignment.html"&gt;first post&lt;/a&gt;, I showed you how to lay out a form and align the labels the way you want, using HTML and &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-2-input-types.html"&gt;second post&lt;/a&gt;, I showed you all the different input types you can use.&lt;/p&gt;
&lt;p&gt;In this post, I'll show you how to group your inputs and how to provide help to the user while they're filling out the form.&lt;/p&gt;
&lt;p&gt;To make the most of these posts, I &lt;em&gt;strongly&lt;/em&gt; encourage you to get your hands dirty. Type in the examples and then check them out in your browser. This gets it into your brain, and your &lt;em&gt;fingers&lt;/em&gt;, more effectively than just copying and pasting (or worse, just reading).&lt;/p&gt;
&lt;h3&gt;Grouping&lt;/h3&gt;
&lt;p&gt;When you've got more than just a few input fields, it makes sense to organize them into logical groups, which you then separate visually. This makes the form less intimidating&amp;mdash;it looks more like several small forms than one long one. &lt;/p&gt;
&lt;p&gt;Let's make a shipping details form similar to the one we created in the &lt;a href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-1-layout-and-alignment.html"&gt;first post&lt;/a&gt;. This time, in addition to the shipping address inputs, we'll add an extra input for the user's email address, and we'll split the phone number and email address out into a separate group.&lt;/p&gt;
&lt;p&gt;The most obvious way to do this would be to add a second &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; with its own legend, and put the phone and email inputs in there. &lt;/p&gt;
&lt;p&gt;Let's try it. In the &lt;code&gt;index.html&lt;/code&gt; file of a new Foundation project (see &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;this post&lt;/a&gt; to find out how to set that up), add this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8841409.js"&gt;&lt;/script&gt;

&lt;p&gt;It's OK, but the result looks a bit busy (&lt;a href="http://livetyping.capcloud.com/stuff/forms_5_groups/index.html"&gt;view larger&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/groups_with_borders.png" alt="Form groups with borders" width="360"&gt;&lt;/p&gt;
&lt;p&gt;There's just a bit too much to process here. We don't need quite so many visual elements to separate the two groups. We could abandon &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;s and replace the &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt;s with headings, but that would be semantically less correct. It would also affect the form's accessibility.&lt;/p&gt;
&lt;p&gt;A better approach would be to tweak the CSS a bit to reduce the visual clutter. Let's create a new stylesheet and link it up from &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So open up a new file in your text editor and add this CSS rule to it:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8646638.js"&gt;&lt;/script&gt;

&lt;p&gt;Call the file &lt;code&gt;form.css&lt;/code&gt; and save it in the &lt;code&gt;css&lt;/code&gt; folder. Then add this line to &lt;code&gt;index.html&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8646634.js"&gt;&lt;/script&gt;

&lt;p&gt;How's that? (&lt;a href="http://livetyping.capcloud.com/stuff/forms_6_groups/index.html"&gt;View larger.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/groups_without_borders.png" alt="Form groups: no borders" width="360"&gt;&lt;/p&gt;
&lt;p&gt;It's certainly cleaner. We could leave it at that. Or we could do some other things to further emphasize the grouping. &lt;/p&gt;
&lt;p&gt;For example, we could put a thin horizontal line (&lt;code&gt;&amp;lt;hr/&amp;gt;&lt;/code&gt;) between the groups:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_groups_hr.png" width="360" alt="Form groups: horizontal rule"&gt;&lt;/p&gt;
&lt;p&gt;Or we could give each group a background color:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_groups_bg.png" width="360" alt="Form groups: background color"&gt; &lt;/p&gt;
&lt;p&gt;Whatever works for you.&lt;/p&gt;
&lt;h3&gt;Inline help&lt;/h3&gt;
&lt;p&gt;Sometimes it's not 100% clear from a field's label what the user is meant to enter in the field. Maybe it's something that is simply too long to explain in a short label, so we need some additional text to help the user out.&lt;/p&gt;
&lt;p&gt;A well known example is the credit card security code, which is often labeled as something not very helpful, like "CSC" or "CVV". Even "Security code" may not be obvious to some users. So we need to provide the user with an additional explanation somehow. &lt;/p&gt;
&lt;p&gt;There are several different approaches we can use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We can have a big lump of explanatory text at the top of the form. These often get ignored though.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can supplement the label with additional text (usually in a smaller font size) for fields that need it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can use the &lt;code&gt;placeholder&lt;/code&gt; attribute to give the user an example of the type of information required and its format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can have some help text that appears automatically when a field (or one of a group of fields) gets focus.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can put an icon next to the label that displays help text when the user clicks on it or hovers over it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first one is not usually a good idea, so we won't bother with it. The second one is technically very easy to do, so we'll skip that too. And we've already seen how to use &lt;code&gt;placeholder&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So let's tackle the last two.&lt;/p&gt;
&lt;h4&gt;Automatic inline help&lt;/h4&gt;
&lt;p&gt;Let's say you're designing a form that lets the user order a piece of clothing, a t-shirt, for example. They need to select a size, but you want to direct them to your sizing chart if they're not sure. So for just this one field, we're going to have a piece of help text that appears when the size control gets focus. &lt;/p&gt;
&lt;p&gt;This is a bit like what eBay does on the password field on its registration form:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ebay_reg.png" width="450" alt="Inline help on eBay's registration form"&gt;&lt;/p&gt;
&lt;p&gt;(Actually, in a scenario like ours, it's more likely that the "form" is just a couple of fields on a product page that allow the user to select size, color, and quantity.)&lt;/p&gt;
&lt;h5&gt;Our "form": page structure&lt;/h5&gt;
&lt;p&gt;Let's go ahead and build a prototype product page for our t-shirt. We're going to make it look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/product_page_sketch.jpg" alt="T-shirt product page sketch"&gt;&lt;/p&gt;
&lt;p&gt;It's got a title (the name of the shirt) at the top. Under that, there's a nice big photo, with additional photos that you can see by clicking the thumbnails on the left (though we'll fake this part&amp;mdash; it's not important here). And to the right of the photo, we've got our form, consisting of inputs for choosing the color, size, and quantity, and an "Add to cart" button.&lt;/p&gt;
&lt;p&gt;Only the size selector needs inline help, which we're going to display to the right of the selector. But when do we we want the help to appear? I think it's best if we show it both when the selector gets focus, and when the user moves the pointer in the general vicinity of the selector. That way, it will work well on both touch screens and when you've got a mouse and keyboard.&lt;/p&gt;
&lt;p&gt;The first thing we need to do is get our basic page structure set up. We'll start out with an empty Foundation &lt;code&gt;index.html&lt;/code&gt; file (refer back to the &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;instructions in this post&lt;/a&gt; for that). &lt;/p&gt;
&lt;p&gt;Obviously, in a real design, you're going to have global navigation, a footer, and all kinds of other stuff on the page. But here, we're just prototyping the essentials.&lt;/p&gt;
&lt;p&gt;For our title, we need a row &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; containing one column that takes up the whole of the available width. (Not the whole width of the &lt;em&gt;page&lt;/em&gt;, but the usable area in the middle, which by default in Foundation has a maximum width of 1000 pixels, and which gets shrunk down and rearranged responsively for smaller screens). &lt;/p&gt;
&lt;p&gt;To achieve this, we give the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; containing the heading classes of &lt;code&gt;small-12&lt;/code&gt; and &lt;code&gt;columns&lt;/code&gt;. This means that for screen sizes of small and above (i.e., all screen sizes), we want it to take up the whole of the available with (all twelve of the available twelve columns). &lt;/p&gt;
&lt;p&gt;So we need to add this to our &lt;code&gt;index.html&lt;/code&gt;, right after the opening &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10006524.js"&gt;&lt;/script&gt;

&lt;p&gt;Next we need another row &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that will contain the rest of the content. Within this, we need three column &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s: one for the thumbnails, one for the big photo, and one for the form:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10015853.js"&gt;&lt;/script&gt;

&lt;p&gt;Here, I'm using &lt;a href="http://placehold.it"&gt;placehold.it&lt;/a&gt; to generate placeholder images, instead of using real images. (They have instructions over there that explain how to size the image, how to change the text, and so on.)&lt;/p&gt;
&lt;p&gt;Here, the &lt;code&gt;small-&lt;/code&gt; classes divide up the twelve available columns into three, with widths of one, five, and six columns respectively (for all screen sizes). The &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; for the form is empty at the moment, so we can't see anything there yet:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/product_page_WIP_1.png" alt="T-shirt product page WIP 1"&gt;&lt;/p&gt;
&lt;p&gt;Things look a bit scrunched up, so let's add a bit of white space. In the last post, I showed you how to put CSS rules in a separate file and link to it from &lt;code&gt;index.html&lt;/code&gt;. But for the sake of speed, this time, we're going to put the rule in a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block in the page's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;. Within the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags, add this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10016925.js"&gt;&lt;/script&gt;

&lt;p&gt;This just adds top and bottom margins to the title, and gives all the images a bottom margin.&lt;/p&gt;
&lt;h5&gt;The actual form&lt;/h5&gt;
&lt;p&gt;Now for the actual form part of the page. This is also going to need some structure. Because we want to position the inline help to the right of the size selector, what we need to do is divide the form up into four row &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s: one for each control and its label, and one for the "Add to cart" button.&lt;/p&gt;
&lt;p&gt;Within each row, we'll divide the space up into two equal columns, one for the control, and one for the help (where needed). So let's add this within that third, empty &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10016482.js"&gt;&lt;/script&gt;

&lt;p&gt;Notice how each row has only one &lt;code&gt;columns &amp;lt;div&amp;gt;&lt;/code&gt;, except the second one. This is where the size selector will go&amp;mdash;it's the only one that needs a column to contain the inline help. And the whole thing is enclosed in &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; tags, because, well, it's a form.&lt;/p&gt;
&lt;p&gt;But until we add the actual controls, we can't see if it's right. So let's do that now. Add the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;s, &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;s, &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;s, the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, and the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10016580.js"&gt;&lt;/script&gt;

&lt;p&gt;Nothing here that we haven't seen before. (Except I've explicitly set the &lt;code&gt;value&lt;/code&gt; of the quantity &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; to 1, a sensible default I think.)&lt;/p&gt;
&lt;p&gt;And how does it look? So far, so good:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/product_page_WIP_2.png" alt="T-shirt product page WIP 2"&gt;&lt;/p&gt;
&lt;p&gt;This looks OK, but the form elements could use a bit of white space between them. So add this rule, again between the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10017000.js"&gt;&lt;/script&gt;

&lt;p&gt;This just adds bottom padding to each row. Now the only thing we need to add is the inline help itself. Oh, and there's the little matter of making it appear and disappear when we want. We'll get to that in a minute. &lt;/p&gt;
&lt;p&gt;First let's add the HTML. Inside that empty &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; (the one right after the size &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;), add this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10016713.js"&gt;&lt;/script&gt;

&lt;p&gt;This uses Foundation's &lt;code&gt;panel&lt;/code&gt; and &lt;code&gt;callout&lt;/code&gt; classes to style it, plus some inline styling to make it a bit more compact. (Any bigger, and it'll make the row taller, which means things will jump around when we show and hide it.) It also has an &lt;code&gt;aria-live&lt;/code&gt; attribute so that screen readers will be aware of the content when we make it suddenly appear on the screen.&lt;/p&gt;
&lt;p&gt;This is how it looks now:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/product_page_WIP_3.png" alt="T-shirt product page WIP 3"&gt;&lt;/p&gt;
&lt;p&gt;Now we need to hide it, so we just add &lt;code&gt;display: none;&lt;/code&gt; to the existing &lt;code&gt;style&lt;/code&gt; attribute of the inner &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; (the one with the &lt;code&gt;panel&lt;/code&gt; and &lt;code&gt;callout&lt;/code&gt; classes), so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10016790.js"&gt;&lt;/script&gt;

&lt;p&gt;Next, we need to show it and hide it. The only way to do this is with JavaScript. This is more like "proper programming", but don't be put off by that&amp;mdash;I'll do my best to make it simple and easy to understand.&lt;/p&gt;
&lt;h5&gt;JavaScript: show help on focus&lt;/h5&gt;
&lt;p&gt;First, we need somewhere to put our JavaScript code. Normally, you would keep it in a separate file, so you can reuse it in multiple HTML pages. But for simplicity, we'll add it in a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block at the bottom of the page, a bit like what we did with the CSS rules in the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block earlier.&lt;/p&gt;
&lt;p&gt;Now, jQuery is included with Foundation, so that's what we'll be using here. All the code we'll be writing will go inside jQuery's &lt;code&gt;$(document).ready()&lt;/code&gt; function. This means that whatever we put inside it will only get run once the page has loaded.&lt;/p&gt;
&lt;p&gt;To start with, we'll add some code that shows our inline help &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; when the size &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; gets focus. (This happens when the user clicks or tabs to it. Or when they tap on it on a touch device.) So add this &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block at the bottom, right before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10019028.js"&gt;&lt;/script&gt;

&lt;p&gt;Do not be alarmed! This may look a bit intimidating, but if we take it piece by piece, you'll see there's not a lot to it.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags tell the browser that what's inside is Javascript. The &lt;code&gt;$(document).ready()&lt;/code&gt; function, as I explained, tells the browser to run the code inside it only after the page has loaded. The real meat here is what is between the curly braces (i.e., after &lt;code&gt;$(document).ready(function(){&lt;/code&gt; and before &lt;code&gt;});&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Let's look at the first bit:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(&amp;#39;.field_row input, .field_row select&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This says "Hey, jQuery, find any &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; that is a child of something with a class of &lt;code&gt;field_row&lt;/code&gt;."&lt;/p&gt;
&lt;p&gt;jQuery uses the exact same selectors (and ways of combining them) as CSS. So that's one less thing to learn. (I covered the very basics of CSS, among other things, in &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;this post&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;So just like in CSS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A period means it's a class name. (So &lt;code&gt;.field_row&lt;/code&gt; means any element with a class of &lt;code&gt;field_row&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;A hash (&lt;code&gt;#&lt;/code&gt;) means it's an element ID. (So &lt;code&gt;#size_selector&lt;/code&gt; means the element with the ID &lt;code&gt;size_selector&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;Two selectors separated by a space means the second one must be a child of the first for the selector to apply. (So &lt;code&gt;div input&lt;/code&gt; means any &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; that is a child of a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;A comma means "or". (So &lt;code&gt;input, select&lt;/code&gt; means any &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can combine selectors in other ways. For example, &lt;code&gt;div.field_row&lt;/code&gt; means a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with a class of &lt;code&gt;field_row&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OK, on to the next part:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="na"&gt;.on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="no"&gt;focus&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This says "For whatever we just selected, do something when it gets focus." &lt;code&gt;on()&lt;/code&gt; is what's called a function. A function is just a chunk of code that has a name that you can use to run it (to "call it", in programming terms). (The period means "Call this function on the thing we selected.")&lt;/p&gt;
&lt;p&gt;&lt;code&gt;on()&lt;/code&gt; looks out for an event, and does something when that event occurs. In this case, the event is &lt;code&gt;focus&lt;/code&gt;. You can tell &lt;code&gt;on()&lt;/code&gt; to look out for other events too, like &lt;code&gt;click&lt;/code&gt; or &lt;code&gt;mouseover&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Everything between the last (opening) curly brace after &lt;code&gt;function()&lt;/code&gt; and the closing curly brace here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;is the code that actually gets run when &lt;code&gt;on()&lt;/code&gt; detects that one of the selected elements has been given focus. That's this line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$(this).parent().parent().find(&amp;#39;.help&amp;#39;).show();
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;What this says is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Take the element that was clicked (&lt;code&gt;this&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Find its parent element. (In this case, the parent of the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; or the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; is the &lt;code&gt;column &amp;lt;div&amp;gt;&lt;/code&gt; that contains it.)&lt;/li&gt;
&lt;li&gt;Find &lt;em&gt;that&lt;/em&gt; element's parent. (In this case, that's the &lt;code&gt;row &amp;lt;div&amp;gt;&lt;/code&gt; containing the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;/&lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;Within this element, find any element with a class of &lt;code&gt;help&lt;/code&gt;. (That's the inline help &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;Finally, show it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This technique, where you call one function after another like this, is called &lt;em&gt;chaining&lt;/em&gt;. It can save you a lot of work. (The alternative would be to store the element you get in step 2, then (step 3) call &lt;code&gt;parent()&lt;/code&gt; on what you stored, then store &lt;em&gt;that&lt;/em&gt;, and so on and so on.)&lt;/p&gt;
&lt;p&gt;Phew!&lt;/p&gt;
&lt;p&gt;Now if you click on the size &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; (or tab to it), the inline help magically appears. But it doesn't go away when the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; loses focus.&lt;/p&gt;
&lt;h5&gt;JavaScript: hiding help when the selector loses focus&lt;/h5&gt;
&lt;p&gt;Luckily, to make this happen, we can just copy our existing code and make a couple of small changes. Copy the three lines of code (the ones that call &lt;code&gt;on()&lt;/code&gt;), add a couple of blank lines below it, then paste them in. Now just change &lt;code&gt;focus&lt;/code&gt; to &lt;code&gt;blur&lt;/code&gt; and &lt;code&gt;show&lt;/code&gt; to &lt;code&gt;hide&lt;/code&gt;. The code you pasted in should now look like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10019936.js"&gt;&lt;/script&gt;

&lt;p&gt;If you try it now, you'll see that when the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; gets focus, the help appears, and when it loses focus, it disappears again. Great! But it's not enough.  Earlier we said we want the help to appear on hover as well. This isn't a problem&amp;mdash; a few more lines of code will do it. But where do we want the hover to work?&lt;/p&gt;
&lt;h5&gt;JavaScript: show help on hover too&lt;/h5&gt;
&lt;p&gt;Here, our help text contains a link (to a page that doesn't exist, unless you feel like creating it). If the help appears when you hover over the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, when you go to click the link, it will disappear as soon as your pointer leaves the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;. Which is not very nice.&lt;/p&gt;
&lt;p&gt;We need to make the hover work for the element that contains both the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; the help, that is, the &lt;code&gt;row &amp;lt;div&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So let's add some more code within our &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10020350.js"&gt;&lt;/script&gt;

&lt;p&gt;This time, the selector is simpler, because we're just targeting the rows (that is, the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s with a class of &lt;code&gt;field_row&lt;/code&gt;). (You may be wondering why I'm using this class, which applies to all four rows, instead of just sticking an ID on the one row that contains the help and use that here. The answer is that this way is more flexible&amp;mdash;if I want to add help for another field later, I can just add it to the HTML and it will work, without having to change anything in the JavaScript.)&lt;/p&gt;
&lt;p&gt;Instead of &lt;code&gt;on()&lt;/code&gt; after the period, this time we've got a function called &lt;code&gt;hover()&lt;/code&gt;. In contrast to &lt;code&gt;on()&lt;/code&gt;, where we specified one piece of code that was run when the event was detected, here we need two: one that tells jQuery what to do when the hover begins, and one that tells it what to do when it ends. That's why there are two &lt;code&gt;function(){}&lt;/code&gt;s.&lt;/p&gt;
&lt;p&gt;The code for hover start goes inside the curly braces in the first &lt;code&gt;function(){}&lt;/code&gt;, while the hover end code goes in those of the second. To make things easier to read, lets split it up onto separate lines, like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10020512.js"&gt;&lt;/script&gt;

&lt;p&gt;Now we can just put the code that actually does stuff in those two blank lines. This code is going to be exactly the same as for the &lt;code&gt;focus&lt;/code&gt; and &lt;code&gt;blur&lt;/code&gt; events, except here, we don't need those calls to &lt;code&gt;parent()&lt;/code&gt; to navigate up from the field to the &lt;code&gt;row &amp;lt;div&amp;gt;&lt;/code&gt;, because we're already there. So add the necessary lines to make your code look like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10020603.js"&gt;&lt;/script&gt;

&lt;p&gt;If you try it now, you'll see that hovering anywhere in the size row makes the help appear, and when you move away, it disappears. Yes!&lt;/p&gt;
&lt;p&gt;Except what happens when the size &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; has focus, and then you hover and move away? No! The help disappears! That shouldn't happen!&lt;/p&gt;
&lt;h5&gt;JavaScript: actually, don't hide it when the hover ends, in this one specific case&lt;/h5&gt;
&lt;p&gt;So, what to do? Well, what we need to do is check if the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; has focus before we hide the help (at the end of the hover)&amp;mdash;and if it &lt;em&gt;does&lt;/em&gt; have focus, we do nothing. For this, we'll use JavaScript's &lt;code&gt;if&lt;/code&gt; construct. This lets us check if something is true, then do something. (And if it's not true, we can either do nothing or do something different.)&lt;/p&gt;
&lt;p&gt;So change your code so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10020755.js"&gt;&lt;/script&gt;

&lt;p&gt;What's going on here? The only new thing here is that we've wrapped the line that hides the help in an &lt;code&gt;if&lt;/code&gt; block. The line inside the block only gets executed if the bit in the parentheses after &lt;code&gt;if&lt;/code&gt; is true. Let's take a look at that expression:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;!$(this).find(&amp;#39;input, select&amp;#39;).is(&amp;#39;:focus&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Ignore the exclamation point for a moment. &lt;code&gt;this&lt;/code&gt; is the &lt;code&gt;row &amp;lt;div&amp;gt;&lt;/code&gt;. Within this &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, we're using &lt;code&gt;find()&lt;/code&gt; to get either the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; or the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, and then we use the &lt;code&gt;is()&lt;/code&gt; function (which checks if an element has certain attributes) to check if it has focus.&lt;/p&gt;
&lt;p&gt;But this gives us an answer of "true" if the element &lt;em&gt;does&lt;/em&gt; have focus. But we want to to hide it only if it &lt;em&gt;doesn't&lt;/em&gt; have focus. That's where the exclamation point comes in. It means "not", and simply reverses the result of the expression&amp;mdash;true becomes false and false becomes true.&lt;/p&gt;
&lt;p&gt;And now it works. (You can &lt;a href="http://livetyping.capcloud.com/stuff/forms_9_inline_help_WIP/index.html"&gt;see it in action here&lt;/a&gt;.)&lt;/p&gt;
&lt;h4&gt;User-triggered inline help&lt;/h4&gt;
&lt;p&gt;You'll be relieved to hear that user-triggered inline help is much easier to set up. All we need to do is take the prototype we just created and make a few changes (mostly &lt;em&gt;removing stuff&lt;/em&gt;).&lt;/p&gt;
&lt;h5&gt;Adding an icon&lt;/h5&gt;
&lt;p&gt;First off, we need to add some kind of icon that the user can click or hover over to bring up the help. There is a set of &lt;a href="http://zurb.com/playground/foundation-icon-fonts-3"&gt;Foundation icons&lt;/a&gt; that you can use just by adding one line to your page's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10022960.js"&gt;&lt;/script&gt;

&lt;p&gt;Let's add an "i-in-a-circle" icon to the "Size" label. Find it in your HTML and change it so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10023003.js"&gt;&lt;/script&gt;

&lt;p&gt;The &lt;code&gt;fi-info&lt;/code&gt; class on the &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; element is how we specify which icon we want. (Other icons get fi-something-else, like &lt;code&gt;fi-heart&lt;/code&gt; for a heart or &lt;code&gt;fi-flag&lt;/code&gt; for a flag.)&lt;/p&gt;
&lt;p&gt;The Foundation icons are an &lt;em&gt;icon font&lt;/em&gt;. This means that you can style them just like text. You can make them bigger, change their color, add shadows, whatever. For now, we're just making the icon a bit bigger, making sure it lines up with the label, and changing the pointer to a hand so that it looks clickable. &lt;/p&gt;
&lt;p&gt;Note that the &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; can't be inside &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; because clicking the label gives focus to the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; (because of the &lt;code&gt;for&lt;/code&gt; attribute that links the two). If we put the icon inside &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;, clicking it the same as clicking the label.&lt;/p&gt;
&lt;p&gt;Also, we need to set the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;'s &lt;code&gt;display&lt;/code&gt; to &lt;code&gt;inline-block&lt;/code&gt; (instead of the default of &lt;code&gt;block&lt;/code&gt;) to force the label and the icon to stay on the same line.&lt;/p&gt;
&lt;h5&gt;New JavaScript for new behavior&lt;/h5&gt;
&lt;p&gt;Now, how do we want it to behave? If we make it so that the help only appears when you hover over the icon, then we're in the same situation we would have been in if we'd made it appear when you hover on the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;&amp;mdash;when you go to click on the link in the help, it disappears before you can.&lt;/p&gt;
&lt;p&gt;There are a couple of things we can do. We could introduce a delay, so that when the pointer moves away from the icon, the help does not disappear immediately. The other alternative is to make the help appear when you click on the icon, and have some way to dismiss it. Since we've already seen how to make things happen on hover, let's go for the click-triggered help this time.&lt;/p&gt;
&lt;p&gt;Within our &lt;code&gt;$(document).ready()&lt;/code&gt;, we can get rid of all the code and replace it with this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10039987.js"&gt;&lt;/script&gt;

&lt;p&gt;Here, we're targeting the &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; element with a class of &lt;code&gt;fi-info&lt;/code&gt; (our icon), and we're telling the &lt;code&gt;on()&lt;/code&gt; function to look out for click events on it. When it detects a click, we want it to start at &lt;code&gt;this&lt;/code&gt; (the icon), go up two levels in the page hierarchy (by calling &lt;code&gt;parent()&lt;/code&gt; twice), which takes us to the &lt;code&gt;row &amp;lt;div&amp;gt;&lt;/code&gt;, and then call &lt;code&gt;toggle()&lt;/code&gt; on it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;toggle()&lt;/code&gt; is rather clever. It hides the element if it's visible, and shows it if it's hidden. This means you don't need to keep track of its visibility. So that's less work for us. And it gives us a way to dismiss the help&amp;mdash;you just click the icon again (which is nice and symmetrical).&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/forms_inline_help_user_triggered.png" alt="User-triggered inline help"&gt;&lt;/p&gt;
&lt;p&gt;And that's it. (&lt;a href="http://livetyping.capcloud.com/stuff/forms_10_inline_help/index.html"&gt;See it for real here.&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;Bonus learnings! &lt;em&gt;Or&lt;/em&gt; I came for the forms, but stayed for the RWD&lt;/h3&gt;
&lt;p&gt;If you look at either of the above examples on your phone, you'll see that it's just the same thing, but squished down and misaligned. This is a bit of a shame. Foundation is a &lt;em&gt;responsive&lt;/em&gt; front-end framework&amp;mdash;we can use it to change the layout on smaller screens to something that makes better use of the available screen space.&lt;/p&gt;
&lt;p&gt;Above, we used &lt;code&gt;small-&lt;/code&gt; column classes for everything. This means that the defined layout is used for small, medium, and large screens. All we need to do is change the classes a bit to tell Foundation how the page should be laid out on smaller screens.&lt;/p&gt;
&lt;p&gt;Here, we're just going to have two layouts: one for small (phone-sized) screens, and one for medium (tablets) and large (desktop) screens.&lt;/p&gt;
&lt;p&gt;In our small layout, what we really want is to just have everything stacked vertically: first the title, then the thumbnails, then the big picture, then the form. We can get this by just changing every &lt;code&gt;small-&lt;/code&gt; class name to &lt;code&gt;medium-&lt;/code&gt;. (What this means is that Foundation does something with the column widths we give it for medium and large screens, and &lt;em&gt;treats it as if we didn't specify any column widths at all&lt;/em&gt; on small screens&amp;mdash;when you don't specify column widths for elements, Foundation makes them full width and stacks them vertically.)&lt;/p&gt;
&lt;p&gt;On smaller screens, that looks like this (&lt;a href="https://gist.github.com/martinpolley/10123955"&gt;code&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_inline_help_responsive_1.png" width="200" alt="Responsive product page layout on a small screen 1"&gt;&lt;/p&gt;
&lt;p&gt;That's pretty good, but I think it would look better if the thumbnails were below the big photo instead of above it. Foundation has classes you can add to make this happen.&lt;/p&gt;
&lt;p&gt;The way you do it is like this. First, you change the order of the elements so that they appear correctly at small screen sizes. Then you add classes to move them left or right on larger screen sizes.&lt;/p&gt;
&lt;p&gt;Let's swap those two &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s so they look like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10125242.js"&gt;&lt;/script&gt;

&lt;p&gt;Now we need to add &lt;code&gt;push&lt;/code&gt; and &lt;code&gt;pull&lt;/code&gt; classes to move these two columns to the left and right so that they are in the right positions for medium and large screens. Adding a &lt;code&gt;push&lt;/code&gt; class pushes the column to the right, while a &lt;code&gt;pull&lt;/code&gt; class pulls the column to the left.&lt;/p&gt;
&lt;p&gt;So we need to add the &lt;code&gt;medium-push-1&lt;/code&gt; class to the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains the big photo to push it one place to the right. This will leave the first column free for the thumbnails. Then we add the &lt;code&gt;medium-pull-5&lt;/code&gt; class to the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; containing the thumbnails to pull it five places to the left, into the first column. This part of the code should now look like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/10126554.js"&gt;&lt;/script&gt;

&lt;p&gt;Now if we look at it on a small screen (or shrink down our desktop browser window), we can see that the thumbnails are now below the big photo, just like we wanted (&lt;a href="http://livetyping.capcloud.com/stuff/forms_9_inline_help_responsive/index.html"&gt;real example here&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_inline_help_responsive_2.png" width="200" alt="Responsive product page layout on a small screen 2"&gt;&lt;/p&gt;
&lt;p&gt;And at larger screen sizes, the layout is just the same as before.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;We've covered quite a lot of ground in this post. Stay tuned for the next post, where we'll look at responsive enabling and responsive disclosure.&lt;/p&gt;
&lt;p&gt;This was originally published on &lt;a href="http://boxesandarrows.com/forms-the-complete-guide/"&gt;Boxes &amp;amp; Arrows&lt;/a&gt; on 22 April 2014.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you liked this post, you should really check out my upcoming book, &lt;a href="http://prototypingforms.com"&gt;Prototyping Forms&lt;/a&gt;. Just like this, only &lt;em&gt;more&lt;/em&gt; and &lt;em&gt;better&lt;/em&gt;!&lt;/p&gt;
&lt;!-- This is really just the tip of the iceberg when it comes to what you can do with HTML prototyping. [Livetyping](http://livetyping.capcloud.com/), my HTML prototyping course for UXers, will teach you how to do tons more things like this, including more form stuff, drag and drop, animation, and more. You should [check it out](http://livetyping.capcloud.com/).

And if you like stuff like this, you should sign up for my newsletter:

&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt; --&gt;</summary></entry><entry><title>Forms—The Complete Guide—Part 2: Input Types</title><link href="http://livetyping.capcloud.com/blog/forms-the-complete-guide-part-2-input-types.html" rel="alternate"></link><published>2014-04-05T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-04-05:blog/forms-the-complete-guide-part-2-input-types.html</id><summary type="html">&lt;p&gt;Forms are one of the most important parts of any site or app&amp;mdash;they are the most common way for our users to give us the information that we need to help them do what they want to do. &lt;/p&gt;
&lt;p&gt;But in many instances, we design forms statically, often as wireframes. But so often, what makes or breaks a form is what it's like to &lt;em&gt;interact with it&lt;/em&gt;. When the user clicks on a particular radio button, some additional inputs appear. How does that happen? More importantly, does the user understand what just happened?&lt;/p&gt;
&lt;p&gt;Things like this are next to impossible to explore using static deliverables. But with a &lt;em&gt;prototype&lt;/em&gt; of a form, it's easy. And with a prototype form made in &lt;em&gt;HTML&lt;/em&gt;, you can make it look and behave exactly like the real thing. Which means that once you've validated it with users, you can be sure that it can be implemented so that the appearance and feel are just the same.&lt;/p&gt;
&lt;p&gt;This series does not try to explain what your form should contain, how the fields should be grouped and laid out, where to put primary and secondary buttons, and so on. There are lots of great resources out there that do that already. (Like &lt;a href="http://rosenfeldmedia.com/books/web-form-design/"&gt;Luke's&lt;/a&gt; and &lt;a href="http://www.formsthatwork.com/"&gt;Caroline and Gerry's&lt;/a&gt; books. Or &lt;a href="http://uxdesign.smashingmagazine.com/2011/11/08/extensive-guide-web-form-usability/"&gt;Justin's article&lt;/a&gt;.) &lt;/p&gt;
&lt;p&gt;No. What this series does is give you the &lt;em&gt;how&lt;/em&gt;. You've already figured out what you think your form should contain and how it should behave. These posts will give you everything you need to know to make a prototype of your form in HTML, something that looks, works, and feels like the real thing. Which you can then use for usability testing, for getting stakeholder buy-in, and as a living specification for developers.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-1-layout-and-alignment.html"&gt;first post&lt;/a&gt; in this series, I showed you how to lay out a form and align the labels the way you want, using HTML and &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post, I'll show you the different types of inputs available to you and how to use them.&lt;/p&gt;
&lt;p&gt;To make the most of this post, I &lt;em&gt;strongly&lt;/em&gt; encourage you to get your hands dirty by actually typing in the examples and then opening them in your browser to see how they look and work. From personal experience, this gets it into your brain, into your &lt;em&gt;fingers&lt;/em&gt;, much better than just copying and pasting.&lt;/p&gt;
&lt;h3&gt;Input types&lt;/h3&gt;
&lt;p&gt;There are several different HTML elements that are used in forms. Buttons get their own element (&lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;), as do drop-down lists (&lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;), and multi-line text inputs (&lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;). &lt;/p&gt;
&lt;p&gt;But most form elements are the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element, with a &lt;code&gt;type&lt;/code&gt; attribute that specifies what kind of input it is.&lt;/p&gt;
&lt;p&gt;Let's look at them one by one.&lt;/p&gt;
&lt;p&gt;If you're following along and actually typing this stuff in, you need to set up a new Foundation project, open up its &lt;code&gt;index.html&lt;/code&gt; file, and delete all the sample content (see &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;this post&lt;/a&gt; to find out how).&lt;/p&gt;
&lt;p&gt;Then add an empty &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element and the necessary Foundation layout elements.  &lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8974934.js"&gt;&lt;/script&gt;

&lt;p&gt;Once you've got that set up, you can just add each example within the &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; tags, after the &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; element.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In the code samples below, you'll notice that all the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements have both a &lt;code&gt;name&lt;/code&gt; and an &lt;code&gt;id&lt;/code&gt;. Why is this? It's because you need the &lt;code&gt;id&lt;/code&gt; to be able to identify individual HTML elements (to style them with CSS, etc.). But for a real form, you need &lt;code&gt;name&lt;/code&gt; so that the data that gets sent to the server will be labeled correctly. These aren't proper forms, they're just prototypes. But it's good to do it properly from the start. So the rule of thumb is: for &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s, use both &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt;, and give them both the same value. (An exception is radio buttons&amp;mdash;I explain why they're different below.)&lt;/p&gt;
&lt;h4&gt;Text and its variants&lt;/h4&gt;
&lt;h5&gt;Text&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972563.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_text.png" alt="Input of type text"/&gt;&lt;/p&gt;
&lt;p&gt;An &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; of type &lt;code&gt;text&lt;/code&gt; is just a simple input field. There are no restrictions on what the user can type in it (though there are attributes that you can add to do things like limit the length of the field's contents&amp;mdash;see below).&lt;/p&gt;
&lt;h5&gt;Password&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972648.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_password.png" alt="Input of type password"/&gt;&lt;/p&gt;
&lt;p&gt;An &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; of type &lt;code&gt;password&lt;/code&gt; behaves exactly the same as a text input, except that whatever you type in it is obscured. &lt;/p&gt;
&lt;h5&gt;Email&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972730.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_email.png" alt="Input of type email"/&gt;&lt;/p&gt;
&lt;p&gt;An &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; of type &lt;code&gt;email&lt;/code&gt; is the same as a text input, except that on phones and tablets, the keyboard that is displayed has @ and dot keys as standard—you don't have to go digging for them:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ios_input_email.jpg" width="285" /&gt;&lt;/p&gt;
&lt;p&gt;It also gives you validation &lt;em&gt;for free&lt;/em&gt;. If you enter something other than a valid email address and then submit the form, the browser will do something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_type_email_invalid.png" alt="Input of type email, invalid"/&gt;&lt;/p&gt;
&lt;p&gt;(This is true for desktop browsers anyway. Most mobile browsers don't do this yet.)&lt;/p&gt;
&lt;h5&gt;URL&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972793.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_url.png" alt="Input of type url"/&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;url&lt;/code&gt; &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; type is similar to &lt;code&gt;email&lt;/code&gt;, except here you get a keyboard layout with slash and dot keys (and maybe others, such as &lt;code&gt;.com&lt;/code&gt;). &lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ios_input_url.jpg" width="285"/&gt;&lt;/p&gt;
&lt;p&gt;Again, desktop browsers validate these automatically:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_type_url_invalid.png" alt="Input of type url, invalid"/&gt;&lt;/p&gt;
&lt;h5&gt;Phone number&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972831.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_tel.png" alt="Input of type tel"/&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;tel&lt;/code&gt; &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; type, as we saw in the previous post, gives you a phone keypad on smartphones:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ios_input_tel.jpg" width="285"/&gt;&lt;/p&gt;
&lt;h5&gt;Number&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972925.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_number_ff.png" alt="Input of type number"/&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;number&lt;/code&gt; &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; type doesn't restrict what you can type, but on smartphones (the iPhone, at least), you get the regular keyboard, switched to numbers-and-symbols mode:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ios_input_number.jpg" width="285"/&gt;&lt;/p&gt;
&lt;p&gt;Different desktop browsers render this input differently. In IE and Firefox, it looks the same as a text input, but in Chrome and Safari, it gets spinner controls for increasing and decreasing the value:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_type_number_chrome.png" alt="Input of type number on Chrome/Safari"/&gt;&lt;/p&gt;
&lt;p&gt;You can set minimum and/or maximum values, and a step size. These affect the behavior of those spinner controls.&lt;/p&gt;
&lt;h5&gt;Autosuggest&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/9050311.js"&gt;&lt;/script&gt;

&lt;p&gt;Empty:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_plus_datalist_empty.png" alt="Input plus datalist, empty"/&gt;&lt;/p&gt;
&lt;p&gt;Typing:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_plus_datalist_not_empty.png" alt="Input plus datalist, typing"/&gt;&lt;/p&gt;
&lt;p&gt;You can use an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; with a &lt;code&gt;list&lt;/code&gt; attribute paired with a &lt;code&gt;&amp;lt;datalist&amp;gt;&lt;/code&gt; element to get something that is kind of a cross between a text input and a drop-down list. As you type in the input, a dropdown list shows you matching options. You can click on an option or use the arrow keys and Enter to select.&lt;/p&gt;
&lt;h5&gt;Other types&lt;/h5&gt;
&lt;p&gt;There are a number of other &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; types that were introduced with HTML5, but most of them are not widely supported yet. These include &lt;code&gt;color&lt;/code&gt; and various date and time inputs, such as &lt;code&gt;date&lt;/code&gt;, &lt;code&gt;time&lt;/code&gt;, &lt;code&gt;datetime&lt;/code&gt;, &lt;code&gt;datetime-local&lt;/code&gt;, &lt;code&gt;week&lt;/code&gt;, and &lt;code&gt;month&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For now, you're better off using things like the &lt;a href="http://jqueryui.com/datepicker/"&gt;jQuery Datepicker&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;The rest&lt;/h4&gt;
&lt;h5&gt;Checkboxes&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8972887.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_checkbox.png" alt="Input of type checkbox"/&gt;&lt;/p&gt;
&lt;p&gt;If you give an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;checkbox&lt;/code&gt;, you get a checkbox. These usually have their label to the right. For checkboxes, the &lt;code&gt;for&lt;/code&gt; attribute is particularly important&amp;mdash;it makes the label clickable&amp;mdash;clicking it is just like clicking the checkbox itself. Adding the &lt;code&gt;checked&lt;/code&gt; attribute (which doesn't take an argument) makes the checkbox checked when the page loads. For a prototype it doesn't really matter, but a checkbox in a real form must have a &lt;code&gt;value&lt;/code&gt; attribute.&lt;/p&gt;
&lt;h5&gt;Radio buttons&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8973074.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_radio.png" alt="Input of type radio"/&gt;&lt;/p&gt;
&lt;p&gt;Like checkboxes, with &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s of type &lt;code&gt;radio&lt;/code&gt;, the label usually comes after the input. And &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;checked&lt;/code&gt; work the same here too. Here though, be sure to give all the radio buttons in a group the same &lt;code&gt;name&lt;/code&gt; attribute&amp;mdash;this tells the browser that they belong together, and that only one can be selected at a time. Again, like with checkboxes, every radio button must have a &lt;code&gt;value&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;Sliders&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/8973102.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_range.png" alt="Input of type range"/&gt;&lt;/p&gt;
&lt;p&gt;An &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; of type &lt;code&gt;range&lt;/code&gt; gives you a slider. Like with &lt;code&gt;number&lt;/code&gt;, you can specify a minimum, maximum, and step values. But this control is not hugely useful on its own&amp;mdash;if precision is not an issue, you can probably get away with just adding text before and after the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; to show the maximum and minimum values. But in most cases, you'll probably want to provide some sort of feedback so the user knows what value they have selected. &lt;/p&gt;
&lt;p&gt;This is not difficult. It requires a tiny bit of Javascript, but you'll see in a minute that it's really &lt;em&gt;no big deal&lt;/em&gt;. We just need to take the existing bit of HTML and add an &lt;code&gt;&amp;lt;output&amp;gt;&lt;/code&gt; element to show the value. And we add an &lt;code&gt;oninput&lt;/code&gt; attribute to the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; to tell it what to do when its value changes.&lt;/p&gt;
&lt;p&gt;In this version, the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;output&amp;gt;&lt;/code&gt; elements are in separate columns, and I've given the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; a width of 100% so it will stretch to fill its column:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8973161.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_type_range_better.png" alt="Input of type range, improved"/&gt;&lt;/p&gt;
&lt;p&gt;The little bit of Javascript that is the value of &lt;code&gt;oninput&lt;/code&gt; just sets the value of the output (&lt;code&gt;range_value.value&lt;/code&gt;) to the value of the input (&lt;code&gt;range_input.value&lt;/code&gt;). (&lt;code&gt;range_value&lt;/code&gt; is the &lt;code&gt;&amp;lt;output&amp;gt;&lt;/code&gt;'s ID, and &lt;code&gt;range_input&lt;/code&gt; is the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;'s ID. Adding the dot and &lt;code&gt;value&lt;/code&gt; just means “the value of the &lt;code&gt;value&lt;/code&gt; attribute of the element with this ID.”)&lt;/p&gt;
&lt;h5&gt;Drop-down lists&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/9048149.js"&gt;&lt;/script&gt;

&lt;p&gt;Closed:
&lt;img src="static/images/input_type_select_closed.png" alt="Input of type select, closed"/&gt;&lt;/p&gt;
&lt;p&gt;Open:
&lt;img src="static/images/input_type_select_open.png" alt="Input of type select, open"/&gt;&lt;/p&gt;
&lt;p&gt;Drop-down lists are not &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements&amp;mdash;they are made up of a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element containing a number of &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements. &lt;/p&gt;
&lt;p&gt;This is fairly straightforward. One thing I've added here though is the first &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;&amp;mdash;it prompts the user what to do, but is not actually an option they can select. (The &lt;code&gt;selected&lt;/code&gt; attribute means it is what is displayed in the closed dropdown before the user interacts with it.)&lt;/p&gt;
&lt;p&gt;Without this option, "Option 1" would be selected by default. Usually we don't want anything to be selected by default.&lt;/p&gt;
&lt;h5&gt;Textareas&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/9048377.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/textarea.png" alt="Textarea"/&gt;&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; is like a text &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, except it lets you enter multiple lines of text. Like all the text-like &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s, its width is 100% of the column that it's in.&lt;/p&gt;
&lt;p&gt;As for height, there are two ways to set this. One way is to set the height in CSS (or directly on the element by adding a &lt;code&gt;style&lt;/code&gt; attribute). The other way is to use the &lt;code&gt;rows&lt;/code&gt; attribute, like I'm doing here. This makes the &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; tall enough to fit six lines of text. &lt;/p&gt;
&lt;p&gt;(The &lt;code&gt;style="height: auto;"&lt;/code&gt; attribute is to get around a bug in Foundation. If you set the height to a specific value instead of using &lt;code&gt;rows&lt;/code&gt;, you won't need this.)&lt;/p&gt;
&lt;h5&gt;Buttons&lt;/h5&gt;
&lt;script src="https://gist.github.com/martinpolley/9048640.js"&gt;&lt;/script&gt;

&lt;p&gt;&lt;img src="static/images/input_button.png" alt="Buttons"/&gt;&lt;/p&gt;
&lt;p&gt;Most forms have buttons that you have to click to send the information you've entered to the server. Some also have a button for a secondary action, to cancel out or to reset the form (though &lt;a href="http://www.lukew.com/ff/entry.asp?571="&gt;some argue&lt;/a&gt; that such secondary actions are usually a bad idea).&lt;/p&gt;
&lt;p&gt;Here, the buttons are &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s of type &lt;code&gt;submit&lt;/code&gt; and &lt;code&gt;button&lt;/code&gt;. (&lt;code&gt;submit&lt;/code&gt; is a special kind of button for submitting a form.) The right place to put these is after the closing &lt;code&gt;&amp;lt;/fieldset&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;p&gt;The Submit button gets a &lt;code&gt;class&lt;/code&gt; of &lt;code&gt;button&lt;/code&gt; to make it into a nice-looking Foundation button, while the Cancel button also gets a &lt;code&gt;class&lt;/code&gt; of &lt;code&gt;secondary&lt;/code&gt; to make it visually less prominent. &lt;/p&gt;
&lt;p&gt;Foundation also lets you use the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element for making buttons&amp;mdash;just give it a &lt;code&gt;class&lt;/code&gt; of &lt;code&gt;button&lt;/code&gt;. It also lets you do stuff like make buttons smaller, give them rounded corners, and so on, just by adding classes.&lt;/p&gt;
&lt;h4&gt;Other clever Foundation stuff&lt;/h4&gt;
&lt;p&gt;Foundation lets you do some clever things that the standard HTML elements don't let you do. &lt;/p&gt;
&lt;p&gt;For example, you can combine an input with a label to get something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_url_with_prefix.png" alt="URL input with prefix"/&gt;&lt;/p&gt;
&lt;p&gt;You can see the code for that &lt;a href="https://gist.github.com/martinpolley/9050576"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also combine an input with a button to get this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_with_postfix_button.png" alt="Text input with postfix button"/&gt;&lt;/p&gt;
&lt;p&gt;The code for that one is &lt;a href="https://gist.github.com/martinpolley/9050696"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Important attributes&lt;/h4&gt;
&lt;p&gt;I mentioned a few attributes along the way, like &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;checked&lt;/code&gt; for checkboxes and radio buttons, &lt;code&gt;min&lt;/code&gt;, &lt;code&gt;max,&lt;/code&gt; and &lt;code&gt;step&lt;/code&gt; for &lt;code&gt;number&lt;/code&gt; and &lt;code&gt;range&lt;/code&gt; type inputs, and so on. But there are some others that you need to know about:&lt;/p&gt;
&lt;h5&gt;autocomplete&lt;/h5&gt;
&lt;p&gt;Browsers try to help us by automatically filling in form fields for us when they can. But sometimes this is not appropriate, for example, for sensitive information such as bank account and credit card numbers (and even passwords in certain cases, though beware of being annoying with this one). &lt;/p&gt;
&lt;p&gt;Setting &lt;code&gt;autocomplete&lt;/code&gt; to &lt;code&gt;off&lt;/code&gt; for an input tells the browser not to fill it in automatically. &lt;/p&gt;
&lt;h5&gt;autofocus&lt;/h5&gt;
&lt;p&gt;On each page, you can give one (and only one) form control the &lt;code&gt;autofocus&lt;/code&gt; attribute. This field will get focus when the page loads, so the user can start interacting with it without having to click in it or tab to it.&lt;/p&gt;
&lt;h5&gt;disabled&lt;/h5&gt;
&lt;p&gt;&lt;img src="static/images/input_disabled.png" alt="A disabled input"/&gt;&lt;/p&gt;
&lt;p&gt;A control with the &lt;code&gt;disabled&lt;/code&gt; attribute gets greyed out and you can't interact with it. This may be because it's not relevant unless some other control has a particular value. (For example, if your form has a "How did you hear about us" section with radio buttons, the last one might be "Other", with a text input so the user can type something that's not in your list. It makes sense to make this input disabled unless "Other" is selected. I'll cover this sort of thing in more depth in a subsequent post.)&lt;/p&gt;
&lt;h5&gt;maxlength&lt;/h5&gt;
&lt;p&gt;Text-type inputs (text, email, url, tel, etc.) can have a &lt;code&gt;maxlength&lt;/code&gt; attribute. This lets you specify the maximum length in characters. Most browsers won't let you type any more once you hit the limit. This is handy for things like phone numbers, which can't be longer than a certain number of digits.&lt;/p&gt;
&lt;h5&gt;multiple&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element and &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s of type &lt;code&gt;email&lt;/code&gt; (also of type &lt;code&gt;file&lt;/code&gt;, for uploading files, which I haven't covered here) can take the &lt;code&gt;multiple&lt;/code&gt; attribute. This lets you select multiple items in a dropdown or specify multiple email addresses, respectively.&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/select_multiple.png" alt="A drop-down list with multiple selection"/&gt;&lt;/p&gt;
&lt;p&gt;Notice how the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; is displayed differently when multiple selection is enabled.&lt;/p&gt;
&lt;h5&gt;pattern&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;pattern&lt;/code&gt; tells the browser what an acceptable value looks like. I'll cover this in a subsequent post when I talk about validation.&lt;/p&gt;
&lt;h5&gt;placeholder&lt;/h5&gt;
&lt;p&gt;&lt;img src="static/images/input_placeholder.png" alt="The placeholder attribute"/&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;placeholder&lt;/code&gt; attribute puts hint text inside the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; (or &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;), to give the user an idea of what they need to type. It disappears when you click in the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;. Some sites use it to indicate which fields are mandatory and which are optional.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; Do NOT use this instead of a &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;. It is very bad from both accessibility and usability points of view.&lt;/p&gt;
&lt;h5&gt;required&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;required&lt;/code&gt; attribute means that a field is mandatory. It doesn't change its appearance (an asterisk doesn't magically appear next to its label), but if you submit the form without filling it in, you'll get a helpful message:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/input_required.png" alt="The required attribute"/&gt;&lt;/p&gt;
&lt;h5&gt;tabindex&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;tabindex&lt;/code&gt; attribute (which has a numerical value) determines the order in which controls get focus when the user presses the Tab key. &lt;/p&gt;
&lt;p&gt;If you're doing something weird with your form layout such that the inputs are in a different order on the screen than in the page source, you should use the &lt;code&gt;tabindex&lt;/code&gt; attribute to make sure that focus jumps to the right input when the user tabs between them. &lt;/p&gt;
&lt;h4&gt;Special considerations&lt;/h4&gt;
&lt;p&gt;On phones and tablets, there are additional challenges that we face. How often have you come to sign in or register at a site on your phone and seen something like this?&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/autocorrect_autocapitalize.jpg" width="319" alt="Inappropriate use of autocorrect and autocapitalize"/&gt;&lt;/p&gt;
&lt;p&gt;On m.hpdirect.com, as I'm typing in the User ID field in the login form, my phone is automatically capitalizing the first letter and wants to correct what I'm typing to words it has in its dictionary. So now I have to tap the little "x" to dismiss autocorrect, &lt;em&gt;and&lt;/em&gt; go back and change the capital "M" to a lowercase one. Grrr.&lt;/p&gt;
&lt;p&gt;For fields like this, there are two attributes that we can add to turn off this antisocial behavior: &lt;code&gt;autocorrect&lt;/code&gt; and &lt;code&gt;autocapitalize&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;They both take the same values: &lt;code&gt;on&lt;/code&gt; and &lt;code&gt;off&lt;/code&gt;. By default, they are &lt;code&gt;on&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Hopefully you now have a pretty good idea of the building blocks that you can use to create your prototype forms. &lt;/p&gt;
&lt;p&gt;In the next post, I'll show you how to group inputs into logical (and less overwhelming-looking) groups and how to provide help to users while they are filling in the form. &lt;/p&gt;
&lt;p&gt;This was originally published on &lt;a href="http://boxesandarrows.com/forms-the-complete-guide/"&gt;Boxes &amp;amp; Arrows&lt;/a&gt; on 25 March 2014.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you liked this post, you should really check out my upcoming book, &lt;a href="http://prototypingforms.com"&gt;Prototyping Forms&lt;/a&gt;. Just like this, only &lt;em&gt;more&lt;/em&gt; and &lt;em&gt;better&lt;/em&gt;!&lt;/p&gt;
&lt;!-- This is really just the tip of the iceberg when it comes to what you can do with HTML prototyping. [Livetyping](http://livetyping.capcloud.com/), my HTML prototyping course for UXers, will teach you how to do tons more things like this, including more form stuff, drag and drop, animation, and more. You should [check it out](http://livetyping.capcloud.com/).

And if you like stuff like this, you should sign up for my newsletter:

&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt; --&gt;</summary></entry><entry><title>iOS-style Buttons</title><link href="http://livetyping.capcloud.com/blog/ios-style-buttons.html" rel="alternate"></link><published>2014-02-17T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-02-17:blog/ios-style-buttons.html</id><summary type="html">&lt;p&gt;So I got a bee in my bonnet about the buttons on iOS 7 that change color when you tap them. You know, like the ones on the screen unlock keypad and the phone dialer.&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/ios_unlock_keypad.png" width="317" alt="iOS unlock keypad"/&gt;&lt;/p&gt;
&lt;p&gt;I love the way that they are animated: the color change happens almost instantaneously when you tap, but the fade out happens more slowly.&lt;/p&gt;
&lt;p&gt;I figured this should be doable in HTML/CSS too (with a bit of jQuery to help). So here is the result (in &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt;, of course). (It's in a frame&amp;mdash;you can scroll it.)&lt;/p&gt;
&lt;div class="flex-video"&gt;
    &lt;iframe class="large-12 columns" src="http://livetyping.capcloud.com/stuff/button_animation/index.html"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;(Or view the example &lt;a href="http://livetyping.capcloud.com/stuff/button_animation/index.html"&gt;not in an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;I think it works pretty well.&lt;/p&gt;
&lt;p&gt;The standard button is light colored, for use on dark backgrounds. There is a &lt;code&gt;dark&lt;/code&gt; class that makes the button darker, which is good for lighter backgrounds.&lt;/p&gt;
&lt;p&gt;And just like Foundation's built-in buttons (shown above for comparison purposes), adding the &lt;code&gt;disabled&lt;/code&gt; class makes the button appear disabled.&lt;/p&gt;
&lt;p&gt;I haven't gone the whole hog and made matching classes for all the different Foundation buttons (different sizes, rounded corners, different colors, etc.) &lt;/p&gt;
&lt;p&gt;If you want to use it yourself or just try to figure out how it works, you can take a look at the source or &lt;a href="https://gist.github.com/martinpolley/9046005"&gt;view it on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'd love to hear your thoughts and any questions you might have. Ping me on Twitter: &lt;a href="https://twitter.com/martinpolley"&gt;@martinpolley&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And if you're interested in how to steal/copy other people's ideas, I'll be explaining how in an upcoming post. (If the idea makes you feel a bit uneasy, think about it like this: &lt;em&gt;copying is how good ideas spread&lt;/em&gt;.)&lt;/p&gt;
&lt;p&gt;Make sure you don't miss it&amp;mdash;sign up for my newsletter over there on the right.&lt;/p&gt;</summary></entry><entry><title>Forms—The Compleat Guide—Part 1: Layout and Alignment</title><link href="http://livetyping.capcloud.com/blog/forms-the-compleat-guide-part-1-layout-and-alignment.html" rel="alternate"></link><published>2014-01-13T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2014-01-13:blog/forms-the-compleat-guide-part-1-layout-and-alignment.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;UPDATED 21 Jan 2014:&lt;/strong&gt; After some nice folks pointed out that my examples were a bit lacking in the accessibility department, I added &lt;code&gt;for&lt;/code&gt; attributes to associate labels with inputs, &lt;code&gt;fieldset&lt;/code&gt; and &lt;code&gt;legend&lt;/code&gt; instead of a regular title, and added an explanation of why labels inside inputs are really &lt;em&gt;not&lt;/em&gt; a good idea.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATED 30 Jan 2014:&lt;/strong&gt; I added &lt;a href="#jiggery"&gt;a section&lt;/a&gt; to explain how to take advantage of responsive design to rearrange the form depending on the screen size (right-aligned labels on big screens, top-aligned labels on small ones).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATED 12 August 2014:&lt;/strong&gt; The three subsequent posts in this series were published on Boxes and Arrows: &lt;a href="http://boxesandarrows.com/forms-the-complete-guide/"&gt;part 2&lt;/a&gt;, &lt;a href="http://boxesandarrows.com/forms-part-3/"&gt;part 3&lt;/a&gt;, &lt;a href="http://boxesandarrows.com/forms-the-complete-guide-part-4/"&gt;part 4&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Forms can be tricky. They are one of the most important parts of any site, but they are easy to get wrong. There are so many things to think about: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What information do we actually need from the user?&lt;/li&gt;
&lt;li&gt;Which are the right input types to use?&lt;/li&gt;
&lt;li&gt;Is that true for mobile too?&lt;/li&gt;
&lt;li&gt;What should the different inputs be called?&lt;/li&gt;
&lt;li&gt;How should they be grouped?&lt;/li&gt;
&lt;li&gt;What should the titles of the groups be?&lt;/li&gt;
&lt;li&gt;Do we need help text?&lt;/li&gt;
&lt;li&gt;Where does it go?&lt;/li&gt;
&lt;li&gt;When should we show it?&lt;/li&gt;
&lt;li&gt;Do all of the inputs need to be visible all the time?&lt;/li&gt;
&lt;li&gt;How and when should we validate?&lt;/li&gt;
&lt;li&gt;How should we highlight errors?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And so on and so on.&lt;/p&gt;
&lt;p&gt;This series of posts doesn't answer all these questions for you. There are lots of great resources out there that already do that. (Like &lt;a href="http://rosenfeldmedia.com/books/web-form-design/"&gt;Luke's book&lt;/a&gt;. Or &lt;a href="http://uxdesign.smashingmagazine.com/2011/11/08/extensive-guide-web-form-usability/"&gt;Justin's article&lt;/a&gt;.) &lt;/p&gt;
&lt;p&gt;No. What this series does is give you the &lt;em&gt;how&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;How to do &lt;em&gt;what&lt;/em&gt; though? &lt;strong&gt;How to prototype a form in HTML, so that you can put something together that looks, works, and feels like the real thing.&lt;/strong&gt; Which you can then use for usability testing, for getting stakeholder buy-in, and as a living specification for developers.&lt;/p&gt;
&lt;p&gt;You know how you want to lay out your form. This shows you how.&lt;/p&gt;
&lt;p&gt;You've decided that right-aligned labels are right for this form. This series explains how to do that.&lt;/p&gt;
&lt;p&gt;You know that when the user enters something invalid, you want a message at the top of the form and to highlight the problem input. There's a post that's got you covered.&lt;/p&gt;
&lt;h3&gt;Layout&lt;/h3&gt;
&lt;p&gt;If you've read any of my &lt;a href="http://livetyping.capcloud.com/blog/archives.html"&gt;previous posts&lt;/a&gt;, you'll know I'm a fan of &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt;, Zurb's front-end framework. Its responsive grid makes laying out pages a cinch. And the same is true for forms.&lt;/p&gt;
&lt;p&gt;I'm not going to explain how to download Foundation and set up a project. You can refer back to &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;this post&lt;/a&gt; for that. I'm going to assume you've got a project set up and are sitting in front of a text editor with &lt;code&gt;index.html&lt;/code&gt; (from Foundation) open, the default content deleted, and ready to start adding your own stuff. (I'm using Foundation 5.0.2, the latest version at the time of writing.)&lt;/p&gt;
&lt;p&gt;So let's say you're designing a form where the user enters their shipping address. You want it to look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_layout.jpg" width="300" alt="Layout sketch"&gt;&lt;/p&gt;
&lt;p&gt;No worries! All we need to do is add a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that has the Foundation &lt;code&gt;row&lt;/code&gt; class for each row of the form, and for the row that has two inputs, we just add a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with the right number of Foundation columns for each input. Add this to &lt;code&gt;index.html&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8298791.js"&gt;&lt;/script&gt;

&lt;p&gt;Which comes out looking like this (this is embedded, and you can scroll it):&lt;/p&gt;
&lt;div class="flex-video"&gt;
    &lt;iframe class="large-12 columns" src="http://livetyping.capcloud.com/stuff/forms_1_layout/index.html"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_1_layout/index.html" target="_blank"&gt;Open in a new tab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK, what did I do here?&lt;/p&gt;
&lt;p&gt;This is a form, so we've got a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element wrapping everything else. Inside this, there's a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; of class &lt;code&gt;row&lt;/code&gt;. In Foundation, you have rows that contain columns. &lt;/p&gt;
&lt;p&gt;Then there's another nested &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with a class of &lt;code&gt;large-8 small-centered columns&lt;/code&gt;. All this does is squish the form down a bit horizontally. It's not necessary at all, but without it the form is really wide.&lt;/p&gt;
&lt;p&gt;Next we've got a &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;, which groups the form items together, and a &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; that gives the group of elements a title.&lt;/p&gt;
&lt;p&gt;After that we've got the actual meat of the form: &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements and their &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;s. Each such pair is just a &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element immediately followed by an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;. This stacks them one above the other. (A bit later, we'll see how to do left- and right-aligned labels.)&lt;/p&gt;
&lt;p&gt;Notice that each &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; has an &lt;code&gt;id&lt;/code&gt;, and that its &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; has a &lt;code&gt;for&lt;/code&gt; attribute with the same value. This is important for accessibility—it tells screen readers what belongs to what so it can read things out correctly.&lt;/p&gt;
&lt;p&gt;Most of these pairs are wrapped in &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s with a class of &lt;code&gt;small-12 columns&lt;/code&gt;. This tells Foundation to make them twelve columns wide. (The Foundation grid is based on twelve columns, so this means it takes up the full available width. And because Foundation is mobile-first, we use &lt;code&gt;small-12&lt;/code&gt;, which applies to both small and large screens, then if we want to do something different on large screens, we add a &lt;code&gt;large-&lt;/code&gt; class as well. Here we don't, so &lt;code&gt;small-&lt;/code&gt; is all we need.)&lt;/p&gt;
&lt;p&gt;The only row that isn't like this is the one containing our State/province and Postcode/zip &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s. Here, we've got two &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s, one eight columns wide (&lt;code&gt;small-8 columns&lt;/code&gt;), and one four wide (&lt;code&gt;small-4 columns&lt;/code&gt;). You can divide the space up whichever way you like, but the number of columns mustn't be more than twelve. It can be less, but then you'd have a gap on the right. (Try it and see.)&lt;/p&gt;
&lt;p&gt;All the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s have a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;text&lt;/code&gt;, because they are for entering text. Except for the phone number &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, which has a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;tel&lt;/code&gt;. In desktop browsers, this works exactly the same as a text input, but on mobile devices, you'll get a phone keypad instead of the normal keyboard:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/tel_input_on_iphone.png" width="285" alt="Input of type tel on an iPhone"&gt;&lt;/p&gt;
&lt;p&gt;If you open this up in a browser, you'll see the layout is just how we want it. And if you make the browser window narrower, the layout is maintained. &lt;/p&gt;
&lt;p&gt;If you want the layout to change on small screens so that all the fields are full-width, change the classes for those two columns from &lt;code&gt;small-8&lt;/code&gt; and &lt;code&gt;small-4&lt;/code&gt; to &lt;code&gt;large-8&lt;/code&gt; and &lt;code&gt;large-4&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8334320.js"&gt;&lt;/script&gt;

&lt;p&gt;That tells Foundation only to make them side-by-side columns on large screens. On small screens, they'll be stacked one above the other. Check it out &lt;a href="http://livetyping.capcloud.com/stuff/forms_1_layout_sm/index.html" target="_blank"&gt;here&lt;/a&gt;. (Opens in a new tab.)&lt;/p&gt;
&lt;h4&gt;Label Alignment&lt;/h4&gt;
&lt;p&gt;Let's reuse the layout example to play around with the alignment of the labels. There are several different options for label placement. &lt;/p&gt;
&lt;p&gt;Top-aligned:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_label_top.jpg" width="220" alt="Top-aligned label"&gt;&lt;/p&gt;
&lt;p&gt;Left-aligned:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_label_left.jpg" width="350" alt="Left-aligned label"&gt;&lt;/p&gt;
&lt;p&gt;Right-aligned:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_label_right.jpg" width="350" lt="Right-aligned label"&gt;&lt;/p&gt;
&lt;p&gt;Labels inside inputs (which lots of folks agree are a &lt;em&gt;bad idea&lt;/em&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/form_label_inside.jpg" width="250" alt="Label inside input"&gt;&lt;/p&gt;
&lt;p&gt;The form already uses top-aligned labels. So how do we do the others? &lt;/p&gt;
&lt;p&gt;Simple, we just use Foundation columns again. Let's start off with left-aligned labels. &lt;/p&gt;
&lt;h5&gt;Left-aligned labels&lt;/h5&gt;
&lt;p&gt;We just need to change our markup to look like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8383069.js"&gt;&lt;/script&gt;

&lt;p&gt;All I've done here is put two columns in each row instead of one as it was before. I've given the labels two columns width and the inputs ten columns. And where we had two columns before for State/province and Postcode/zip, now we have four: two for the labels and two for the inputs.&lt;/p&gt;
&lt;p&gt;Note that I've added the &lt;code&gt;align&lt;/code&gt; class to the labels. This is a Foundation class that makes the labels line up vertically with the inputs. (Try removing it and see what happens. It's not pretty.)&lt;/p&gt;
&lt;p&gt;Here's what it looks like now:&lt;/p&gt;
&lt;div class="flex-video"&gt;
    &lt;iframe class="large-12 columns" src="http://livetyping.capcloud.com/stuff/forms_2_left_align/index.html"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_2_left_align/index.html" target="_blank"&gt;Open in a new tab&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;Right-aligned labels&lt;/h5&gt;
&lt;p&gt;To make the labels right-aligned, all we need to do is add the &lt;code&gt;right&lt;/code&gt; class to each label:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8396136.js"&gt;&lt;/script&gt;

&lt;p&gt;Which looks like this:&lt;/p&gt;
&lt;div class="flex-video"&gt;
    &lt;iframe class="large-12 columns" src="http://livetyping.capcloud.com/stuff/forms_3_right_align/index.html"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_3_right_align/index.html" target="_blank"&gt;Open in a new tab&lt;/a&gt;&lt;/p&gt;

&lt;h5 id="jiggery"&gt;Responsive jiggery-pokery&lt;/h5&gt;

&lt;p&gt;It’s all very well having a form that looks just the way you want on a big screen, but using the exact same layout on a small screen doesn’t always work. (Try opening the last example on your phone&amp;mdash;it looks &lt;em&gt;rubbish&lt;/em&gt;.)&lt;/p&gt;
&lt;p&gt;We can use Foundation’s responsive grid to make it work better on small screens. In that last example, we used the &lt;code&gt;small-&lt;/code&gt; classes to set the width of the labels and inputs. That means that this is the way we want them to look on small screens and anything bigger than that.&lt;/p&gt;
&lt;p&gt;If we change &lt;code&gt;small-&lt;/code&gt; to &lt;code&gt;large-&lt;/code&gt;, what will happen is that we will get this layout (labels and inputs on the same line) only on large screens (i.e., above 1024 pixels wide). On smaller screens, the labels will be above the inputs, just like in the first example. Try it yourself and see what happens when you shrink the width of the browser window.&lt;/p&gt;
&lt;p&gt;The width at which it jumps from an all-on-one-line layout to a stacked layout is a bit too wide though&amp;mdash;the side-by-side layout works just fine on tablet-sized screens as well as desktop-sized ones.&lt;/p&gt;
&lt;p&gt;So what we need to do is use &lt;code&gt;medium-&lt;/code&gt; instead of &lt;code&gt;large-&lt;/code&gt;. This means that for medium (tablets) and large (desktop) screens, we get the right-aligned labels (or left-aligned, if that’s what you want), and on small (phone) screens, the labels are top-aligned.&lt;/p&gt;
&lt;p&gt;But if our labels started out right-aligned, they stay right-aligned even on small screens. And that’s just wrong:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/right_aligned_wrong.png" width="250" alt="Right aligned - just not right!"&gt;&lt;/p&gt;
&lt;p&gt;Foundation doesn’t give us a way to handle this, but if we dig a little under its responsive skin, we can make things work the way we want.&lt;/p&gt;
&lt;p&gt;Responsive designs use CSS media queries to rearrange their layouts depending on the screen width. All we need to do is add one media query to our CSS to make it all better. &lt;/p&gt;
&lt;p&gt;Create a file called &lt;code&gt;form.css&lt;/code&gt; and save it in your project’s &lt;code&gt;css&lt;/code&gt; folder. Add this to the new file:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8691328.js"&gt;&lt;/script&gt;

&lt;p&gt;And somewhere inside between the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags in &lt;code&gt;index.html&lt;/code&gt;, add this line:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8691357.js"&gt;&lt;/script&gt;

&lt;p&gt;This CSS rule looks a bit intimidating, but all it says is this: if the width of the browser viewport (i.e., the width of the content area of the browser window) is 640 pixels or less, apply this rule.&lt;/p&gt;
&lt;p&gt;And the rule that gets applied in this case says to align the label text left and to float it left as well. (Originally &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; was floated right and its text was right-aligned.)&lt;/p&gt;
&lt;p&gt;Why 640 pixels? Because that is the width (the “breakpoint”) at which Foundation changes the page layout for elements that have a &lt;code&gt;medium-&lt;/code&gt; class. (There's another one at 1024 pixels for &lt;code&gt;large-&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;This is how it looks:&lt;/p&gt;
&lt;p&gt;Large/medium:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/responsive_med_large.png" width="350" alt="Responsive form - medium/large"&gt;&lt;/p&gt;
&lt;p&gt;Small:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/responsive_small.png" width="330" alt="Responsive form - small"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_3.1_right_align_responsive/index.html" target="_blank"&gt;Open it up in a new tab&lt;/a&gt; and see how it behaves when you change the width of your browser window.&lt;/p&gt;
&lt;h5&gt;Labels inside inputs&lt;/h5&gt;
&lt;p&gt;To put the labels inside the inputs, let's just take our first alignment example and remove the labels. Then for each input, we'll add a &lt;code&gt;placeholder&lt;/code&gt; attribute that contain the label text:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/8396390.js"&gt;&lt;/script&gt;

&lt;p&gt;Here's how that looks:&lt;/p&gt;
&lt;div class="flex-video"&gt;
    &lt;iframe class="large-12 columns" src="http://livetyping.capcloud.com/stuff/forms_4_labels_inside/index.html"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/forms_4_labels_inside/index.html" target="_blank"&gt;Open in a new tab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's nice and clean, but once you start typing in an input, the label disappears, which can be problematic. And the lack of labels is a real problem from an accessibility perspective—screen readers typically don’t read placeholders like they do labels.&lt;/p&gt;
&lt;p&gt;What lots of sites do is have regular labels and use the &lt;code&gt;placeholder&lt;/code&gt; attribute to show you the kind of thing you're meant to enter in each input. &lt;a href="http://letsfreckle.com"&gt;Freckle&lt;/a&gt;, the time-tracking app, does this to good effect:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/freckle_signup_form.png" alt="Freckle signup form"&gt;&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;That will do for now, I think. In the next post, I'll be showing you how to group inputs. I'll also show you all the different types of inputs that you can use. &lt;/p&gt;
&lt;p&gt;Make sure you get it by subscribing to the feed. Or better still, by signing up for my newsletter below.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;If you liked this post, you should really check out my upcoming book, &lt;a href="http://prototypingforms.com"&gt;Prototyping Forms&lt;/a&gt;. Just like this, only &lt;em&gt;more&lt;/em&gt; and &lt;em&gt;better&lt;/em&gt;!&lt;/p&gt;
&lt;!-- This is really just the tip of the iceberg when it comes to what you can do with HTML prototyping. [Livetyping](http://livetyping.capcloud.com/), my HTML prototyping course for UXers, will teach you how to do tons more things like this, including more form stuff, drag and drop, animation, and more. You should [check it out](http://livetyping.capcloud.com/).

And if you like stuff like this, you should sign up for my newsletter:

&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
--&gt;</summary></entry><entry><title>The Four Minute Prototype: Adding Interactivity</title><link href="http://livetyping.capcloud.com/blog/the-four-minute-prototype-adding-interactivity.html" rel="alternate"></link><published>2013-11-04T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2013-11-04:blog/the-four-minute-prototype-adding-interactivity.html</id><summary type="html">&lt;p&gt;In my &lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html"&gt;last post&lt;/a&gt;, I showed you how to prototype a fairly simple web page (with responsiveness baked in!). This time, I'm going to show you how to add some interactive stuff to the page.&lt;/p&gt;
&lt;p&gt;What we're going to do is to take our existing, static page and add a contact request form. What's interactive about a &lt;em&gt;form&lt;/em&gt; though? Well, this one will use the selection-dependent inputs pattern&amp;mdash;it will have a drop-down list where you can choose how you want to be contacted, and the form changes depending on what you select.&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min2_1.png" width="639" alt="Where the form will live"&gt;&lt;/p&gt;
&lt;p&gt;The first thing we need to do is to add a new &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with the right Foundation classes to hold the form. We want to put it in that right column, right above the ads. Currently, that piece of HTML looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7287985.js"&gt;&lt;/script&gt;

&lt;p&gt;The way we've set it up is so that the ads get hidden when we're on a small (smartphone-sized) screen. But we don't want our form to get hidden. What we need to do is nest another Foundation row/column structure in here so that we have two rows (each of which takes up all 12 of the available columns).&lt;/p&gt;
&lt;p&gt;And we move the &lt;code&gt;hide-for-small&lt;/code&gt; class from the container (&lt;code&gt;large-3 columns&lt;/code&gt;) &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; to the row that contains the ads:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7288026.js"&gt;&lt;/script&gt;

&lt;p&gt;If you open this up in your browser you'll see the placeholder text above the ads:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min2_2.png" width="639" alt="Placeholder text, desktop size"&gt;&lt;/p&gt;
&lt;p&gt;And if you resize the window down to smartphone width, you'll see that the ads disappear but the placeholder text doesn't:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min2_3.png" width="166" alt="Placeholder text, phone size"&gt;&lt;/p&gt;
&lt;p&gt;So far, so good. &lt;/p&gt;
&lt;p&gt;Now we can get on with the &lt;em&gt;actual work&lt;/em&gt;&amp;mdash;adding the form. First, let's replace that placeholder paragraph (the one in the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags) with some introductory text. And right after that, we'll throw in a drop-down (a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element containing &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements) that lets the user choose how they want to be contacted. &lt;/p&gt;
&lt;p&gt;Notice that I've wrapped the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; in a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; with a class of &lt;code&gt;custom&lt;/code&gt;. This tells Foundation to use its own styling for the select instead of the standard look. This means it matches the other form elements we're going to be adding.&lt;/p&gt;
&lt;p&gt;And there's also a horizontal rule (&lt;code&gt;&amp;lt;hr/&amp;gt;&lt;/code&gt;) to separate the form from the ads:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7288592.js"&gt;&lt;/script&gt;

&lt;p&gt;We also need a bit of CSS:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7288619.js"&gt;&lt;/script&gt;

&lt;p&gt;The first rule here styles the "Contact me via&amp;hellip;" label that is the first item in the drop-down. (If you look in the HTML, you'll see that the first &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; has a class, which is what we use in this rule.) This fake option means that nothing is selected by default. Which is A Good Thing.&lt;/p&gt;
&lt;p&gt;The second rule just adds a bit of top padding to the intro text.&lt;/p&gt;
&lt;p&gt;If you open it in a browser now, you'll see we have a drop-down list with the right options:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min2_4.png" alt="Non-functional drop-down"&gt;&lt;/p&gt;
&lt;p&gt;But it doesn't &lt;em&gt;do&lt;/em&gt; anything yet. The next thing we need to do is add the forms. We actually need three forms, but we'll make it so that only one is visible at any one time. So right after the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, add the first form, like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7290904.js"&gt;&lt;/script&gt;

&lt;p&gt;This is just a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element containing a bunch of &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;s and &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s. A few things to note though:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; has a class of &lt;code&gt;hbd&lt;/code&gt;. We'll be adding a CSS rule in a minute to hide this by default. (And soon, we'll add a little bit of Javascript to show the right form depending on what you select in the drop-down.)&lt;/li&gt;
&lt;li&gt;The first two &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s have a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;email&lt;/code&gt;. On the desktop, this is exactly the same as an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; with a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;text&lt;/code&gt;. But on iOS (and Android too, I believe), when you tap on the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, you get an email-specific keyboard layout, with &lt;code&gt;@&lt;/code&gt; and period keys, but no space bar.&lt;/li&gt;
&lt;li&gt;The last two &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s are the Submit and Cancel buttons. The first one has a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;submit&lt;/code&gt;. This is a special kind of button that tells the browser to send the contents of the form to the server. Here, it's just a prototype&amp;mdash;we're not sending anything anywhere. But it's better to do it the "right" way.&lt;/li&gt;
&lt;li&gt;The buttons have classes to give them the right size (&lt;code&gt;small&lt;/code&gt;) and to indicate which one is the primary action and which one is secondary (&lt;code&gt;secondary&lt;/code&gt; for Cancel). And I've used Foundation's column classes to make them (together) the same width as the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;s. And I've made the primary action button a bit wider than the secondary one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min2_5.png" alt="Email form"&gt;&lt;/p&gt;
&lt;p&gt;Now let's add the other two forms. Add this right after the form we just added:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300044.js"&gt;&lt;/script&gt;

&lt;p&gt;These are pretty similar to the first form, except for a couple of things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;These both have a class of &lt;code&gt;custom&lt;/code&gt;. Without this, the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; wouldn't get the nice Foundation styling.&lt;/li&gt;
&lt;li&gt;In both forms, the phone number &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; gets a &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;tel&lt;/code&gt;. Like the email &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; we saw before, this changes the keyboard layout on mobile, this time to a numeric keypad.&lt;/li&gt;
&lt;li&gt;I've used the names of the mobile providers where I live for the SMS form. If you like, you can use your local providers instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But now if you look at the page, all three forms are visible. Let's add some CSS to hide them all:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300118.js"&gt;&lt;/script&gt;

&lt;p&gt;This rule applies to elements with that &lt;code&gt;hbd&lt;/code&gt; class, which we added to all three forms. Now if you check the page, you shouldn't see any forms.&lt;/p&gt;
&lt;p&gt;The only thing left to do now is add a little tiny bit of Javascript to show the right form when you select something in the drop-down. First we need to create a file to contain our Javascript and link to from &lt;code&gt;index.html&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Just like we did with the CSS file back when we were first creating the page, create a new file called &lt;code&gt;4min.js&lt;/code&gt; and save it in the &lt;code&gt;js&lt;/code&gt; directory. Now add a second &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; element right after the existing one that pulls in the Foundation Javascript file, down towards the bottom of &lt;code&gt;index.html&lt;/code&gt; so that it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300230.js"&gt;&lt;/script&gt;

&lt;p&gt;Now in &lt;code&gt;4min.js&lt;/code&gt;, add this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300354.js"&gt;&lt;/script&gt;

&lt;p&gt;This says "when the page finishes loading, run whatever code is inside the curly braces."&lt;/p&gt;
&lt;p&gt;So let's add some code in there to do what we want:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300384.js"&gt;&lt;/script&gt;

&lt;p&gt;This binds an event handler to the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; with an ID of &lt;code&gt;contact_select&lt;/code&gt;. It does a what to the what now?!?&lt;/p&gt;
&lt;p&gt;That's just fancy programmer-speak for "It tells jQuery* to watch the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, and when its value changes, to do something." (The value of the select changes when we select one of the options.)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;* jQuery is a library built on top of Javascript that makes lots of things much easier than trying to do them ourselves with just Javascript.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(The bit between the slashes and asterisks is a comment. It's a good idea to include comments like this, so that other people can figure your code out, and so you can remember what it does when you come back to it later.) &lt;/p&gt;
&lt;p&gt;So what do we want it to do when the value changes? Well, that depends on what we select. A Javascript &lt;code&gt;switch&lt;/code&gt; statement is perfect for this&amp;mdash;it lets you specify what happens for a limited number of alternatives:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300388.js"&gt;&lt;/script&gt;

&lt;p&gt;Here, &lt;code&gt;$(this)&lt;/code&gt; just means the element that the handler function applies to (the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;). And &lt;code&gt;val()&lt;/code&gt; is a function that tells us its value. The period in the middle says "For the thing before the period (&lt;code&gt;$(this)&lt;/code&gt;, the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;), call this function that belongs to it (&lt;code&gt;val()&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Now we need to tell it what to do for each of the options. Let's start with email:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300397.js"&gt;&lt;/script&gt;

&lt;p&gt;This new bit says "If the value (that &lt;code&gt;val()&lt;/code&gt; gave us) is 'email', find the element with an ID of &lt;code&gt;email_opts&lt;/code&gt;, and show it (i.e., make it visible). Next, find the element with an ID of &lt;code&gt;phone_opts&lt;/code&gt; and hide it. And the same for the one with an ID of &lt;code&gt;sms_opts&lt;/code&gt;."&lt;/p&gt;
&lt;p&gt;Now we just do the same for the other two possible values:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/7300614.js"&gt;&lt;/script&gt;

&lt;p&gt;For each one, we just show the form we want and hide the others. Notice that we've also got a fourth &lt;code&gt;case&lt;/code&gt; here called &lt;code&gt;default&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;This is for when none of the others apply. Here, that only happens if the user clicks the "fake" "Contact me via&amp;hellip;" option. If that happens, we just hide all three forms.&lt;/p&gt;
&lt;p&gt;And that's all there is to it. You can see the &lt;a href="http://livetyping.capcloud.com/stuff/4min_2/"&gt;finished example here&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;If we wanted to flesh it out a bit more, we could wire up the buttons to actually do something. When the user clicks "Submit", we could hide the dropdown and the forms and replace them with a thank-you message. And maybe "Cancel" could clear the form. (More likely, we'd get rid of it altogether.)&lt;/p&gt;
&lt;p&gt;This is really just the tip of the iceberg when it comes to what you can do with HTML, CSS, and Javascript. &lt;a href="http://livetyping.capcloud.com/"&gt;Livetyping&lt;/a&gt;, my HTML prototyping course for UXers, will teach you how to do tons more things like this, including more form stuff (highlighting invalid values, for example), drag and drop, animation, and more. You should &lt;a href="http://livetyping.capcloud.com/"&gt;check it out&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;And if you like stuff like this, you should sign up for my newsletter:&lt;/p&gt;
&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>The Four-Minute* (HTML) Prototype</title><link href="http://livetyping.capcloud.com/blog/the-four-minute-html-prototype.html" rel="alternate"></link><published>2013-10-10T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2013-10-10:blog/the-four-minute-html-prototype.html</id><summary type="html">&lt;p&gt;&lt;em&gt;* OK, that's a lie&amp;mdash;it will take you a bit longer than four minutes. But much less than you might think!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Prototyping in HTML has &lt;a href="http://livetyping.capcloud.com/blog/time-to-dump-wireframes.html" title="Time to Dump Wireframes"&gt;lots of benefits&lt;/a&gt;, and many would argue that it's even better than prototyping in a dedicated tool like Axure. For example, you are prototyping in the same material as the finished product, with all the same capabilities and constraints, instead of faking it.&lt;/p&gt;
&lt;p&gt;But it's hard to know where to start, and easy to get put off by the perceived complexity. This post will show you that it's not that hard&amp;mdash;you can get up and running in a matter of minutes.&lt;/p&gt;
&lt;h4&gt;Standing on the Shoulders of Giants&lt;/h4&gt;
&lt;p&gt;The first thing to be aware of is that you don't need to start from scratch. Other people have put a great deal of effort into creating frameworks that we can use to save ourselves lots of time and effort. The two best-known frameworks are Twitter's Bootstrap and Zurb's Foundation. They both do very similar things, so for our purposes, it doesn't really matter which one you choose. (If you're interested in finding out why you might choose one over the other, check out &lt;a href="http://livetyping.capcloud.com/blog/the-best-framework-for-ux-prototyping-in-html.html" title="The Best Framework for UX Prototyping in HTML"&gt;this post&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;I'm going to show you how to make your first HTML prototype using Foundation, because I know it better.&lt;/p&gt;
&lt;p&gt;An HTML prototype consists of a bunch of files: HTML, CSS, Javascript, and images. So the first thing to do is to set up a place to put them. I find it quite convenient to put stuff like this in Dropbox, so go ahead and make a new folder there called "prototypes". In here, you're going to want one folder for each prototype, so make another folder called something like "my first prototype".&lt;/p&gt;
&lt;p&gt;Now we need to grab a copy of Foundation. Go to the &lt;a href="http://foundation.zurb.com/download.php"&gt;Foundation download page&lt;/a&gt; and click &lt;strong&gt;Download Foundation CSS&lt;/strong&gt; (the big blue button under "Default CSS"). Unzip the downloaded file and copy its contents into your "my first prototype" folder. The file called &lt;code&gt;index.html&lt;/code&gt; is the one that contains the actual content: what's going to be the actual "meat" of our prototype. If you double-click it now, it'll open up in your browser, and you'll see it's just a Foundation demo file.&lt;/p&gt;
&lt;p&gt;We need to get rid of all the existing content so we can replace it with our own, so open up &lt;code&gt;index.html&lt;/code&gt; in a text editor. (You can use Notepad (Windows) or TextEdit (OS X) for this, but you're better off with a proper text editor. I like &lt;a href="http://macromates.com/download"&gt;TextMate 2&lt;/a&gt; for OS X (it's free), but there are plenty of free and paid alternatives for both Mac and Windows, such as &lt;a href="https://panic.com/coda/"&gt;Coda&lt;/a&gt;, &lt;a href="http://macrabbit.com/espresso/"&gt;Espresso&lt;/a&gt;, &lt;a href="http://www.sublimetext.com/"&gt;Sublime Text&lt;/a&gt;, &lt;a href="http://www.textasticapp.com/mac.html"&gt;Textastic&lt;/a&gt;, &lt;a href="http://notepad-plus-plus.org/"&gt;Notepad++&lt;/a&gt;, etc.)&lt;/p&gt;
&lt;p&gt;Now find this bit:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Where to start deleting" src="static/images/body_open.png" /&gt;&lt;/p&gt;
&lt;p&gt;Delete everything starting from that first &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag all the way down to this bit:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Where to stop deleting" src="static/images/body_close.png" /&gt;&lt;/p&gt;
&lt;p&gt;Delete up to and including the closing &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; tag, but leave the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; alone. &lt;/p&gt;
&lt;p&gt;Now we can get to work! But what do we want to make? Foundation has a bunch of &lt;a href="http://foundation.zurb.com/templates.php"&gt;ready-made page layouts&lt;/a&gt; for things like a news feed and an online store. I could show you how to download one of these and change a couple of things, but I don't think that would really prepare you for making a prototype of your own. So &amp;hellip;&lt;/p&gt;
&lt;h4&gt;Let's Do It Properly&lt;/h4&gt;
&lt;p&gt;Let's take an actual website and try to replicate it as an HTML prototype. &lt;a href="http://fiveaday.co"&gt;Five A Day&lt;/a&gt; is a site that showcases five web design articles each day. Their &lt;a href="http://fiveaday.co/category/featured/"&gt;"Today's Five"&lt;/a&gt; page is a good example of the kind of thing we are often called on to design. It's not too technically complex, but it does have a nice responsive design that changes the layout and shows and hides stuff as the screen size changes. &lt;/p&gt;
&lt;p&gt;Here it is on the desktop:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/fiveaday_desktop.png" width="639" alt="Five A Day Desktop"&gt;&lt;/p&gt;
&lt;p&gt;And on an iPad Mini:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/fiveaday_ipadmini.png" width="399" alt="Five A Day iPad"&gt;&lt;/p&gt;
&lt;p&gt;And finally, on an iPhone:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/fiveaday_iphone.png" width="166" alt="Five A Day iPhone"&gt;&lt;/p&gt;
&lt;p&gt;As you can see, as the screen size gets smaller, the columns get narrower and then switch to a stacked layout. And some of the elements on the page (like the ads) are hidden on a phone-sized screen. Foundation makes it easy to set up our page like this.&lt;/p&gt;
&lt;h4&gt;Top Navigation&lt;/h4&gt;
&lt;p&gt;First, let's add that top navigation. After the opening &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag, add this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6658775.js"&gt;&lt;/script&gt;

&lt;p&gt;If you've never made anything with HTML before, this might look a bit daunting. So here's&amp;hellip; &lt;/p&gt;
&lt;hr/&gt;

&lt;h5&gt;A Quick HTML Primer&lt;/h5&gt;
&lt;p&gt;(If you know a bit of HTML already, you can probably skip this bit.)&lt;/p&gt;
&lt;p&gt;HTML consists of &lt;em&gt;elements&lt;/em&gt;, which are written by wrapping content in &lt;em&gt;tags&lt;/em&gt; ("marking it up"). A tag is the name of an element enclosed in angle brackets. So &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is a paragraph tag. There are opening and closing tags. &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is an opening tag, and &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; is the matching closing tag. So a complete paragraph element looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a paragraph.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Elements can be nested inside each other. So we can nest a link (the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element) inside our paragraph, like this:&lt;/p&gt;
&lt;div class="hide-on-desktops"&gt;
&lt;pre&gt;&amp;lt;p&amp;gt;This is &amp;lt;a href="http://
en.wikipedia.org/wiki/
Paragraph"&amp;gt;
a paragraph&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="show-on-desktops"&gt;
&lt;pre&gt;&amp;lt;p&amp;gt;This is &amp;lt;a href="http://en.wikipedia.org/wiki/Paragraph"&amp;gt;
a paragraph&amp;lt;/a&amp;gt;.&amp;lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The browser displays this like this (indented to differentiate it from the article text):&lt;/p&gt;
&lt;p style="padding-left: 2em;"&gt;This is &lt;a href="http://en.wikipedia.org/wiki/Paragraph"&gt;a paragraph&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here the opening &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag looks different from the opening &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag&amp;mdash;it has an &lt;code&gt;href&lt;/code&gt; &lt;em&gt;attribute&lt;/em&gt;. This specifies what the link links to (in this case, the Wikipedia page that explains what a paragraph is).&lt;/p&gt;
&lt;p&gt;Looking at the chunk of HTML above, we can see that we've got a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with two more &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s nested inside it. (A &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; is just a generic container element.) And each of these &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s has several links (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; elements) nested inside it. &lt;/p&gt;
&lt;p&gt;The links all have href attributes (though they don't actually link anywhere&amp;mdash;the hash character is just there to make sure that the HTML is valid). &lt;/p&gt;
&lt;p&gt;And each &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; has a &lt;code&gt;class&lt;/code&gt; attribute. We use classes to target elements in CSS so that we can position them and control how they look. In this case, the classes are ones that are defined in Foundation&amp;mdash;they tell Foundation how to position them.&lt;/p&gt;
&lt;p&gt;One more thing that you need to understand before we get back into it is that there are two different types of HTML element: &lt;em&gt;block elements&lt;/em&gt; and &lt;em&gt;inline elements&lt;/em&gt;. &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s and &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;s are block elements, and by default, they get positioned one below the other, in the order in which they appear in the HTML. (You can change it so that they are positioned next to each other instead, which is what we are telling Foundation to do here.)&lt;/p&gt;
&lt;p&gt;Inline elements (such as &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;) are inline elements&amp;mdash;they are placed on the same line as whatever comes before and after them. So the adjacent &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; elements above all get placed on the same line. &lt;/p&gt;
&lt;p&gt;OK, that'll do for the primer, for HTML at least.&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;This HTML uses Foundation's 12-column grid to split the links in the nav into two groups. The left group is seven columns wide and the right one gets five columns.&lt;/p&gt;
&lt;p&gt;Now open the &lt;code&gt;index.html&lt;/code&gt; file in your browser. (You can just double-click it.) &lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_1.png" alt="Top nav, unstyled"&gt;&lt;/p&gt;
&lt;p&gt;It doesn't look like much yet, does it?&lt;/p&gt;
&lt;p&gt;Let's add some CSS to make it look a bit better. First, create a new file called &lt;code&gt;4min.css&lt;/code&gt; in the &lt;code&gt;css&lt;/code&gt; directory. Now add a second &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; element right after the existing one within the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element in &lt;code&gt;index.html&lt;/code&gt; so it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6659216.js"&gt;&lt;/script&gt;

&lt;p&gt;This tells the browser to use the rules in &lt;code&gt;4min.css&lt;/code&gt; to style the page. Now add this to your &lt;code&gt;4min.css&lt;/code&gt; file: &lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6659170.js"&gt;&lt;/script&gt;

&lt;p&gt;Like with the HTML above, this probably looks like Greek to you if you haven't played around with CSS before. (If you have, you can skip this bit. And if you're Greek, sorry for the confusion.) &lt;/p&gt;
&lt;p&gt;So, here's&amp;hellip;&lt;/p&gt;
&lt;hr/&gt;

&lt;h5&gt;A Quick Two-minute Intro to CSS&lt;/h5&gt;
&lt;p&gt;CSS consists of &lt;em&gt;rules&lt;/em&gt;. (The above CSS contains two rules.) A rule consists of two parts: a &lt;em&gt;selector&lt;/em&gt; and one or more &lt;em&gt;declarations&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;The selector (the bit at the beginning, before the first curly brace) says which element(s) the rule applies to. This can be an element name (like &lt;code&gt;div&lt;/code&gt; or &lt;code&gt;a&lt;/code&gt;), an element ID (signified by a hash symbol, for example, &lt;code&gt;#topnav&lt;/code&gt;, which is the element with the ID of &lt;code&gt;topnav&lt;/code&gt;), a class (signified by a period, for example, &lt;code&gt;.row&lt;/code&gt;, which is an element with a class of &lt;code&gt;row&lt;/code&gt;), or a combination of these.&lt;/p&gt;
&lt;p&gt;So you can have a selector like &lt;code&gt;div.row&lt;/code&gt;, which is a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with a class of &lt;code&gt;row&lt;/code&gt;. Or &lt;code&gt;#topnav a&lt;/code&gt; (like in the CSS above), which means any &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element within the element with the ID of &lt;code&gt;topnav&lt;/code&gt;. There are other ways to combine selectors, but let's keep things simple for now.&lt;/p&gt;
&lt;p&gt;The declarations (the bit inside the curly braces) tell the browser what styles to apply to the element(s) identified by the selector. There are too many to list here, but they basically tell the browser what the selected element(s) should look like and how it should be positioned.&lt;/p&gt;
&lt;p&gt;The format for a declaration is the name of an attribute (for example, &lt;code&gt;background-color&lt;/code&gt;), followed by a colon, then the value for the attribute (for example, &lt;code&gt;white&lt;/code&gt; or &lt;code&gt;#FFFFFF&lt;/code&gt;, which is white expressed in hexadecimal), and ending with a semicolon. So a declaration to set the background color for the selected element to white would look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nn"&gt;#FFFFFF&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;hr/&gt;

&lt;p&gt;The first of these two CSS rules tells the browser to give the element with an ID of &lt;code&gt;topnav&lt;/code&gt; (our top navigation) a black background (&lt;code&gt;#000000&lt;/code&gt; is the hexadecimal code for black), top padding of 1.5 rems (that is, one and a half times the width of a capital "M" for the browser's default font size), and bottom padding of one rem. &lt;/p&gt;
&lt;p&gt;The second rule makes the text of the links (the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element is a link) white, instead of the blue that Foundation gives them, and adds a bit of padding to separate them.&lt;/p&gt;
&lt;p&gt;Refresh the page in your browser and you'll see it already looks a lot better:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_2.png" alt="Top nav, styled"&gt;&lt;/p&gt;
&lt;p&gt;Except for a couple of things&amp;hellip; The black bar should really stretch the full width of the screen. And the links on the right should be right-aligned. These are easy things to fix though. &lt;/p&gt;
&lt;p&gt;To make the links go all the way to the right, we just need to wrap them in a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; element with a class of &lt;code&gt;right&lt;/code&gt;, like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6659575.js"&gt;&lt;/script&gt;

&lt;p&gt;They're still not &lt;em&gt;all&lt;/em&gt; the way over to the right, because we gave all the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;s right-padding. We can fix this by adding another rule just for these links:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6681731.js"&gt;&lt;/script&gt;

&lt;p&gt;This gets rid of the right padding and adds left padding instead.&lt;/p&gt;
&lt;p&gt;The other problem is that the width is being limited by the &lt;code&gt;row&lt;/code&gt; class (which maintains a consistent width for all "row" container elements). So what we can do here is nest another &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; within the existing one and attach the &lt;code&gt;row&lt;/code&gt; class to that instead of to the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with the ID of &lt;code&gt;topnav&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6659625.js"&gt;&lt;/script&gt;

&lt;p&gt;This looks much better:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_3.png" alt="Top nav, styled, full-width"&gt;&lt;/p&gt;
&lt;h4&gt;Header&lt;/h4&gt;
&lt;p&gt;Next we need to add that header. So after the &lt;code&gt;topnav &amp;lt;div&amp;gt;&lt;/code&gt;, add another &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with an ID of &lt;code&gt;header&lt;/code&gt;:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6682873.js"&gt;&lt;/script&gt;

&lt;p&gt;Here, we're using the same structure as with the nav to make sure that the element we're going to apply the styling to (the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with the ID of &lt;code&gt;header&lt;/code&gt;) is full-width. And within the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that actually contains the content, we're using three different heading levels (&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt;) to give us different sized text.&lt;/p&gt;
&lt;p&gt;There's something else here we haven't seen before: &lt;code&gt;&amp;amp;amp;&lt;/code&gt; and &lt;code&gt;&amp;amp;mdash;&lt;/code&gt;. These are what are called character entities. They let us include characters in our content that can't be easily typed (e.g., an em-dash) or that have special meaning for HTML (like angle brackets, and, like here, the ampersand).&lt;/p&gt;
&lt;p&gt;Now add this to the CSS file:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6682958.js"&gt;&lt;/script&gt;

&lt;p&gt;The first rule applies a dark grey background color (&lt;code&gt;#222222&lt;/code&gt;) to the header (the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with the ID of &lt;code&gt;header&lt;/code&gt;) and gives it some padding. This padding declaration is different from the ones we used for the nav&amp;mdash;instead of separate declarations for top, bottom, left, and right, this form lets you do it all in one declaration. This one says "add top and bottom padding of 1 rem, and left and right padding of zero".&lt;/p&gt;
&lt;p&gt;The second rule has commas in the selector. Each item in this comma-separated list is actually a selector in its own right. The rule applies to all three selectors, so its declarations are applied to three different elements: &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;s in &lt;code&gt;#header&lt;/code&gt;, &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;s in &lt;code&gt;#header&lt;/code&gt;, and &lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt;s in &lt;code&gt;#header&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;All the declarations do is set the text color to white and make the text centered. Which looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_4.png" alt="Header"&gt;&lt;/p&gt;
&lt;p&gt;Obviously, this doesn't include all the fancy webfonts that the actual site has, but that's not really the point here.&lt;/p&gt;
&lt;h4&gt;Main Page Content&lt;/h4&gt;
&lt;p&gt;Next, we need to add the actual content. Five A Day's page layout has a column on the right containing ads that takes up about a quarter of the available width. And the other three-quarters is taken up by the five article summaries. &lt;/p&gt;
&lt;p&gt;So we need to add another "row" &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that contains two column &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s: the first (left) one is nine columns wide and the second (right) one is three columns wide. Actually, there's a bit of whitespace between these two columns, so we'll make the left one eight columns instead of nine.&lt;/p&gt;
&lt;p&gt;We need to add an extra class, &lt;code&gt;right&lt;/code&gt;, to the second column, because if we didn't Foundation would put it immediately after the left column, with the remaining one column of space to its right.&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6793638.js"&gt;&lt;/script&gt;

&lt;p&gt;The two &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s also get IDs so we can target them in our CSS if we want. (IDs are the right thing to use here, because we can be sure there is only going to be one main content section and one ad sidebar in our page.)&lt;/p&gt;
&lt;p&gt;Now we need to add some content.&lt;/p&gt;
&lt;p&gt;Let's start with the ads. There are five of them, each with a header, an image, and a bit of text. So inside the &lt;code&gt;ad_sidebar &amp;lt;div&amp;gt;&lt;/code&gt; that we just added, let's add five identical &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s, each with a class of &lt;code&gt;ad_container&lt;/code&gt; and containing a level five heading (&lt;code&gt;&amp;lt;h5&amp;gt;&lt;/code&gt;, about the right size), an image (a placeholder image served by the &lt;a href="http://placehold.it"&gt;placehold.it&lt;/a&gt; placeholder image service), and a paragraph of text:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6852685.js"&gt;&lt;/script&gt;

&lt;p&gt;Now it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_5.png" alt="Ad sidebar"&gt;&lt;/p&gt;
&lt;p&gt;And now the five article summaries. Each of these is just a heading, a bit of text, and a button. But these aren't two simple columns&amp;mdash;if they were, the summaries wouldn't line up horizontally:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_6.png" alt="Horizontal alignment"&gt;&lt;/p&gt;
&lt;p&gt;But they &lt;em&gt;do&lt;/em&gt; line up. (Unfortunately, the heading overlaps the button. We'll try and make sure that doesn't happen in our version.) Foundation has two types of grid for arranging stuff like this. With the &lt;a href="http://foundation.zurb.com/docs/components/grid.html"&gt;"regular" grid&lt;/a&gt;, you set up rows, and within each row, columns.&lt;/p&gt;
&lt;p&gt;The other type of grid (the &lt;a href="http://foundation.zurb.com/docs/components/block-grid.html"&gt;"block grid"&lt;/a&gt;) is a bit more flexible—it lets you take any number of items and automatically arrange them into rows, where all you need to specify is how many items you want per row. It's good for when you're not sure how many items you are going to have.&lt;/p&gt;
&lt;p&gt;Let's use the block grid here. All we need to do is put our content in list item elements (&lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;s) within an unordered list (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;), and give the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; the appropriate Foundation class. So add content within the &lt;code&gt;large-8 columns &amp;lt;div&amp;gt;&lt;/code&gt; so that it looks like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6853231.js"&gt;&lt;/script&gt;

&lt;p&gt;The individual items are pretty self-explanatory, except for the buttons, which are links (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;s) with a class that tells Foundation to make them into buttons. The class that we've given to the opening &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; needs a bit of explaining though. It tells Foundation to arrange the items in a block grid, with two items per row.&lt;/p&gt;
&lt;p&gt;Try changing 2 to a different number and see what happens:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;large-block-grid-2&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_7.png" alt="large-block-grid-2"&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;large-block-grid-3&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_8.png" alt="large-block-grid-3"&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;large-block-grid-4&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_9.png" alt="large-block-grid-4"&gt;&lt;/p&gt;
&lt;p&gt;Pretty cool, huh?&lt;/p&gt;
&lt;h4&gt;Footer&lt;/h4&gt;
&lt;p&gt;Now let's add the final piece of content: the footer. On Five A Day, this contains a heading, a search box, a bunch of category links, and copyright info and social links at the bottom. We're going to add something similar, except for the links. &lt;/p&gt;
&lt;p&gt;On Five A Day, these are in alphabetical order, but arranged in an across-then-down format, which is really hard to parse. We're going to do it properly: down-then-across. If we wanted to do this automatically, so that the content gets arranged into flowing columns containing equal amounts of content, no matter how many items we have, then we'd have to bring in the big guns and do it with Javascript.&lt;/p&gt;
&lt;p&gt;But this is just a prototype&amp;mdash;we can fake it and do it manually.&lt;/p&gt;
&lt;p&gt;So this is what we add:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6868019.js"&gt;&lt;/script&gt;

&lt;p&gt;Whoa! That looks like a lot! But apart from the lists of links, there's not a lot going on here. &lt;/p&gt;
&lt;p&gt;We've got the same row and column &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s that we've already seen. Nothing new there. (But notice how the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; containing the search button is seven columns wide. We could have made it narrower, but this way we're not required to think&amp;hellip; We just make sure the number of columns adds up to twelve, that's it.)&lt;/p&gt;
&lt;p&gt;The "Categories" heading has a seach box (an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element with a type of &lt;code&gt;search&lt;/code&gt;) with a button right after it, on the same line.&lt;/p&gt;
&lt;p&gt;The lists of links are just unordered lists (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;s) of &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements, each of which contains a link.&lt;/p&gt;
&lt;p&gt;And after that we have a row containing a horizontal rule (&lt;code&gt;&amp;lt;hr/&amp;gt;&lt;/code&gt;) and then the copyright stuff and social icons. Again we're using a span with a class of &lt;code&gt;right&lt;/code&gt;, like in the top nav, to tell Foundation to push the icons to the right edge.&lt;/p&gt;
&lt;p&gt;And here's the CSS to make it look right:&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6868202.js"&gt;&lt;/script&gt;

&lt;p&gt;The first of these rules just sets the backround color of the footer, gives it a bit of padding at the top and bottom, and sets the color (for text, etc.) to white.&lt;/p&gt;
&lt;p&gt;The second one sets the color of the "Categories" heading to white. (The first rule doesn't affect this heading because Foundation's CSS sets the color specifically for each heading style, including &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;The third rule gives the search box a bit of top margin to make it line up with the heading.&lt;/p&gt;
&lt;p&gt;The fourth rule does the same for the button, and also removes the underline from the link (see the fifth rule).&lt;/p&gt;
&lt;p&gt;The fifth rule makes the links white instead of blue, and adds an underline to them (to override Foundation's CSS, which removes it).&lt;/p&gt;
&lt;p&gt;And the sixth rule sets the color of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;s to white (if we didn't do this, the text would be white and the bullets would be dark grey) and pushes the bullets inside the element's rectangle (by default it's outside).&lt;/p&gt;
&lt;h4&gt;Mobile Decluttering&lt;/h4&gt;
&lt;p&gt;Now all we need to do is make sure that the right stuff gets hidden on small screens. If we look at Five A Day, we can see that when the screen gets down to smartphone size, the ads disappear, as well as some of the links in the top nav.&lt;/p&gt;
&lt;p&gt;Foundation's &lt;a href="http://foundation.zurb.com/docs/components/visibility.html"&gt;visibility classes&lt;/a&gt; let us hide and show stuff depending on the screen size. The &lt;code&gt;hide-for-small&lt;/code&gt; class is the one we want to use here. We'll just add it to the column containing the second set of links in the top bar (see the first line)&amp;hellip;&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6884201.js"&gt;&lt;/script&gt;

&lt;p&gt;&amp;hellip; and to the ad sidebar (again, the first line):&lt;/p&gt;
&lt;script src="https://gist.github.com/martinpolley/6896978.js"&gt;&lt;/script&gt;

&lt;p&gt;Now if you resize your browser window down to phone-like proportions, you'll see that the ads and links disappear:&lt;/p&gt;
&lt;p&gt;&lt;img src="static/images/4min_10.png" width="166" alt="Smartphone-sized: the right stuff gets hidden"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/stuff/4min_1/"&gt;The finished example is here&lt;/a&gt;, if you want to take a look.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;I hope that this post has succeeded in showing you that creating an HTML prototype is really not all that difficult. If you use a framework like Foundation, a little knowledge of HTML and CSS will get you a long way.&lt;/p&gt;
&lt;p&gt;"But this isn't a proper prototype," I hear you say, "It's just a static web page&amp;mdash;it doesn't &lt;em&gt;do&lt;/em&gt; anything."&lt;/p&gt;
&lt;p&gt;Fair point.&lt;/p&gt;
&lt;p&gt;Which is why you'll want to stay tuned for my next post, where I'll show you how to use Javascript to add some interactivity to your prototypes. (UPDATE: Here is the sequel&amp;mdash;&lt;a href="http://livetyping.capcloud.com/blog/the-four-minute-prototype-adding-interactivity.html"&gt;The Four Minute Prototype: Adding Interactivity&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;If you really want to learn all the ins and outs of this stuff, you should check out my &lt;a href="http://livetyping.capcloud.com"&gt;Livetyping&lt;/a&gt; course.&lt;/p&gt;
&lt;p&gt;And if you like stuff like this, you could do worse than signing up for my newsletter:&lt;/p&gt;
&lt;div class="row"&gt;
    &lt;div class="ten columns"&gt;
        &lt;div id="mc_embed_signup"&gt;
            &lt;form action="http://capcloud.us4.list-manage.com/subscribe/post?u=3f02f03a1e0d396f36b10c145&amp;amp;id=c9ab18fe27" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate&gt;
                &lt;h4&gt;Sign up and get a free sample lesson by email&lt;/h4&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-FIRSTNAME"&gt;First name &lt;/label&gt;
                    &lt;input type="text" value="" name="FIRSTNAME" class="required" id="mce-FIRSTNAME"&gt;
                &lt;/div&gt;
                &lt;div class="mc-field-group"&gt;
                    &lt;label for="mce-EMAIL"&gt;Email address &lt;/label&gt;
                    &lt;input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"&gt;
                &lt;/div&gt;
                &lt;div id="mce-responses" class="clear"&gt;
                    &lt;div class="response" id="mce-error-response" style="display:none"&gt;&lt;/div&gt;
                    &lt;div class="response" id="mce-success-response" style="display:none"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div style="position: absolute; left: -5000px;"&gt;&lt;input type="text" name="b_3f02f03a1e0d396f36b10c145_c9ab18fe27" value=""&gt;&lt;/div&gt;
                &lt;div class="clear"&gt;&lt;input type="submit" value="Get the sample lesson" name="subscribe" onclick="ga('send', 'event', 'Events', 'Signup newsletter');" id="mc-embedded-subscribe" class="large button" style="width: 100%;"&gt;&lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>Stuff You Can Do in an HTML Prototype that You Can't Do in a Wireframe or Comp</title><link href="http://livetyping.capcloud.com/blog/stuff-you-can-do-in-an-html-prototype-that-you-cant-do-in-a-wireframe-or-comp.html" rel="alternate"></link><published>2013-04-07T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2013-04-07:blog/stuff-you-can-do-in-an-html-prototype-that-you-cant-do-in-a-wireframe-or-comp.html</id><summary type="html">&lt;p&gt;&lt;strong&gt; Caution: This post includes &lt;em&gt;animated GIFs&lt;/em&gt;. Some people find these annoying (especially when, like here, they're not even funny). &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are plenty of good reasons to prototype your designs in HTML. (I posted a &lt;a href="http://livetyping.capcloud.com/blog/time-to-dump-wireframes.html"&gt;roundup&lt;/a&gt; a while back. And &lt;a href="http://the-pastry-box-project.net/leisa-reichelt/2012-october-23/"&gt;this post&lt;/a&gt; by Leisa Reichelt puts it even better.) But one of the most compelling reasons is that there are things that you can do in a prototype that you &lt;em&gt;simply cannot do&lt;/em&gt; in any static deliverable.&lt;/p&gt;
&lt;p&gt;Here are a few examples.&lt;/p&gt;
&lt;h4&gt;Animated Transitions&lt;/h4&gt;
&lt;p&gt;&lt;img alt="Fade and heal transition" src="static/images/fade_and_close_transition.gif" /&gt;&lt;/p&gt;
&lt;p&gt;An animated transition to show that something has been removed makes the change less jarring and makes it more obvious what just happened.&lt;/p&gt;
&lt;h4&gt;Selection-dependent Inputs&lt;/h4&gt;
&lt;p&gt;&lt;img alt="Selection-dependent inputs" src="static/images/selection_dependent_inputs.gif" /&gt;&lt;/p&gt;
&lt;p&gt;With Javascript, you can easily change the contents of one input control based on what the user selects in another.&lt;/p&gt;
&lt;h4&gt;Inline Validation&lt;/h4&gt;
&lt;p&gt;&lt;img alt="Validation" src="static/images/inline_validation.gif" /&gt;&lt;/p&gt;
&lt;p&gt;Again, Javascript lets us do things like compare the values that the user inputs and alert them if the values don't make sense. (You could just as easily use it to make such a mistake impossible.)&lt;/p&gt;
&lt;h4&gt;Drag and Drop&lt;/h4&gt;
&lt;p&gt;&lt;img alt="Drag and drop" src="static/images/drag_n_drop.gif" /&gt;&lt;/p&gt;
&lt;p&gt;jQuery makes it extremely easy to turn a simple list of items into a list of &lt;em&gt;draggable&lt;/em&gt; items.&lt;/p&gt;
&lt;h4&gt;Responsive Layout&lt;/h4&gt;
&lt;p&gt;&lt;img alt="Responsive layout" src="static/images/responsive_layout.gif" /&gt;&lt;/p&gt;
&lt;p&gt;Yeah, yeah, I know—the only people who do this to their browser windows are designers. But the point is, if you build your prototype using a framework like &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt; (&lt;a href="http://livetyping.capcloud.com/blog/the-best-framework-for-ux-prototyping-in-html.html"&gt;other front-end frameworks are available&lt;/a&gt;), not only can you lay out your page very easily, that page is automatically responsive—it works on any screen size. (Though it's up to you to make that work in a way that makes sense for users—just letting the content get reflowed doesn't always cut it.)&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;These are just a few examples of things you can do in an HTML prototype that simply can't be done in a wireframe or Photoshop comp. (There are many more.) Which means things that must be documented to supplement the wireframes/comps. Which means things that are open to interpretation. And to &lt;em&gt;mis&lt;/em&gt;-interpretation. If you're not already prototyping in HTML, you should be thinking about it.&lt;/p&gt;
&lt;p&gt;If you want to learn how to build prototypes that can do stuff like this, check out &lt;a href="http://livetyping.capcloud.com/blog/"&gt;Livetyping&lt;/a&gt;, the video course that teaches you how to create interactive prototypes using HTML, CSS, and Javascript. (All these examples are from the course.)&lt;/p&gt;</summary></entry><entry><title>The Best of Both Worlds—Mixing Bootstrap and Foundation</title><link href="http://livetyping.capcloud.com/blog/the-best-of-both-worlds-mixing-bootstrap-and-foundation.html" rel="alternate"></link><published>2013-04-04T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2013-04-04:blog/the-best-of-both-worlds-mixing-bootstrap-and-foundation.html</id><summary type="html">&lt;p&gt;&lt;img alt="awesome" src="static/images/foundation_plus_bootstrap.png" /&gt;&lt;/p&gt;
&lt;p&gt;This site is built with &lt;a href="http://foundation.zurb.com/"&gt;ZURB Foundation&lt;/a&gt;, which is awesome. But when I was adding this blog to the site, I decided I wanted the stuff in the right column to stay visible all the time. (If you're reading this in an RSS reader, head over to &lt;a href="http://livetyping.capcloud.com/blog/"&gt;the blog&lt;/a&gt; to check it out.) Foundation doesn't really have a component that does that (except for a sticky top nav bar, which doesn't help me). But &lt;a href="http://twitter.github.com/bootstrap/"&gt;Bootstrap&lt;/a&gt; &lt;em&gt;does&lt;/em&gt; have a component that fits the bill.&lt;/p&gt;
&lt;p&gt;You can see the component in action on the Bootstrap site &lt;a href="http://getbootstrap.com/getting-started"&gt;here&lt;/a&gt;. As you scroll, the nav on the right gets pinned in place. That's exactly what I wanted. But this is Bootstrap and I'm using Foundation. What to do?&lt;/p&gt;
&lt;p&gt;Well, it turns out that lots of things in Bootstrap (such as this) are implemented as standalone modules. (The same is true of Foundation.) Which means you can just grab the relevant file and start using it on your own site. So that's exactly what I did. All you need to do is grab &lt;a href="https://raw.github.com/twbs/bootstrap/master/js/affix.js"&gt;the file&lt;/a&gt; and put it in Foundation's Javascript folder. (I just copied it and pasted it into a new file.)&lt;/p&gt;
&lt;p&gt;Then you can include it in your page, add one line of code to your &lt;code&gt;$(document).ready()&lt;/code&gt; function to attach the behavior to the relevant element, and you're done. Almost done anyway. In the case of this specific module, you need to add a couple of data attributes to the element's HTML and a couple of CSS rules, but nothing too complicated.&lt;/p&gt;
&lt;p&gt;I also had to tweak a few things to make it work properly. For example, my footer was really big, and this made it hard to get it to behave correctly, so I made the footer a bit smaller. And because Foundation's grid is more fluid than Bootstrap's, I had to make the element that gets pinned fixed width.&lt;/p&gt;
&lt;p&gt;But if you're OK making compromises like these, you can achieve quite impressive results. So if you're already using a particular front-end framework, don't be afraid to borrow from one of the others. It works, and you'll always learn something new in the process.&lt;/p&gt;</summary></entry><entry><title>The Best Framework for UX Prototyping in HTML</title><link href="http://livetyping.capcloud.com/blog/the-best-framework-for-ux-prototyping-in-html.html" rel="alternate"></link><published>2013-03-21T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2013-03-21:blog/the-best-framework-for-ux-prototyping-in-html.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;While I was putting together &lt;a href="http://livetyping.capcloud.com" style="color: #699C40; font-weight: bold;"&gt;Livetyping&lt;/a&gt; (my online course that teaches UX designers how to create prototypes in HTML, CSS, and Javascript), I used Foundation for the prototype that I showed how to build. But Foundation isn't the only front-end framework out there. So I decided to take a look at a couple of others to see how they compare. Enjoy.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you're prototyping in HTML, CSS, and Javascript (or just thinking about it), you probably already know that using a framework can save you a lot of time, especially if your design needs to be responsive. (And these days, with a few exceptions, there aren't many reasons to make a design non-responsive.)&lt;/p&gt;
&lt;p&gt;But how can you know which one is best, without downloading them all and trying them for yourself? This post aims to save you the hassle by explaining the pros and cons of each from a UX prototyping perspective.&lt;/p&gt;
&lt;h3&gt;The Contenders&lt;/h3&gt;
&lt;p&gt;The two most popular frameworks are &lt;a href="http://twitter.github.com/bootstrap/index.html"&gt;Bootstrap&lt;/a&gt;, originally created at Twitter, and &lt;a href="http://foundation.zurb.com/"&gt;Foundation&lt;/a&gt;, created by product design company ZURB. There is also a dark horse candidate called &lt;a href="http://www.getskeleton.com/"&gt;Skeleton&lt;/a&gt;, which was created by Twitter designer and former ZURBian Dave Gamache.&lt;/p&gt;
&lt;h3&gt;What Are These Things, Actually?&lt;/h3&gt;
&lt;p&gt;All three of these frameworks let you lay out web pages on a responsive grid. This means that you can make your design work well on any screen size. If that's all you need, Skeleton fits the bill. (Bootstrap and Foundation also do this, but they bundle in a lot of extra stuff too.)&lt;/p&gt;
&lt;p&gt;But for all but the simplest prototypes, you will almost certainly need more than just layout. The questions you need to be asking are &lt;em&gt;What do we need?&lt;/em&gt; and &lt;em&gt;What do we know?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you need things like tabs, nicely-styled buttons and forms, standardized navigation components, consistent typography, and so on, then both Foundation and Bootstrap come with stuff that makes adding these things easy and fast (and they will look consistent too).&lt;/p&gt;
&lt;p&gt;If you know how to do these things yourself (and want to), Skeleton could be the answer.&lt;/p&gt;
&lt;h3&gt;How They Look Out-of-the-Box&lt;/h3&gt;
&lt;h4&gt;Skeleton&lt;/h4&gt;
&lt;figure&gt;
&lt;img alt="Skeleton on the Desktop" src="http://media.tumblr.com/3828274c010881abf44c63c3181bf455/tumblr_inline_mjxcux1JEj1qz4rgp.png"/&gt;
&lt;figcaption&gt;Skeleton on the Desktop&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img alt="Skeleton on iPhone" src="http://media.tumblr.com/0154951628ee0d85fba494c3e4838fe6/tumblr_inline_mjyi5pKFN11qz4rgp.png"/&gt;
&lt;figcaption&gt;Skeleton on iPhone&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h4&gt;Bootstrap&lt;/h4&gt;
&lt;figure&gt;
&lt;img alt="Bootstrap on the Desktop" src="http://media.tumblr.com/6b0fe329efd133154cdfdee04919fad8/tumblr_inline_mjxcn7McFl1qz4rgp.png"/&gt;
&lt;figcaption&gt;Bootstrap on the Desktop&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img alt="Bootstrap on iPhone" src="http://media.tumblr.com/be2b06ae6933f7e626d5fcf86638bc70/tumblr_inline_mjyhm6zzGB1qz4rgp.png"/&gt;
&lt;figcaption&gt;Bootstrap on iPhone&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h4&gt;Foundation&lt;/h4&gt;
&lt;figure&gt;
&lt;img alt="Foundation on the Desktop" src="http://media.tumblr.com/7ce0fe19d36a459cbb75e0e1e0cf8aa7/tumblr_inline_mjxco51ajp1qz4rgp.png"/&gt;
&lt;figcaption&gt;Foundation on the Desktop&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img alt="Foundation on iPhone" src="http://media.tumblr.com/2b784b26e21a353e7886db1d61c19069/tumblr_inline_mjyi5496Oj1qz4rgp.png"/&gt;
&lt;figcaption&gt;Foundation on iPhone&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;What You Get in the Box&lt;/h3&gt;
&lt;h4&gt;Skeleton&lt;/h4&gt;
&lt;p&gt;Skeleton gives you a responsive grid, some basic typography, and some simple form and button styling. That's it.&lt;/p&gt;
&lt;h4&gt;Bootstrap and Foundation&lt;/h4&gt;
&lt;p&gt;In terms of feature lists, there is a &lt;strong&gt;lot&lt;/strong&gt; of overlap between Foundation and Bootstrap. I won't list them all out here because others have &lt;a href="http://responsive.vermilion.com/compare.php" target="_blank"&gt;already done a better job than I would&lt;/a&gt; (scroll down to &lt;em&gt;UI and Widgets&lt;/em&gt; at the bottom of the page).&lt;/p&gt;
&lt;p&gt;In short, they both provide a responsive grid, nice typography, improved form styling, and pretty much any UI component that you might see in a modern webapp. So instead of listing them out here, I'm going to point out some of the &lt;em&gt;differences&lt;/em&gt; between the two:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Bootstrap comes with a set of 140 (naturally) icons. Foundation does not include icons, but ZURB have created several &lt;a href="http://foundation.zurb.com/icon-fonts.php"&gt;icon fonts&lt;/a&gt; and a set of &lt;a href="http://foundation.zurb.com/social-icons.php"&gt;social icons&lt;/a&gt; (as separate products) that you can use.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Foundation has iOS-style &lt;a href="http://foundation.zurb.com/docs/components/switch.html"&gt;switches&lt;/a&gt;, which are a nice alternative to checkboxes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Both Bootstrap and Foundation have visibility classes, which let you show and hide elements depending on the screen size. Foundation goes one step further by adding visibility classes for device orientation and touch support.&lt;/p&gt;
&lt;p&gt;This means you can do things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Replicate the pattern seen in many iPad apps, where a sidebar is displayed in landscape mode and hidden in portrait.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Show affordances on touch devices that usually only appear on hover.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootstrap seems to offer more built-in options for styling tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootstrap includes iPad-style &lt;a href="http://twitter.github.com/bootstrap/javascript.html#popovers"&gt;popovers&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootstrap comes with animated transitions for fade in/out and slide in/out.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Both Foundation and Bootstrap have wizards that let you customize their framework before you download it. Bootstrap seems to have more things you can customize, which may or may not be a good thing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Foundation has 13 templates for common page layouts that you can &lt;a href="http://foundation.zurb.com/templates.php"&gt;download&lt;/a&gt; from their site. Bootstrap comes with eight example pages included in the download.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But maybe the most important difference between the two frameworks is that Bootstrap is much more style-heavy than Foundation. This means that you see lots of sites that are very recognizably built using Bootstrap. For prototyping this may not matter so much. After all, what we are prototyping is not the visual design, it's the layout and functionality. But on the other hand, if the way things look by default draws too much attention to itself, that may be a disadvantage.&lt;/p&gt;
&lt;p&gt;As someone cleverly put it in an answer to a &lt;a href="http://www.quora.com/Prototyping/Which-one-would-be-a-better-choice-for-production-Twitter-Bootstrap-or-Zurb-Foundation-and-why"&gt;Quora question&lt;/a&gt; about this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is like the difference between buying a custom Lego kit or buying a bunch of Legos on eBay and then trying to build something from the kits that you scrapped together. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Other Factors&lt;/h3&gt;
&lt;h4&gt;Up-to-date-ness&lt;/h4&gt;
&lt;p&gt;Foundation and Bootstrap are both being actively developed, and new versions are released frequently. Skeleton, on the other hand, has not been updated in months. But since what it does is relatively simple, and because it is not engaged in a feature war with the other two (just the opposite, in fact), this may not matter in the slightest.&lt;/p&gt;
&lt;h4&gt;Popularity&lt;/h4&gt;
&lt;p&gt;Now, you don't want to be a sheep and just go with the one that everyone else is using. But popularity &lt;em&gt;does&lt;/em&gt; matter. It matters because Bootstrap is attracting people to develop other products that are based on it. And some of those could be quite useful to us.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://preview.liip.ch/protostrap/"&gt;Protostrap&lt;/a&gt; lets you put prototypes together more quickly by using PHP to reuse content. It also includes some enhancements to Bootstrap, including a fake authentication layer, a way to handle missing pages gracefully, an iOS tab bar, a carousel with touch support, more icons, and more.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://jetstrap.com"&gt;Jetstrap&lt;/a&gt; is webapp that lets you lay out Bootstrap pages visually, without having to write any code. &lt;/p&gt;
&lt;p&gt;There does not seem to be anything similar for Foundation yet.&lt;/p&gt;
&lt;h4&gt;Under the Hood: Less and Sass&lt;/h4&gt;
&lt;p&gt;Both Foundation and Bootstrap let you work in plain ol' CSS. But they both use a CSS preprocessor that lets you do more powerful things (and keep your code simpler). Bootstrap uses &lt;a href="http://lesscss.org/"&gt;Less&lt;/a&gt;, while Foundation uses &lt;a href="http://sass-lang.com/"&gt;Sass&lt;/a&gt;. If you know what these are and have a preference, this may sway your decision.&lt;/p&gt;
&lt;h4&gt;Documentation&lt;/h4&gt;
&lt;p&gt;Another important factor is how easy it is to learn each framework. For this, you'll be relying on the provided documentation.&lt;/p&gt;
&lt;p&gt;Skeleton's documentation is understandably sparse. There's not a lot to explain here, but the docs do a perfectly acceptable job of explaining it.&lt;/p&gt;
&lt;p&gt;Foundation and Bootstrap both have very good documentation, but I think Bootstrap has a slight edge here.&lt;/p&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;Is any one of these head-and-shoulders above the others, a clear winner? No. All three frameworks are very competent.&lt;/p&gt;
&lt;p&gt;So which one should you use? The answer is a typical, designerly "It depends".&lt;/p&gt;
&lt;p&gt;Each one just has a different emphasis, so which one is right for you depends on what you're trying to do.&lt;/p&gt;
&lt;p&gt;Do you mind all your prototypes having a similar look and feel? Maybe that's even a positive in your eyes. If so, Bootstrap is a strong contender.&lt;/p&gt;
&lt;p&gt;Do you prefer to impose your own look and feel on your prototypes (not necessarily a proper visual design that approximates a finished product, but maybe one that looks more wireframe-y)? Foundation could be the one for you.&lt;/p&gt;
&lt;p&gt;Do you have strong CSS and Javascript skills and want complete control over both the way your prototype looks and how it behaves? Then check out Skeleton.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;"But which one do &lt;em&gt;you&lt;/em&gt; use?"&lt;/strong&gt; you ask. Well, I use Foundation. Why? Because I started using it before I'd even really &lt;em&gt;heard&lt;/em&gt; about Bootstrap or Skeleton or had a chance to try them out.&lt;/p&gt;
&lt;p&gt;And now I'm used to the way Foundation does things. I know how to do what I want in Foundation, so even if one of the other frameworks might be "better" for a particular project, I'm probably better off leveraging my existing experience with Foundation and bending it to fit the needs of the current project than to invest the time required to learn one of the others.&lt;/p&gt;
&lt;p&gt;But if I was starting from scratch and trying to decide which one to use today, I'd probably discount Skeleton because Bootstrap and Foundation both provide so many useful extras. Using the provided components is much faster than reinventing the wheel and doing it yourself. &lt;/p&gt;
&lt;p&gt;What it really comes down to is this: Can you live with Bootstrap's style-heavy approach? And will the same framework be used in production? (This may not be your decision to make…) If so, then it's more work (not for you, but still) to override Bootstrap's styles to make it look the way you want.&lt;/p&gt;</summary></entry><entry><title>When NOT to Prototype</title><link href="http://livetyping.capcloud.com/blog/when-not-to-prototype.html" rel="alternate"></link><published>2012-11-14T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-11-14:blog/when-not-to-prototype.html</id><summary type="html">&lt;p&gt;As I've been putting together &lt;a href="http://livetyping.capcloud.com/"&gt;Livetyping&lt;/a&gt; (my HTML prototyping course), I've been thinking about situations when you &lt;em&gt;shouldn't prototype&lt;/em&gt; stuff (interface elements, interactions, whatever). This two-by-two chart sums up my thinking:&lt;/p&gt;
&lt;p&gt;&lt;img alt="two-by-two" src="http://media.tumblr.com/tumblr_mdhayf0ZFe1qzb1wu.png" /&gt;&lt;/p&gt;
&lt;p&gt;When something is hard to explain, but easy to code, you should code it. When the opposite it true, you should explain it instead (maybe using something like &lt;a href="http://code.new-bamboo.co.uk/polypage/"&gt;Polypage&lt;/a&gt; to add annotations directly to your prototype). These seem to be no-brainers.&lt;/p&gt;
&lt;p&gt;But the interesting bits are the other two rectangles. If something is easy to explain &lt;em&gt;and&lt;/em&gt; easy to code, what should you do? And what if it's hard to explain &lt;em&gt;and&lt;/em&gt; to code? Well, it depends. And the “it depends” is similar for both cases.&lt;/p&gt;
&lt;p&gt;It depends on &lt;em&gt;why&lt;/em&gt; you want to prototype this particular bit of the interface. Is it just to communicate how it works to developers and stakeholders? If so, explaining is probably the best route.&lt;/p&gt;
&lt;p&gt;But if it's so you can test your design with users, it may be worth putting in the extra effort to code it, especially if it is used in any important flows. Of course, if you're in the hard/hard rectangle, you may have to collaborate with your developer colleagues to bring it to fruition. (Thinking about it, this flavor of “it depends” applies to all four scenarios&amp;mdash;if it has to be in there for testing, then it has to be in there.)&lt;/p&gt;
&lt;p&gt;There are other axes to take into account, of course, such as the relative importance of the thing you're contemplating prototyping, and the novelty of the element/interaction, but I've found this to be a useful tool for thinking about this stuff.&lt;/p&gt;
&lt;p&gt;What do you think? &lt;a href="https://twitter.com/martinpolley"&gt;Ping me on Twitter&lt;/a&gt; and let me know.&lt;/p&gt;</summary></entry><entry><title>Time to Dump Wireframes 2: The Turning Tide</title><link href="http://livetyping.capcloud.com/blog/time-to-dump-wireframes-2-the-turning-tide.html" rel="alternate"></link><published>2012-11-11T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-11-11:blog/time-to-dump-wireframes-2-the-turning-tide.html</id><summary type="html">&lt;p&gt;If you're &lt;em&gt;still&lt;/em&gt; not convinced that prototyping is better than wireframing (even after reading &lt;a href="http://capcloud.com/post/25357659999/time-to-dump-wireframes"&gt;this&lt;/a&gt;?!?), here are a couple of great articles that were published recently that you really must read.&lt;/p&gt;

&lt;p&gt;In the first, &lt;a href="https://twitter.com/shesho"&gt;Sergio Nouvel&lt;/a&gt; gives a good overview of the pros and cons of each of the different fidelity deliverables that we are used to producing. He then goes on to make a compelling argument for starting out with lo-fi mockups, then going straight to "wireframing in the browser", which has a number of advantages:

&lt;ul&gt;
&lt;li&gt;With CSS frameworks, basic layout is a breeze.&lt;/li&gt;
&lt;li&gt;Your deliverable is responsive-ready.&lt;/li&gt;
&lt;li&gt;You can take advantage of what the browser does by nature.&lt;/li&gt;
&lt;li&gt;It’s truly interactive.&lt;/li&gt;
&lt;li&gt;The scalable nature of CSS enables easy, live changes.&lt;/li&gt;
&lt;li&gt;You don’t need proprietary software or a powerhouse machine.&lt;/li&gt;
&lt;li&gt;Everything you do saves you time later because you are building the real thing.&lt;/li&gt;
&lt;/ul&gt;

Absolutely! Go &lt;a href="http://uxmag.com/articles/ditch-traditional-wireframes"&gt;check it out&lt;/a&gt; on UX Magazine.&lt;/p&gt;

&lt;p&gt;The second article, by &lt;a href="https://twitter.com/leisa"&gt;Leisa&lt;/a&gt; &lt;a href="http://www.disambiguity.com/"&gt;Reichelt&lt;/a&gt;, is a punchy, tour-de-force list of reasons why prototyping beats the pants off wireframing. It's a really quick read—already condensed down to its essence—so I won't ruin it by trying to summarize it here. Just take the two minutes and &lt;a href="http://the-pastry-box-project.net/leisa-reichelt/2012-october-23/"&gt;go read it&lt;/a&gt; over on The Pastry Box Project. It's really good.&lt;/p&gt;

&lt;p&gt;Happy reading :)&lt;/p&gt;</summary></entry><entry><title>How To: Prototype an Animated Notification (à la Twitter)</title><link href="http://livetyping.capcloud.com/blog/how-to-prototype-an-animated-notification-a-la-twitter.html" rel="alternate"></link><published>2012-11-08T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-11-08:blog/how-to-prototype-an-animated-notification-a-la-twitter.html</id><summary type="html">&lt;div style="position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0;"&gt;
&lt;iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="520" height="293" src="http://www.youtube.com/embed/wGYUlK_Keds?rel=0" frameborder="0"&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&amp;nbsp;Switch to full-screen, otherwise you won't be able to see a damn thing :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is a short excerpt from &lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt;, my self-paced video course that teaches you (the UX designer) how to prototype in HTML, CSS, and Javascript.&lt;/p&gt;

&lt;p&gt;You can buy Livetyping &lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;here&lt;/a&gt;.&lt;/p&gt;</summary></entry><entry><title>Recording Mobile Screens—Another Option</title><link href="http://livetyping.capcloud.com/blog/recording-mobile-screens-another-option.html" rel="alternate"></link><published>2012-10-16T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-10-16:blog/recording-mobile-screens-another-option.html</id><summary type="html">&lt;p&gt;Recording the screen of a mobile device is not an easy thing. You can build a fancy test rig, with cameras and so on. But it's expensive and cumbersome. There are iOS apps that let you record the screen. But the ones I've seen are either buggy as hell or require you to jailbreak your device.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_mc0431g4QX1qzb1wu.png" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;But today I came across another option. AirPlay lets you mirror your iPhone or iPad's display on an Apple TV. But you can also mirror it on a Mac, using a product called &lt;a href="http://www.airserverapp.com/en/Download/Referrer/227076"&gt;AirServer&lt;/a&gt;. The company that created it promotes it as a way to play multi-player games with your friends on a nice big screen.&lt;/p&gt;
&lt;p&gt;But with your device's screen mirrored on your Mac, you can use screen-recording software (like Screenflow, Camtasia, or Morae) to record it. Which, for user testing, is pretty damn handy. (The image above was captured from my Mac's screen.)&lt;/p&gt;
&lt;p&gt;(Disclaimer: If you use the above link to download and install AirServer, my free trial gets extended by three days. Just so you know.)&lt;/p&gt;</summary></entry><entry><title>Learning HTML Prototyping—Where the Hell Do I Start?</title><link href="http://livetyping.capcloud.com/blog/learning-html-prototyping-where-the-hell-do-i-start.html" rel="alternate"></link><published>2012-09-03T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-09-03:blog/learning-html-prototyping-where-the-hell-do-i-start.html</id><summary type="html">&lt;p&gt;OK, so you've read what various &lt;a href="http://capcloud.com/post/25357659999/time-to-dump-wireframes"&gt;UX thought leaders have said or written&lt;/a&gt; about prototyping in HTML (or more generally about UXers being able to code) and you're convinced that HTML prototyping is an important skill. Maybe you want to improve the collaboration between you (the designer) and your developer colleagues. Perhaps you want to improve communication with stakeholders. Or maybe you want to get your designs in front of your users earlier.&lt;/p&gt;

&lt;p&gt;If you're a freelancer, it could be that you are looking for ways to raise your hourly rate. Or maybe you're an in-house designer who's looking for a better job and who sees the value of having this important skill on your résumé.&lt;/p&gt;

&lt;p&gt;But where do you start?&lt;/p&gt;

&lt;p&gt;The following is my attempt to show you the alternatives that are out there. I hope it helps you find the way that best suits you.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Disclaimer:&lt;/b&gt; I have included &lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt;, which I created. Yes, I think it's great. But I recognize that different people learn in different ways. If self-paced, screencast-based learning isn't your bag, I'm sure you'll find an alternative here.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;Workshops&lt;/h4&gt;

&lt;p&gt;&lt;img width="207px" src="http://media.tumblr.com/tumblr_m9rw91PtcK1qzb1wu.png" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;There have been several HTML prototyping workshops run in various locations. A good example is UX Bootcamp's &lt;a href="http://www.uxbootcamp.org/prototyping/"&gt;Prototyping in Code&lt;/a&gt;, an intensive three-day workshop that has been run twice in London, UK.&lt;/p&gt;

&lt;p&gt;Pros:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's aimed specifically at UX designers.&lt;/li&gt;
&lt;li&gt;It's good for procrastinators and others who struggle with self-paced learning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's a bit pricey (£299, which translates to $475).&lt;/li&gt;
&lt;li&gt;It's only any use if you live within a reasonable distance of the venue.&lt;/li&gt;
&lt;li&gt;It's not available &lt;em&gt;right now&lt;/em&gt;. You'll have to wait for the next one to be scheduled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;Books&lt;/h4&gt;

&lt;p&gt;&lt;img src="http://cdn.shopify.com/s/files/1/0051/7692/assets/aba-1-thumb.png" alt="image" /&gt;
&lt;img src="http://cdn.shopify.com/s/files/1/0051/7692/assets/aba-2-thumb.png" alt="image" /&gt;
&lt;img src="http://cdn.shopify.com/s/files/1/0051/7692/assets/aba-4-thumb.png" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;Hundreds of books (maybe even thousands) have been written about HTML, CSS, and Javascript. Here are a few notable ones:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.abookapart.com/products/html5-for-web-designers"&gt;HTML5 for Web Designers&lt;/a&gt;, by Jeremy Keith&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Designing-Web-Standards-3rd-Edition/dp/0321616952"&gt;Designing with Web Standards&lt;/a&gt;, by Jeffrey Zeldman and Ethan Marcotte&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.abookapart.com/products/css3-for-web-designers"&gt;CSS3 for Web Designers&lt;/a&gt;, by Dan Cederholm&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.abookapart.com/products/responsive-web-design"&gt;Responsive Web Design&lt;/a&gt;, by Ethan Marcotte&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also Todd Zaki Warfel's book, &lt;a href="http://www.amazon.com/Prototyping-Practitioners-Todd-Zaki-Warfel/dp/1933820217"&gt;Prototyping: A Practitioner's Guide&lt;/a&gt;, which touches on HTML prototyping, but does not go into much depth.&lt;/p&gt;

&lt;p&gt;Pros:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are spoiled for choice.&lt;/li&gt;
&lt;li&gt;Books are relatively cheap.&lt;/li&gt;
&lt;li&gt;There are some great books out there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's hard to know which books to buy from the huge selection available.&lt;/li&gt;
&lt;li&gt;None of them are really tailored for UX designers who want to learn how to prototype in HTML.&lt;/li&gt;
&lt;li&gt;Not everybody likes learning from books or has the necessary self-discipline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;Online Video Courses&lt;/h4&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m9rvyphiHp1qzb1wu.png" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;There are dozens of sites that offer screencast-based courses. For example, &lt;a href="http://lynda.com"&gt;Lynda.com&lt;/a&gt; has lots of courses on just about any tech-related subject you could mention, including ones on HTML, CSS, and Javascript. There is a lot of good content out there, but most of it is not aimed specifically at UX designers. It's more for people who want to become web designers or web developers.&lt;/p&gt;

&lt;p&gt;Pros:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are typically self-paced, which is great if that works for your learning style.&lt;/li&gt;
&lt;li&gt;The cost is usually reasonable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They aren't tailored for UX designers.&lt;/li&gt;
&lt;li&gt;You need to do your research to find the right courses.&lt;/li&gt;
&lt;li&gt;You end up wasting time learning stuff that's not really relevant for HTML prototyping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;Free Online Resources&lt;/h4&gt;

&lt;p&gt;&lt;img src="http://www.w3schools.com/images/w3html.gif" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;Where do you go to find almost infinite resources about web technologies? The web, of course! Again, the quantity of information available is staggering. You can get all the information you need, but there are two problems: finding it, and being able to tell the good from the bad.&lt;/p&gt;

&lt;p&gt;A few selected resources:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://diveintohtml5.info/"&gt;http://diveintohtml5.info/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codecademy.com"&gt;http://www.codecademy.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3schools.com/html/default.asp"&gt;http://www.w3schools.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://css-tricks.com/"&gt;http://css-tricks.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pros:
&lt;/p&gt;

&lt;ul&gt;     
&lt;/ul&gt;

&lt;p&gt;Cons:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It takes a lot of time to find the right resources and work through them. How valuable is your time?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;&lt;img width="250px" src="http://media.tumblr.com/tumblr_m9rw1vP1P01qzb1wu.png" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt; is a series of screencast lessons that teach you prototyping in HTML, CSS, and Javascript at your own pace. It is tailored for UX designers and doesn't include stuff that you don't need to know.&lt;/p&gt;

&lt;p&gt;Pros:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's tailored specifically for UX designers.&lt;/li&gt;
&lt;li&gt;It's great if you can't dedicate a big block of time all at once.&lt;/li&gt;
&lt;li&gt;You can work through it at your own speed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not good for procrastinators or those who struggle with self-paced learning (though it's probably better than books in this respect).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;

&lt;p&gt;HTML prototyping is a valuable skill that is in demand. There are many different ways to get this skill—some will suit your own personal learning style and how you value your time better than others. Best of luck!&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;/p&gt;
&lt;p&gt;You can get Livetyping &lt;a href="http://livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;here&lt;/a&gt;.&lt;/p&gt;</summary></entry><entry><title>The UX Designer's HTML Cheat Sheet</title><link href="http://livetyping.capcloud.com/blog/the-ux-designers-html-cheat-sheet.html" rel="alternate"></link><published>2012-07-15T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-07-15:blog/the-ux-designers-html-cheat-sheet.html</id><summary type="html">&lt;p&gt;While I was creating my &lt;a href="livetyping.capcloud.com/" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt; course, I realized that HTML5 might look a bit intimidating to some. It has over 120 different tags, which is a lot to get your head round. But in practice, when making interactive HTML prototypes, I only ever use a small subset of these.&lt;/p&gt;

&lt;p&gt;So I made a &lt;a href="livetyping.capcloud.com/stuff/The_UX_Designers_HTML_Cheat_Sheet.pdf"&gt;cheatsheet&lt;/a&gt; containing just these commonly-used elements. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="livetyping.capcloud.com/stuff/The_UX_Designers_HTML_Cheat_Sheet.pdf"&gt;&lt;img src="http://media.tumblr.com/tumblr_m76uk4xtsR1qzb1wu.png" style="-webkit-box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 1); -moz-box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 1); box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 1);" alt="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If you've got any suggestions for improving this cheat sheet, I'm &lt;a href="https://twitter.com/martinpolley"&gt;@martinpolley&lt;/a&gt; on Twitter.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com" title="Livetyping" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt; is an online course that teaches UX designers how to make interactive, clickable prototypes using HTML, CSS, and Javascript.&lt;/p&gt;</summary></entry><entry><title>Should Designers Be Able to Code?—Cennydd Bowles</title><link href="http://livetyping.capcloud.com/blog/should-designers-be-able-to-code-cennydd-bowles.html" rel="alternate"></link><published>2012-06-22T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-06-22:blog/should-designers-be-able-to-code-cennydd-bowles.html</id><summary type="html">&lt;p&gt;In my &lt;a href="http://capcloud.com/post/25357659999/time-to-dump-wireframes"&gt;recent post&lt;/a&gt; about why UXers should learn to prototype in HTML, CSS, and Javascript, I missed out the one person whose opinion prompted me to write the post in the first place.&lt;/p&gt;

&lt;p&gt;In April, Andrew Travers and Matthew Solle &lt;a href="http://london-ia.com/2012/04/london-ia-podcast-with-cennydd-bowles/"&gt;interviewed&lt;/a&gt; Cennydd Bowles for the London IA podcast. They asked him whether he is "a unicorn that codes" and whether he thinks that it is something that's important. Here are the edited highlights of his reply. (In the &lt;a href="http://london-ia.com/audio/LondonIA_CennyddBowles.m4a"&gt;original audio&lt;/a&gt;, this bit is from 17:44–20:18.)&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;I firmly believe that it's a strong benefit to a designer who is working on the web to know HTML and CSS. They're not difficult, they really aren't. Javascript optional. If you know the basics of Javascript, if you know how to, you know, thrash around a bit of jQuery, then that's definitely going to be helpful for prototyping and so on.&lt;/p&gt;

&lt;p&gt;There are two reasons, I think, why I think it's useful to be able to code as a designer in our domain. The first is it gives you an understanding or an appreciation of what's possible. And equally, what might be possible in six months' time, or what might be possible if you're able to kind of poke the developers hard enough and say "Go on—you can do it! Let's find an innovative solution."
&lt;/p&gt;

&lt;p&gt;The flipside of that is also that you know enough to call a developer's bullshit. I love developers and I miss working with them as closely as I used to. But I think they would admit that occasionally they can be a bit obstructive, if they feel they've been left out of the loop or if they're being forced to, you know, do something unreasonable in a silly timescale. And there can be sometimes a strain of the developer community that says "No—can't do that. Nope, not possible. Have to go away and do it again."
&lt;/p&gt;

&lt;p&gt;If you know your stuff, and you say "Well, actually, I've got a jQuery plugin here or something that can do that for you," I've already saved you half the effort, then sometimes that can help realize your design—get past that kind of resistance.
&lt;/p&gt;

&lt;p&gt;The second reason why I think it's desirable to be able to code is simply just because it helps the design process. Particularly for interaction design, I'm a big fan of trying to design within the medium. Now I don't mean design in the browser—that's maybe something we could talk about later—but I'm not a big fan of that, in terms of visual design and layout and so on. But I am a big fan of it in terms of the interaction design—how things respond to input.
&lt;/p&gt;

&lt;p&gt;And I think the sooner you can get that kind of design into its native state, be that on an iPhone, or on a telly, or in a web browser, then you can get a better understanding for whether it feels right, because so much of interaction design is about feel and rhythm and flow. The only way really to get that in front of people is to try and prototype it yourself. And I find HTML prototyping really adds something to what I can do. It helps me make the right design decisions, because I can get those interactions out, I can get them tested, and then I can iterate on those quickly. &lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;hr /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://livetyping.capcloud.com" title="Livetyping" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt; is an online course that teaches UX designers how to make interactive, clickable prototypes using HTML, CSS, and Javascript.&lt;/p&gt;</summary></entry><entry><title>Time to Dump Wireframes</title><link href="http://livetyping.capcloud.com/blog/time-to-dump-wireframes.html" rel="alternate"></link><published>2012-06-18T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2012-06-18:blog/time-to-dump-wireframes.html</id><summary type="html">&lt;p&gt;Most of the work we do as UX designers is either for the web, or related to it in some way. The things that we design are often web sites or web applications. And even if they aren't, web technologies are finding their way into more and more things: native iOS apps, Android apps, even desktop software.&lt;/p&gt;

&lt;p&gt;And the web is a-changin'. Gone are the days when all you needed was a desktop web site or application with a fixed width of 960 pixels. These days, there is a vast range of different devices and screen sizes that you need to think about. And that range is only going to keep getting bigger.&lt;/p&gt;

&lt;p&gt;If you're still using static wireframes to design this stuff, you are doing yourself (not to mention your client, employer, and/or colleagues) a great disservice. Wireframes just aren't up to the job of showing subtle interaction details—the things that make the difference between an application that is a delight to use and one that frustrates and annoys.&lt;/p&gt;

&lt;p&gt;And even if you're using a more sophisticated prototyping tool, you're &lt;i&gt;still&lt;/i&gt; not doing yourself any favors, because these tools don't allow your designs to adapt to the multitude of different screen sizes that are out there.&lt;/p&gt;

&lt;p&gt;Many of the most respected people in our industry have been voicing the opinion for some time now that designers need to be able to code and that prototyping in HTML, CSS, and Javascript is a Good Thing. This article highlights some of the arguments they have been making.&lt;/p&gt;

&lt;p&gt;37signals have been vocal proponents of this approach. In &lt;a href="http://37signals.com/svn/posts/1061-why-we-skip-photoshop"&gt;this post&lt;/a&gt; from back in 2008, Jason Fried explained why they don't make mockups in Photoshop, instead preferring to "go right from a quick paper sketch to HTML/CSS."&lt;/p&gt;

&lt;p&gt;In an &lt;a href="http://johnnyholland.org/2009/11/the-power-of-prototyping-an-interview-with-todd-zaki-warfel/"&gt;interview&lt;/a&gt; with Johnny Holland magazine in 2009, Todd Zaki Warfel, author of "Prototyping: A Practitioner's Guide" gave some compelling arguments for prototyping.&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;I can also give our clients examples of how prototyping enabled us to uncover hidden problems, explore design solutions, and make informed decisions prior to launch that we simply couldn’t have done without prototyping…&lt;/p&gt;

&lt;p&gt;Prototypes are about show and tell. They’re a visual way of communicating the design of a system. First and foremost, they communicate your design…&lt;/p&gt;

&lt;p&gt;In nearly every case in the past three years, prototypes have become our documentation. … It still takes less time to build a prototype and write a 20 page supplemental spec than it would to write a 200 page spec and get consensus on it.&lt;/p&gt;

&lt;p&gt;Any design based on a written spec is a design based on theory. A design based on a prototype is a design based on experience and practice.&lt;/p&gt;

&lt;p&gt;I think another significant insight is that reactions we get to from our prototypes from clients and customers is far beyond anything we were ever able to achieve with wireframes and static Photoshop visual comps.&lt;/p&gt;

&lt;p&gt;… my preferred prototyping tools are paper, pencil, pen and HTML/CSS with JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In 2010, Aza Raskin wrote a &lt;a href="http://www.azarask.in/blog/post/be-a-designer/"&gt;blog post&lt;/a&gt; that also touched on the subject.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The most powerful tool for creating empathy as a designer is prototyping. It meets the rest of the team half-way, is the second most persuasive artifact (the first being a narrated video of the prototype), and gives you a sense of what’s hard and what’s easy to implement. Having thought through the edge-cases and being able to speak an engineer’s language gives you street cred. You don’t need to be a great coder, but you should at least be able to get your idea across in in HTML and Javascript.&lt;/p&gt;

&lt;p&gt;To design is to inspire participation. To do that, you need to be respected. For that, you need to be a designer-coder.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In May of 2011, Jared Spool wrote the &lt;a href="http://www.uie.com/brainsparks/2011/05/31/why-the-valley-wants-designers-that-can-code/"&gt;post&lt;/a&gt; that really opened up the can of worms.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Interestingly, it isn’t the designers who get to decide if coding is a valuable skill. It’s the hiring managers. And right now, based on today’s jobs market, it’s pretty clear where they stand. Many want to hire super designers—designers who can also code.&lt;/p&gt;

&lt;p&gt;… those designers who have proven, practiced coding skills can demand a higher salary than those who don’t.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This provoked a flurry of responses. Matt Nish-Lapidus &lt;a href="http://normativedesign.com/practice/coding-for-designers"&gt;added&lt;/a&gt; to the career and team fit aspects that Jared covered:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I firmly believe that in order to do good design the designer must work with their materials. We can’t continue to just make pictures and flat representations of the things we’re designing. There is a time in the design process for making pictures, but it should be about generating ideas and refining them. There is no way to know what your web site, app, or other software, will actually be like without making a realistic version of a working interface.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Jenifer Tidwell &lt;a href="http://designinginterfaces.com/2011/06/01/designers-that-code-a-response-to-jared-spool/"&gt;agreed&lt;/a&gt; with most of Jared's arguments, but cautioned that "organizations often value coding skills more than design skills. And when that happens, and you have two skillsets, which one do you think will get used more? Yeah."&lt;/p&gt;

&lt;p&gt;Nathan Curtis of EightShapes recorded a &lt;a href="http://www.uie.com/brainsparks/2011/06/03/nathan-curtis-from-pdfs-to-html-prototypes/"&gt;podcast&lt;/a&gt; with UIE around this time, and made a great point about the start-up cost of prototyping.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;… once that start-up cost has been paid, whether it’s a day of prototyping or even a four hour chunk here, a six hour chunk there. Then things start to really move quickly. That’s in part because our ability to re-use and re-factor different things becomes a lot easier. As opposed to, "Well, you want to make the header twice as large." In HTML we just change the height from 50 pixels to 100 pixels.&lt;/p&gt;

&lt;p&gt;But in a wireframe, suddenly we’re caught going into 16 different files, having to move everything else on the page down, and all of those seemingly subtle changes end up costing a lot, too.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Jack Moffett &lt;a href="http://designaday.tumblr.com/post/6971853775/once-upon-a-time"&gt;brought up an important point&lt;/a&gt;—knowing how to code increases your scope of influence.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;So for me, the ability to code is less about earning “cred” and communication, although I’m sure it has helped with both, and more about dependency and scope of influence. I am less dependent on the abilities and attention to detail of the developers, and I now have greater influence over the entire course of a project. As a result, the final product is better.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;These posts also sparked interesting debates on the &lt;a href="http://www.ixda.org/node/30334"&gt;IxDA mailing list&lt;/a&gt; and on &lt;a href="http://www.quora.com/Do-companies-need-designers-who-can-code"&gt;Quora&lt;/a&gt;. Despite a few dissenting voices, most seemed to agree that being able to code prototypes is a valuable skill for a UXer.&lt;/p&gt;

&lt;p&gt;So now you're convinced that you need to be able to prototype in HTML, CSS, and Javascript. But where do you go to learn this stuff? Most of the information available on the web is aimed at web designers. Much of it is irrelevant for our needs.&lt;/p&gt;

&lt;p&gt;A number of workshops have been put together to teach UX designers how to code, but they're only any good if you live close enough to the venue to attend. There are short webinars available that show you the why, but that aren't long enough to go deep on the &lt;i&gt;how&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;Now there is a better alternative. &lt;a href="http://livetyping.capcloud.com" title="Livetyping" onclick="_gaq.push(['_trackEvent', 'Events', 'Go to Livetyping']);"&gt;Livetyping&lt;/a&gt; lets you learn at your own pace, wherever you are. It assumes no previous knowledge of HTML, CSS, or Javascript. And it's tailored to the needs of UX designers. You won't waste any time learning stuff that you don't need. By the time you're done, you'll be able ditch static wireframes and lengthy spec documents and replace them with lovely, shiny prototypes.&lt;/p&gt;

&lt;hr/&gt;

&lt;p&gt;&lt;a style="font-weight: 700" href="http://livetyping.capcloud.com"&gt;Livetyping&lt;/a&gt; is now available! Go check it out.&lt;/p&gt;</summary></entry><entry><title>Do Tools Matter?</title><link href="http://livetyping.capcloud.com/blog/do-tools-matter.html" rel="alternate"></link><published>2011-03-14T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2011-03-14:blog/do-tools-matter.html</id><summary type="html">&lt;p&gt;Michael Angeles has an &lt;a href="http://konigi.com/notebook/have-nice-day"&gt;interesting post&lt;/a&gt; over at konigi.com about how our tools are not important.&lt;/p&gt;

&lt;blockquote&gt;&lt;div&gt;"Don't let anyone tell you that the tools you choose are wrong or inappropriate. Find the right design and keep winning."&lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;This got retweeted a lot. I read it and found myself agreeing. I even retweeted it myself. But since then I have been thinking about this a fair bit. And now I'm not so sure.&lt;/p&gt;

&lt;p&gt;I think he's missing something by only talking about one side of the tool question. The side that deals with working through a design. As he writes, "There are no good or bad tools for finding the right design." But there is another side to this. And that is concerned with what we do with the things we create using our tools.&lt;/p&gt;

&lt;p&gt;And there I think there are not insignificant differences in fit between the actual deliverable and the thing we want it to do for us. As Bill Buxton has said on many occasions "Everything is best for something and worst for something else." And we use the deliverables that we create for several different things: To show to our designer colleagues for the purposes of collaboration and critique. To show to stakeholders, for the purpose of getting buy-in. To share with our developer colleagues so that they will know what to build at the required level of detail.&lt;/p&gt;

&lt;p&gt;A wireframe is good for working with design colleagues. A video walkthrough may be the best thing to show to stakeholders. And a high-fidelity HTML prototype may be better for communicating to developers than an annotated wireframe.&lt;/p&gt;

&lt;p&gt;Maybe I'm stating the obvious here. What do you think?&lt;/p&gt;</summary></entry><entry><title>Better vs Familiar</title><link href="http://livetyping.capcloud.com/blog/better-vs-familiar.html" rel="alternate"></link><published>2010-08-14T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2010-08-14:blog/better-vs-familiar.html</id><summary type="html">&lt;p&gt;While reading #1 &lt;a href="http://shortboredsurfer.com/2010/08/11-principles-of-interaction-design-explained/"&gt;here&lt;/a&gt; (which recommends using familiar user interface paradigms for learnability), I couldn't help thinking about Loewy's MAYA principle (most advanced yet acceptable) and this from Dieter Rams:&lt;/p&gt;

&lt;blockquote&gt;&lt;div&gt;Things which are different simply in order to be different are seldom better, but that which is made to be better is almost always different.
&lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;We need to strike a balance, but would should keep Rams and Loewy in mind as we do so.&lt;/p&gt;</summary></entry><entry><title>My iPod Is Ignoring Me (and I Like It)</title><link href="http://livetyping.capcloud.com/blog/my-ipod-is-ignoring-me-and-i-like-it.html" rel="alternate"></link><published>2010-08-04T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2010-08-04:blog/my-ipod-is-ignoring-me-and-i-like-it.html</id><summary type="html">&lt;p&gt;&lt;img src="http://www.slipperybrick.com/wp-content/uploads/2008/12/ipod-nano.jpg" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;I just noticed that sometimes, my iPod Nano ignores my commands.&lt;/p&gt;

&lt;p&gt;The play/pause button plays or pauses when you press it. A long press of the same button turns the iPod off. But what if my press is not quite long enough?&lt;/p&gt;

&lt;p&gt;Well it turns out that the iPod is designed to ignore my ambiguous command, rather than risk doing the wrong thing. Did I mean "pause"? Or did I mean "switch off"? Interpreting this wrongly could be quite annoying.&lt;/p&gt;

&lt;p&gt;So ignore me. It's a good thing sometimes.&lt;/p&gt;</summary></entry><entry><title>Dusty Digital Albums</title><link href="http://livetyping.capcloud.com/blog/dusty-digital-albums.html" rel="alternate"></link><published>2010-07-21T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2010-07-21:blog/dusty-digital-albums.html</id><summary type="html">&lt;p&gt;I was thinking about how we relate to our music. And specifically how this has changed with the move from physical media (vinyl, tapes, CDs) to digital music that has no physical manifestation.&lt;/p&gt;
&lt;p&gt;In the old days (eight, ten years ago) you would have CDs on shelves. Maybe some old tapes and vinyl albums in a box somewhere too. Your CDs might have been organized alphabetically. Or maybe by genre. Maybe even by color.&lt;/p&gt;
&lt;p&gt;But if you are like me, the stuff that you listened to most often would be the most easily accessible (for me, that means the top shelf). The stuff I listened to less often (or never) would be on the lower shelves. And some would even be in a box in a cupboard or in the attic, gathering dust.&lt;/p&gt;
&lt;p&gt;But these days we have iTunes. And all your albums are there, on an equal footing, as it were. Sure, you can order stuff by number of plays or date last played, but it's not very elegant. (Try ordering by plays and see what a mess it makes of cover flow—it doesn't show an album once, but once per song.)&lt;/p&gt;
&lt;p&gt;Maybe we could take a cue from the physical world, as Apple is urging us to do when it comes to designing iPad apps. Perhaps cover flow could have shelves. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/sagipolley/4813970763/" title="iTunes + shelves by sagipolley, on Flickr"&gt;&lt;img src="http://farm5.static.flickr.com/4101/4813970763_e52c5faa7f.jpg" width="500" height="375" alt="iTunes + shelves" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The top shelf would contain the albums you have listened to the most, but somehow taking time into account too. An album that I listened to continuously for two months three years ago but have hardly listened to since would drop down to the second or third shelf. Maybe an album like this would accumulate a layer of dust, which I could choose to blow off now and again by listening to the album.&lt;/p&gt;
&lt;p&gt;And why limit it to music? Why not books as well? Why not movies? Why not games? And what about documents? Spreadsheets even?&lt;/p&gt;</summary></entry><entry><title>Transitions and States</title><link href="http://livetyping.capcloud.com/blog/transitions-and-states.html" rel="alternate"></link><published>2010-03-24T00:00:00+00:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2010-03-24:blog/transitions-and-states.html</id><summary type="html">&lt;p&gt;Wow! &lt;a href="http://www.amazon.com/Sketching-User-Experiences-Interactive-Technologies/dp/0123740371/"&gt;Buxton&lt;/a&gt; was right. The transitions are just as important as the states (if not more so).&lt;/p&gt;
&lt;p&gt;As I play around with jQuery (+HTML + CSS, obviously) as a prototyping tool, I'm finding that I really need to play around with the details of the transitions to make it obvious what is happening (something that it is hard to do in my head, for me at least). &lt;/p&gt;
&lt;p&gt;For example, in my prototype I have a thing where you can add new rows (like adding attachments in Gmail). But I'm constrained for vertical space—there's only space for four rows. So I have set it up so that when there are more than four rows, this part of the screen gets a scroll bar.&lt;/p&gt;
&lt;p&gt;Having a newly-added row simply appear works fine when you have unlimited space, but with scrolling it gets awkward. What happens if the new row is out of view? Well, we should automatically scroll so that this new item is visible. But this kind of sudden transition is a bit jarring and disorienting.&lt;/p&gt;
&lt;p&gt;I found that animating the addition of the row and the automatic scrolling makes it much more clear what just happened, and where things have been moved to. (I must just stress that this is animation done sparingly and not for its own sake.)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;What did I learn?&lt;/b&gt; That when you're at the prototyping stage, you really need to roll your sleeves up and get your hands dirty to find out exactly how to best handle subtle transitions like this.&lt;/p&gt;</summary></entry><entry><title>Fitts's Law for Asymmetric Targets (Like Tabs)</title><link href="http://livetyping.capcloud.com/blog/fittss-law-for-asymmetric-targets-like-tabs.html" rel="alternate"></link><published>2009-06-29T00:00:00+01:00</published><author><name>Martin Polley</name></author><id>tag:livetyping.capcloud.com,2009-06-29:blog/fittss-law-for-asymmetric-targets-like-tabs.html</id><summary type="html">&lt;p&gt;Since I started putting together my entry for the Mozilla Labs “Reinventing Tabs” challenge, I have been thinking about &lt;a href="http://en.wikipedia.org/wiki/Fitts%27s_law"&gt;Fitts’s Law&lt;/a&gt;. Here’s what I have been thinking: does the shape of the click target affect the ease of acquisition?&lt;/p&gt;

&lt;p&gt;More simply put, is it easier or more difficult to acquire a rectangular target that is (say) three times as wide as it is high than a square target of the same area?&lt;/p&gt;

&lt;p&gt;And also, does the orientation of the rectangle make it easier or harder to acquire? (That is, does it make any difference whether the rectangle’s long side or short side is facing towards the pointer?)&lt;/p&gt;

&lt;p&gt;Why does this matter? Well, if you have a bunch of tabs stacked up the left side of the screen (as in my entry), the answer could mean that they are easier or harder to click on than regular tabs of the same size that are strung out horizontally above the content area.&lt;/p&gt;

&lt;p&gt;And now I have found a &lt;a href="http://portal.acm.org/citation.cfm?doid=642646"&gt;paper&lt;/a&gt; that contains the answer. At least, it contains the answer to the second part of my question (about orientation).&lt;/p&gt;

&lt;p&gt;If you want to read it, go ahead, but here is the money quote:&lt;/p&gt;

&lt;p&gt;&lt;i&gt;... when possible graphical widgets should be extended along&lt;br /&gt;

the more frequent movement direction. ... horizontally enlongated widgets, which are often due to the labeling in English words, should be placed on the left or right rather than the top or bottom edge of the desktop interface.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;But there is a caveat:&lt;/p&gt;

&lt;p&gt;&lt;i&gt;However, the average horizontal movement distance is somewhat longer due to the landscape display geometry in most computers.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;In plain English, tabs that are stacked at the side are easier to acquire than ones of the same size and shape along the top. But because monitors (especially modern wide-screen ones) are wider than they are high, this advantage may be mitigated (or even outweighed) by the extra (average) distance that the pointer must cover.&lt;/p&gt;</summary></entry></feed>