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

<channel>
	<title>James Wilding&#039;s Weblog &#187; html</title>
	<atom:link href="http://jameswilding.net/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameswilding.net</link>
	<description>Buddhist businessman, freelance web developer</description>
	<lastBuildDate>Sun, 05 Sep 2010 09:38:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Hello HTML5</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2010%2F03%2F05%2Fhello-html5%2F&amp;seed_title=Hello+HTML5</link>
		<comments>http://jameswilding.net/2010/03/05/hello-html5/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 13:05:20 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=534</guid>
		<description><![CDATA[Reasons to read the HTML5 specs]]></description>
			<content:encoded><![CDATA[<p>HTML has just reached a major milestone with <a href="http://lists.w3.org/Archives/Public/public-html/2010Mar/0137.html">the publication of six working drafts</a> of the markup language&#8217;s specification (<a href="http://daringfireball.net/linked/2010/03/04/html5-drafts">via</a>).</p>
<p>Despite being technical documents, these specs also make for interesting reading if you&#8217;re at all curious about the evolution of the web&#8217;s mother tongue. A great place to start is <a href="http://www.w3.org/TR/html5/introduction.html#history-1">the history of HTML</a> in the main HTML5 spec: there&#8217;s some detail here about how HTML5 came to be, as well as some brief information about the aborted XHTML2 effort. This section helps you understand why HTML5 exists at all.</p>
<p>Next, you&#8217;ll want to know what elements are available for HTML5 authors: for this, start with &#8220;<a href="http://www.w3.org/TR/html5/semantics.html#semantics">The elements of HTML</a>&#8221; (again, in the main spec). This section lists HTML5&#8242;s tags and explains how to use them; new tags such as section, nav, article, and aside are covered here.</p>
<p>As a web developer, you&#8217;re going to be writing HTML5, so also read &#8220;<a href="http://www.w3.org/TR/html5/syntax.html">The HTML syntax</a>&#8221; for more detail on how HTML5 documents should be structured. The section called &#8220;<a href="http://www.w3.org/TR/html5/syntax.html#writing">Writing HTML documents</a>&#8221; is especially useful, and includes information on the doctype (previously important but now &#8220;a mostly useless, but required, header&#8221;).</p>
<p>If you&#8217;re put off by technical language, be reassured that the spec makes an effort to be readable by humans too: after the spec for doctype syntax, for example, we get this summary:</p>
<blockquote><p>In other words, <code>&lt;!DOCTYPE HTML&gt;</code>, case-insensitively</p></blockquote>
<p>Despite all the HTML5 websites out there, I think it&#8217;s really important for developers to go to the source and read the original spec: it&#8217;s surprisingly accessible, and even glancing at it will help you understand where HTML5 is coming from.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2010/03/05/hello-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write better CSS</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2009%2F08%2F14%2Fhow-to-write-better-css%2F&amp;seed_title=How+to+write+better+CSS</link>
		<comments>http://jameswilding.net/2009/08/14/how-to-write-better-css/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:00:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=187</guid>
		<description><![CDATA[Well-written CSS is easier to read, easier to maintain, and generally less of a headache. But the key to better CSS isn&#8217;t in brackets and line breaks: it&#8217;s actually all about the HTML. CSS what-now? We all know about Cascading Style Sheets. The W3C calls CSS: a simple mechanism for adding style (e.g. fonts, colors, [...]]]></description>
			<content:encoded><![CDATA[<p>Well-written CSS is easier to read, easier to maintain, and generally less of a headache. But the key to better CSS isn&#8217;t in brackets and line breaks: it&#8217;s actually all about the HTML.</p>
<h3><span id="more-187"></span></h3>
<h3 style="font-size: 1.17em;">CSS what-now?</h3>
<p>We all know about Cascading Style Sheets. The W3C <a href="http://www.w3.org/Style/CSS/">calls CSS</a>:</p>
<blockquote><p>a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.</p></blockquote>
<p>A nice, clear definition which puts the focus on the important distinction between styles and documents.</p>
<p>Now, you already know not to put styling in your HTML (unless it&#8217;s within <code>style</code> attributes): <code>font</code>, <code>link</code>, <code>vlink</code> and other tags which directly styled documents have gone the way of tables-for-layout &#8212; keeping these anachronisms out of your markup will help you no end. But more than that, well-structured HTML will help you to write cleaner, more concise CSS.</p>
<h3>Let your markup lead the way</h3>
<p>A lot of people, when marking up a blog, will do something like this:</p>
<p>[html]<br />
&lt;html&gt;<br />
&lt;body&gt;</p>
<p>  &lt;h1&gt;My Cool Blog&lt;/h1&gt;</p>
<p>  &lt;div class=&quot;article&quot;&gt;<br />
    &lt;h2 class=&quot;title&quot;&gt;Lorum Ipsum&lt;/h2&gt;<br />
    &lt;p class=&quot;meta&quot;&gt;posted by John, 10/8/09&lt;/p&gt;</p>
<p>    &lt;div class=&quot;body&quot;&gt;<br />
      &lt;p&gt;&#8230;&lt;/p&gt;<br />
    &lt;/div&gt;<br />
  &lt;/div&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p>All well and good (and nicely semantic), but a lot of those classes aren&#8217;t actually necessary for CSS: it&#8217;s easy to stuff your markup full of classes and IDs, but in many cases the structure of the document itself will allow you to apply style rules just as easily.</p>
<h3>Look Ma! No classes!</h3>
<p>Try this on for size:</p>
<p>[html]<br />
&lt;html&gt;<br />
&lt;body&gt;</p>
<p>  &lt;h1&gt;My Cool Blog&lt;/h1&gt;</p>
<p>  &lt;div&gt;<br />
    &lt;h2&gt;Lorum Ipsum&lt;/h2&gt;<br />
    &lt;p&gt;posted by John, 10/8/09&lt;/p&gt;</p>
<p>    &lt;div&gt;<br />
      &lt;p&gt;&#8230;&lt;/p&gt;<br />
    &lt;/div&gt;<br />
  &lt;/div&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p>Now maybe your CSS brain is screaming &#8216;NO!&#8217;, but this will work just as well when it comes to CSS:</p>
<p>[css]<br />
h1 {<br />
  font: 20px helvetica;<br />
}</p>
<p>body &gt; div {<br />
  border-top: 1px solid #000;<br />
}</p>
<p>/* article titles */<br />
body &gt; div &gt; h2 {<br />
  color: red;<br />
}</p>
<p>/* article meta-data */<br />
body &gt; div &gt; p {<br />
  color: #ccc;<br />
}</p>
<p>body &gt; div &gt; div {<br />
  /* CSS for article bodies here */<br />
}<br />
[/css]</p>
<p>Maybe not the most attractive blog in the world, but those selectors work! See how we&#8217;re using descendant selectors to reflect the structure of our HTML? No need for classes or IDs, and the well-structured markup will give future developers a clue as to the relative importance of information inside the HTML document, too.</p>
<h3>In conclusion&#8230;</h3>
<p>Thinking carefully about the structure of information in your HTML will help your write clear, concise, well-structured markup <em>and</em> CSS. Try it!</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2009/08/14/how-to-write-better-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bowline: Desktop Apps with Ruby</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2009%2F08%2F07%2Fbowline%2F&amp;seed_title=Bowline%3A+Desktop+Apps+with+Ruby</link>
		<comments>http://jameswilding.net/2009/08/07/bowline/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 18:13:21 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=149</guid>
		<description><![CDATA[Bowline is a Ruby GUI framework that allows you to build desktop applications using Ruby, HTML, CSS, and JQuery. Sounds interesting? I thought so too! Bowline works in combination with Titanium, which lets you: Use Web technologies to create rich applications for Windows, Mac and Linux from a single code base. I think Bowline looks [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://leadthinking.com/191-bowline-a-ruby-gui-framework">Bowline</a> is a Ruby GUI framework that allows you to build desktop applications using Ruby, HTML, CSS, and JQuery. Sounds interesting? I thought so too!</p>
<p><span id="more-149"></span></p>
<p>Bowline works in combination with <a href="http://www.appcelerator.com/products/titanium-desktop/">Titanium</a>, which lets you:</p>
<blockquote><p>Use Web technologies to create rich applications for Windows, Mac and Linux from a single code base.</p></blockquote>
<p>I think Bowline looks awesome. Desktop apps using Ruby, WebKit, HTML 5 &#8212; all the best stuff if you&#8217;re a web development geek like me.</p>
<p>It&#8217;s difficult to summarise how Bowline works (although it&#8217;s a little like <a href="http://rubyonrails.org/">Rails</a>), so I recommend that you read <a title="Bowline - A Ruby GUI Framework" href="http://leadthinking.com/191-bowline-a-ruby-gui-framework">the author&#8217;s blog post introducing the framework</a>. Let&#8217;s hope Bowline grows into a stable, mature framework that does for desktop apps what Rails has done for the web.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2009/08/07/bowline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unsung heros of HTML</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2009%2F06%2F16%2Funsung-heros-of-html%2F&amp;seed_title=Unsung+heros+of+HTML</link>
		<comments>http://jameswilding.net/2009/06/16/unsung-heros-of-html/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 09:49:56 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=100</guid>
		<description><![CDATA[I&#8217;ve just bought and read HTML &#38; XHTML Pocket Reference. It&#8217;s a useful book that&#8217;s taught me a few new HTML tags (and I thought I knew them all!). Whatever you think of semantic HTML, these are essential for any die-hard web geek ;-) &#60;samp&#62;...&#60;/samp&#62; Sample output from programs and scripts. I&#8217;d use this rather [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just bought and read <em><a title="HTML Pocket Reference on Amazon.co.uk" href="http://www.amazon.co.uk/HTML-XHTML-Pocket-Reference-OReilly/dp/0596527276/">HTML &amp; XHTML Pocket Reference</a><span style="font-style: normal;">. It&#8217;s a useful book that&#8217;s taught me a few new HTML tags (and I thought I knew them all!). </span></em></p>
<p><em><span style="font-style: normal;">Whatever you think of <a href="http://jameswilding.net/2009/06/05/pragmatism-bad-markup/">semantic HTML</a>, these are essential for any die-hard web geek ;-)</span></em></p>
<h3><code>&lt;samp&gt;...&lt;/samp&gt;</code></h3>
<p>Sample output from programs and scripts. I&#8217;d use this rather than &lt;code&gt; (or within &lt;code&gt; tags) to indicate that the content was an example output of, say, a ruby script.</p>
<blockquote><p><code>$ ruby random_password.rb # =&gt; &lt;samp&gt;mSeq15H3j8&lt;/samp&gt;</code></p></blockquote>
<h3><code>&lt;dfn&gt;...&lt;/dfn&gt;</code></h3>
<p>Use to indicate the defining instance of the enclosed term (probably the first time you use a special name or acronym):</p>
<blockquote><p>&#8230;The British Broadcasting Corporation (<code>&lt;dfn&gt;</code>BBC<code>&lt;/dfn&gt;</code>)&#8230;</p></blockquote>
<h3><code>&lt;button&gt;...&lt;/button&gt;</code></h3>
<p>Replaces your boring old form submit button with something classier, using an image:</p>
<blockquote><p><code>&lt;button name="submit" id="submit"&gt;</code><br />
<code> &lt;img src="images/submit_button.png" /&gt;</code><br />
&lt;/button&gt;</p></blockquote>
<h3><code>&lt;base /&gt;</code></h3>
<p>Use in a document&#8217;s &lt;head&gt; to define the base path for all relative URLs in the document. This could be useful if you&#8217;re writing a blog, want all your links to start with articles, and are lazy:</p>
<blockquote><p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;base href=&#8221;/articles/&#8221; /&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;!&#8211; links to /articles/how-to-make-millions &#8211;&gt;<br />
&lt;a href=&#8221;how-to-make-millions&#8221;&gt;read this&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Lastly, did you know that the <code>&lt;address&gt;</code> tag isn&#8217;t meant to be used for any just address? I didn&#8217;t. It&#8217;s actually intended for marking up the address of the author of an HTML document. I wonder how many people follow that convention :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2009/06/16/unsung-heros-of-html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pragmatism &amp; Bad Markup</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2009%2F06%2F05%2Fpragmatism-bad-markup%2F&amp;seed_title=Pragmatism+%26amp%3B+Bad+Markup</link>
		<comments>http://jameswilding.net/2009/06/05/pragmatism-bad-markup/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 17:25:54 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://new.jameswilding.net/?p=19</guid>
		<description><![CDATA[I&#8217;ve been reading a lot recently about semantic markup: when to use it, why to use it, whether to use it at all. For many people, semantics in HTML is a holy cow &#8212; no matter what, the argument goes, you should never shirk your responsibility to use markup that adds meaning to your content. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading a lot recently about semantic markup: when to use it, why to use it, whether to use it at all. For many people, semantics in HTML is a holy cow &#8212; no matter what, the argument goes, you should never shirk your responsibility to use markup that adds meaning to your content.</p>
<p>This is something I broadly agree with, but: sometimes it&#8217;s OK to use &#8216;bad&#8217; markup. If you&#8217;re just creating something for your own private use, or are prototyping some HTML that you&#8217;re going to flesh out later, then the semantics of what you&#8217;re writing really don&#8217;t matter. As long as you can come back later and use &#8216;better&#8217; markup when it matters, it&#8217;s OK.</p>
<p>Note the &#8216;can&#8217; in my last sentence. You need to <em>know</em> that you&#8217;re going to be able to replace your tag soup with something beautiful at a later date, before it matters; otherwise you&#8217;re creating a code debt that you won&#8217;t be able to replay. It&#8217;s like the difference between borrowing a little money which you can afford to pay back later, and borrowing too much.</p>
<p>So when does &#8216;bad&#8217; code start to matter? For me, the answer to this question comes in two parts. First, bad code starts to matter when the code becomes a problem for your users &#8212; when it starts causing accessibility issues, for instance. Second, when bad code starts to create problems for you &#8212; maintenance problems for instance, or problems understanding your past intentions &#8212; then the code matters. This is when you should stop, and rewrite.</p>
<p>HTML is an easy language to learn, and a difficult one to master. Like Ruby, it gives you more than one way of doing things; this is both a blessing and a curse. Because HTML allows you to markup code &#8216;wrongly&#8217;, we should always be careful to manage our code debts and learn to respect our own limits. A little borrowing against future effort it OK; an unmanageable debt of badly written, meaningless code is not.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2009/06/05/pragmatism-bad-markup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
