<?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>Cyclone Ranger &#187; semantic markup</title>
	<atom:link href="http://www.cycloneranger.com/tag/semantic-markup/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cycloneranger.com</link>
	<description>&#34;I see patterns&#34; - Ernie Hacks</description>
	<lastBuildDate>Fri, 08 Jul 2011 02:14:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Moderating semantic HTML zealotry</title>
		<link>http://www.cycloneranger.com/2009/05/moderating-semantic-html-zealotry.html</link>
		<comments>http://www.cycloneranger.com/2009/05/moderating-semantic-html-zealotry.html#comments</comments>
		<pubDate>Thu, 07 May 2009 22:14:25 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[web design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[semantic markup]]></category>

		<guid isPermaLink="false">http://www.cycloneranger.com/?p=259</guid>
		<description><![CDATA[I&#8217;ve recently the been letting go of my blind faith in page-wide semantic HTML. Today I found this old post from Jeff Croft describing the myth of content and presentation separation in HTML and CSS, which provides a realistic layman&#8217;s take on the situation: semantic HTML is too hard. While I agree with that sentiment [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently the been letting go of my blind faith in page-wide semantic HTML. Today I found <a href="http://jeffcroft.com/blog/2007/aug/09/myth-content-and-presentation-separation/">this old post from Jeff Croft describing <strong>the myth of content and presentation separation</strong></a> in HTML and CSS, which provides a realistic layman&#8217;s take on the situation: semantic HTML is too hard.</p>
<p>While I agree with that sentiment 100%, I&#8217;ve also been wondering <em>why</em> semantic markup is too hard and realized it&#8217;s because the semantic HTML paradigm is too weak to support a modern web experience.</p>
<p>I use <a href="www.blueprintcss.org/">Blueprint CSS</a> on <a href="http://www.dubandreggae.com/">Dub and Reggae</a> (because I use a hacked <a href="http://themasterplan.in/tma">Morning After WordPress theme</a> for the site), and it&#8217;s smashing my face into the brick wall between content and presentation.</p>
<p>Blueprint likes to do things like throw a date string into a div with a class of <code>span-14</code>. Those classes become layout macros, allowing a designer to create and edit a page design very quickly. (Jeff Croft is one of Blueprint&#8217;s progenitors.)</p>
<p>But those <strong>display-rules-as-classes are a bad bad bad commingling of content and markup</strong>, according to a semantic HTML purist. Like other purists, I once believed that people should lose a digit for using divs outside of defining headers, content, sidebars/navs, and footers. And spans? They&#8217;re basically an admission of semantic defeat.</p>
<p>Like Jeff, I found that philosophy led to 3 challenges in real life:</p>
<ol>
<li> It&#8217;s nearly impossible to build a web UI without <em>some</em> non-semantic markup.</li>
<li>Purely semantic markup often requires a lot more work from the CSS, which can bloat files.</li>
<li>As a result of the previous points and some other stuff, nearly-pure semantic markup can take a <em>long</em> time to build.</li>
</ol>
<p>At a certain point, pragmatism takes over: is it worth paying someone to spend extra time building bloated CSS in the name of &#8220;future compatibility&#8221;? And if it&#8217;s so hard, does that indicate some deeper flaw in the semantic HTML model?</p>
<p>While pondering the wall between content and presentation, I thought about another wall: <a href="http://www.jjg.net/elements/">JJG&#8217;s division between app UIs and document UIs</a>. Web UIs straddle that wall. Is it realistic to talk about &#8220;semantic&#8221; application interfaces? Does an app really have any &#8220;content&#8221; at all? Pragmatically, <strong>aren&#8217;t app UI components going to choke on forward compatibility anyway</strong>, because dimensions, JavaScript hooks, etc., tend to expect a specific context (the web browser)?</p>
<p>Consider the classic argument for semantic markup and forwards compatibility: the mobile device. Shouldn&#8217;t that be solved in a stylesheet&#8217;s media attribute? Or ignored altogether, as the iPhone presages full browsers one mobile devices (yay, death of WAP).</p>
<p>Here&#8217;s a more nuanced take on the whole &#8220;semantic HTML or die&#8221; philosophy:</p>
<ol>
<li><strong>Keep markup purely semantic for a web UI&#8217;s document component</strong>. No divs, no spans, no class=&#8221;left&#8221;. JS probably shouldn&#8217;t touch the document interface, except for typographically-oriented functionality like increasing font sizes.</li>
<li><strong>Use functional markup for a web UI&#8217;s application components.</strong> Recognize that you&#8217;re building chrome from deeply intermingled HTML, CSS, and JS. Put hooks as necessary within the HTML.</li>
</ol>
<p>Headers, navs, footers, and forms all fall within the <strong>application UI</strong> camp. Basically, anything that&#8217;s in a CMS&#8217;s app/template. From a user&#8217;s perspective, a website nav is little more than customized browser chrome, living alongside the browser&#8217;s location box and back button. With search and dynamic taxonomies exploding content hierarchies, it makes less and less sense to say a nav &#8220;should&#8221; be expressed as a list. Suckerfish dropdown menus and similar CSS wizardry are interesting because they manage to overcome the constraints presented by HTML, not because they&#8217;re elegant or appropriate.</p>
<p>The <strong>document UI</strong> components should only include the page text &#8211; what typically lives in the &#8220;content&#8221; div and is stored in the CMS database. When people talk about forward compatibility, this is most of what they should consider anyway &#8211; the data. This is what HTML was originally designed to represent: text, read and clicked. Keep <em>this</em> interface code semantic.</p>
<p><em>(<a href="http://lab.arc90.com/experiments/readability/">Readability</a> is a great browser plugin that <strong>hides all of a website&#8217;s application UI components</strong>, leaving only the document content &#8211; it&#8217;s a beautiful thing.)</em></p>
<p>So throw out a blind adherence to semantic markup; instead, focus on semantic document content and recognize that some HTML is actually your app/presentation layer, where it is really just a framework for links, JavaScript, and other functionality.</p>
<img src="http://www.cycloneranger.com/?ak_action=api_record_view&id=259&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cycloneranger.com/2009/05/moderating-semantic-html-zealotry.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.208 seconds -->

