<?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>Big Red Tin &#187; xhtml</title>
	<atom:link href="http://bigredtin.com/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://bigredtin.com</link>
	<description>Thoughts about the web and business from the large pantry</description>
	<lastBuildDate>Tue, 15 Nov 2011 23:15:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Forms are forms, not lists</title>
		<link>http://bigredtin.com/2010/forms-are-forms-not-lists/</link>
		<comments>http://bigredtin.com/2010/forms-are-forms-not-lists/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 00:00:04 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[tabels]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://bigredtin.com/?p=908</guid>
		<description><![CDATA[I have often seen HTML forms coded as part of a lists, including from some publications and people I highly respect. I believe this to be incorrect.]]></description>
			<content:encoded><![CDATA[<p>Respecting someone or their publication does not prevent one from disagreeing with them. In fact, I think to nod along saying &#8220;you&#8217;re so right, <em>OMG, you are so right!</em>&#8221; is less respectful than listening to and considering what they say. That dealt with, allow me to disagree with some people I respect.</p>
<p>Frequently, I see HTML forms coded as lists. I&#8217;ve seen this in code by some publications and people I highly respect, such as on <a title="A List Apart: Forward thinking form validation" href="http://www.alistapart.com/articles/forward-thinking-form-validation/">A List Apart</a>. The code may be:</p>
<pre><code>&lt;form action="example.php" method="post"&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;label for="itemOne"&gt;Item One&lt;/label&gt;
    &lt;input id="itemOne" name="itemOne" /&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;label for="itemTwo"&gt;Item Two&lt;/label&gt;
    &lt;input id="itemTwo" name="itemTwo" /&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;/form&gt;</code></pre>
<p><span id="more-908"></span></p>
<p>The method remains much the same if using unordered or definition lists. The argument for using this method is that forms are a list of fields. A variation is to use a table, arguing that forms are a table of labels and inputs.</p>
<p>I don&#8217;t believe either argument is correct, I believe forms are a series of:</p>
<ul>
<li><code>fieldset</code>s;</li>
<li><code>legend</code>s;</li>
<li><code>label</code>s;</li>
<li><code>button</code>s;</li>
<li><code>input</code>s, <code>select</code>s, <code>option</code>s, etc.</li>
</ul>
<p>All semantic meaning for forms should come from the appropriate <abbr>HTML</abbr> tags. If you want to use other elements as hooks for styling, they should be semantically meaningless <code>span</code>s and <code>div</code>s.</p>
<p>I consider the arguments cited above as justifications for making styling easier. Without block elements, forms <em>can</em> be difficult to style. Rather than wrapping each input pair with a list item, I wrap them with <code>div</code>s.</p>
<pre><code>&lt;form action="example.php" method="post"&gt;
&lt;div&gt;
  &lt;label for="itemOne"&gt;Item One&lt;/label&gt;
  &lt;input id="itemOne" name="itemOne" /&gt;
&lt;/div&gt;
&lt;/form&gt;</code></pre>
<p>Wrapping each input pair in a <code>div</code> is just as lazy as wrapping each input pair in a list item. However, as <code>div</code>s are meaningless, it doesn&#8217;t require bending of semantics to justify my actions.</p>
<p>There is a valid argument for an element to define an input pair but I think such an element is redundant. We already have a method for defining the pairing of labels with their inputs. The &#8220;<code>for</code>&#8221; attribute within the <code>label</code> pairs with the &#8220;<code>id</code>&#8221; attribute of the associated <code>input</code>.</p>
<p>If you wrap your forms in a list or a table, look carefully at what you are doing. Ask yourself; is what you are doing semantically valid or are you lazily trying to make styling easier? As context for your consideration, ask yourself if a whole page of text is really just a list of paragraphs.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2010/forms-are-forms-not-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Valid Isn&#8217;t Best Practice</title>
		<link>http://bigredtin.com/2010/valid-isnt-best-practice/</link>
		<comments>http://bigredtin.com/2010/valid-isnt-best-practice/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 00:30:09 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[input types]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://bigredtin.pressgiant.net/?p=512</guid>
		<description><![CDATA[Not long ago, on the <a title="@soupgiant" href="http://twitter.com/soupgiant">@soupgiant</a> account, I tweeted "Vaild html / css doesn't indicate your code is best practice; it may even indicate the opposite. #css3". Neither the xHTML nor the CSS on this site validates, we consider it to observe best practices.]]></description>
			<content:encoded><![CDATA[<p>Not long ago, on the <a title="@soupgiant" href="http://twitter.com/soupgiant">@soupgiant</a> account, I tweeted:</p>
<p><a href="http://twitter.com/soupgiant/status/13047478686"><img class="aligncenter size-full wp-image-513" title="Valid HTML / CSS - Tweet" src="http://bigredtin.com/files/2010/06/valid-tweet.png" alt="'Vaild html / css doesn't indicate your code is best practice; it may even indicate the opposite. #css3.'" width="610" height="197" /></a></p>
<p>While neither the xHTML nor the CSS on this site validates, we consider it to observe best practices.<span id="more-512"></span>The <a title="HTML fails validation" href="http://validator.w3.org/check?verbose=1&amp;uri=http%3A%2F%2Fbigredtin.com%2Fbehind-the-websites%2Fvalid-isnt-best-practice%2F">HTML fails validation</a> due to the following problems:</p>
<ul>
<li>One of the WordPress plugins we use on the site inserts JavaScript with unencoded ampersands in the URL. This isn’t a best practice but unfortunately it’s beyond our control;</li>
<li>The <code>&lt;html&gt;</code> tag has a class attribute;</li>
<li>Two of the fields in our comment form have an unrecognised value for the <code>type</code> attribute.</li>
</ul>
<p>The <a title="CSS fails validation" href="http://jigsaw.w3.org/css-validator/validator?profile=css21&amp;warning=0&amp;uri=http%3A%2F%2Fbigredtin.com%2Fbehind-the-websites%2Fvalid-isnt-best-practice%2F">CSS fails validation</a> due to the following problems:</p>
<ul>
<li>We load the YUI 2.7.0 CSS reset, base and fonts files from the Google AJAX API servers. These files contain star hacks for IE targeting;</li>
<li>We use browser extensions to implement CSS rounded corners and rgba backgrounds;</li>
<li>Until I started writing this post, we styled a heading with <code>font-size: 145.4545<strong>%%</strong></code>.</li>
</ul>
<p>That last one was a typo, and has since been fixed.</p>
<h4>Justifying the invalid CSS</h4>
<p>We’d prefer to avoid <a href="http://www.dynamicsitesolutions.com/css/filters/star-html/" title="* html ("Star HTML") CSS Hack">the star hacks</a> in YUI’s CSS. If we self-hosted the files they’d be moved into the CSS files with our other IE specific hacks and targeted with conditional comments. Our compromise is to load the files from Google’s server with the aim that our site will load faster. Either the user will already have the files in their browser cache, or the user will load the files from a closer, faster server on Google’s global network.</p>
<p>The W3C’s CSS validator also screams at us for using CSS3 browser extensions and rgba backgrounds. While the browser manufacturers are still trying out their implementations of the new specs, we’ve no choice but to use these for the time being. As they iron out their implementations and move them over to the specified properties we can remove these. CSS3 junkies could probably have skipped this paragraph.</p>
<h4>Justifying the invalid HTML</h4>
<p>This site uses xHTML. We’ve discussed using HTML5 but WordPress, which powers Big Red Tin, isn’t ready to drop the <code>/&gt;</code> from self closing tags. At this stage the HTML5 spec is too dynamic for our liking. Have a late afternoon snooze and the spec is likely to change during your siesta.*</p>
<p>Depending on your point of view, and even what you are coding, it is either fortunate or unfortunate that browsers don’t always follow specs to the letter. We’ve taken advantage of that to throw one of the biggest advantages of HTML5 into our xHTML. In our comments form, we’ve used HTML5 type attributes for two of our fields: <code>&lt;input type=”email” … /&gt;</code> and <code>&lt;input type=”url” … /&gt;</code>.</p>
<p>In browsers that do not support these types of inputs the type falls back to the standard of <code>type=”text”</code>. In browsers that do support input types of email and url, it prevents the user from entering an erroneous value. For users of the iPhone or iPad, a special keyboard is presented to make entering an email address or URL easier. In browsers that support the new HTML5 input types, the behaviour is identical regardless of the doc type.</p>
<div id="attachment_514" class="wp-caption aligncenter" style="width: 490px"><img class="size-full wp-image-514" title="iPhone keyboard for email input type" src="http://bigredtin.com/files/2010/06/valid-iphone2.png" alt="" width="480" height="320" /><p class="wp-caption-text">The iPhone displays different keyboards for HTML5 input types</p></div>
<p>It may be breaking some of the rules of standards. To me it&#8217;s not so much about standards as best practices and giving the user the best possible experience on a site, even if this means breaking the rules sometimes.</p>
<p>Don&#8217;t take that to mean that we&#8217;ll be reverting to table layouts, or insert code such as <code>&lt;a href="#"&gt;&lt;h1&gt;Heading&lt;/h1&gt;&lt;/a&gt;</code> into our xHTML. It&#8217;s bending the rules around the edges, which is no different to using vendor prefixes to make use of CSS3.</p>
<p>*Yes. I know this is an unfair characterisation. A lot of very important people, with very important lawyers, are working hard to change this.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2010/valid-isnt-best-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I will not be dropping support for IE6</title>
		<link>http://bigredtin.com/2009/not-dropping-ie6/</link>
		<comments>http://bigredtin.com/2009/not-dropping-ie6/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 01:30:58 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[quirks mode]]></category>
		<category><![CDATA[standards mode]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://peterwilson.cc/?p=97</guid>
		<description><![CDATA[Increasingly I'm reading of web developers deciding to drop IE6 from their list of supported browsers, usually, because of its creative interpretation of CSS standards, besides IE7 is over a year old, and, IE8 about to be released.]]></description>
			<content:encoded><![CDATA[<p>Increasingly I&#8217;m reading of web developers deciding to drop <abbr title="Internet Explorer 6">IE6</abbr> from their list of supported browsers, usually, because of its <em>creative</em> interpretation of CSS standards, besides <abbr title="Internet Explorer 7">IE7</abbr> is over a year old, and, <abbr title="Internet Explorer 8">IE8</abbr> about to be released.</p>
<p>I&#8217;ve decided to continue support for <abbr title="Internet Explorer 6">IE6</abbr> as it&#8217;s still in wide use &#8211; especially in corporate environments &#8211; and, I don&#8217;t think it needs to take a lot of work to develop for. I&#8217;ll say that again, I don&#8217;t think <abbr title="Internet Explorer 6">IE6</abbr> is as bad it&#8217;s sometimes made out to be.</p>
<p><span id="more-97"></span><abbr title="Internet Explorer 6">IE6</abbr> is the difficult child of the browser family &#8211; but like most difficult children, with the right tools it can be made to behave. <abbr title="Internet Explorer 7">IE7</abbr> is better behaved than <abbr title="Internet Explorer 6">IE6</abbr>, but let&#8217;s not fool ourselves, it&#8217;s not the glowing example of a perfect browser, and requires hacks of its own.</p>
<h4>Standards Mode</h4>
<p>The best tool to reduce <abbr title="Internet Explorer 6">IE6</abbr>&#8216;s development time is to move the browser out of <a title="Quirks Mode" href="http://en.wikipedia.org/wiki/Quirks_mode">quirks mode</a> and into standards mode using an appropriate DOCTYPE, and, leaving off the XML declaration; I code in XHTML Strict, so my files begin:</p>
<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;</code></pre>
<p>In standards mode the browser will inherit font styles within tables, use the W3C box model and vertical alignment defaults.</p>
<h4>Comments</h4>
<p>Create a standard comment format for your main CSS file which you can use when you know you&#8217;re going to have to write a hack for the <abbr title="Internet Explorer 6">IE6</abbr> style sheet, such as <code>/*HACK ie6 ... */;</code> rather than flicking between your main and <abbr title="Internet Explorer 6">IE6</abbr> style sheets during standards development, you can just search for hack comments during non-standards development.</p>
<pre><code>#someDiv {
min-height: 300px; /* HACK ie6 - height: 300px */
float: left; /* HACK ie6 - 3px jog (adjacent), zoom: 1 */
}</code></pre>
<h4>Surprises</h4>
<p>Once you&#8217;ve specified the DOCTYPE, and, repaired known hacks, <abbr title="Internet Explorer 6">IE6</abbr> is likely to surprise you with a few more creative problems, positioning, an extra few pixels here and there and other little tricks; but by ruling out the obvious in advanced, overall debugging will become less time consuming.</p>
<p>As I said above, <abbr title="Internet Explorer 7">IE7</abbr> requires its own set of hacks. If browser specific debugging is required anyway, I don&#8217;t think it&#8217;s overly time consuming to continue support for <abbr title="Internet Explorer 6">IE6</abbr>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2009/not-dropping-ie6/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Links opening in new windows</title>
		<link>http://bigredtin.com/2008/links-opening-in-new-windows/</link>
		<comments>http://bigredtin.com/2008/links-opening-in-new-windows/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 07:23:57 +0000</pubDate>
		<dc:creator>Josh Kinal</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://soupgiant.mu.pwcc.cc/?p=158</guid>
		<description><![CDATA[Yes I have firm views. Take that as a given. Since long before I could code, however, I've always been critical of websites that open their links in another window.

Back in the days before browser tabs, a whole new window would open either above or below the window you were currently working on. It was terrible and unstoppable.]]></description>
			<content:encoded><![CDATA[<p>Yes I have firm views. Take that as a given. Since long before I could code, however, I&#8217;ve always been critical of websites that open their links in another window.</p>
<p>Back in the days before browser tabs, a whole new window would open either above or below the window you were currently working on. It was terrible and unstoppable. People kept up this practice because they thought it was a good way to get a user to keep their website open. It was seen as an audience retention device.</p>
<p>The browser belongs to the user. The website belongs to the creator. The website should not perform any actions on the browser that the user cannot control. That should almost always be the situation.</p>
<p>By keeping things uniform we can set expectations with the user that links will always open in the same window and if they want to open the link in another window they have options like middle-clicking or context-menus.</p>
<p>Of course there are exceptions to this. Banks often open up a separate window for logging in and doing actual banking because they can ensure an extra level of security if, when logging out, they can close the whole window.</p>
<p>The best way to keep a user coming back to your site is to have compelling content. They can always come back by pressing the back button if they meant to open in a new window but forgot.</p>
<p>Another problem with opening links in new windows comes with reporting. Reporting and analytics is another post for another time but many people still use the metrics of a visiting time. The time a user stays connected to a site become a dirty statistic if they actually navigate away from the page but it stays open in a seperate browser window. The website owner doesn&#8217;t really have an indication of how useful/entertaining/compelling their site is, all they know is they could fool some script into thinking that people were still there even when they weren&#8217;t.</p>
<p>These are just some thoughts. Many theories abound in any workplace so I&#8217;m sure yours has some too. Feel free to let me know in the comments.</p>
<p><em>UPDATED: This post was inspired by a discussion, in turn inspired by an article in <a href="http://www.smashingmagazine.com/2008/07/01/should-links-open-in-new-windows/">Smashing Magazine</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2008/links-opening-in-new-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

