<?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>Jon Rohan &#187; HTML</title>
	<atom:link href="http://www.dinnermint.org/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dinnermint.org</link>
	<description>I&#039;m a freelance web developer living in San Francisco. This is my portfolio where I share my work, thoughts, and whatever else.</description>
	<lastBuildDate>Sat, 24 Apr 2010 17:01:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<cloud domain='www.dinnermint.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>&lt;!DOCTYPE HTML&gt;</title>
		<link>http://www.dinnermint.org/html/doctype-html/</link>
		<comments>http://www.dinnermint.org/html/doctype-html/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 17:00:58 +0000</pubDate>
		<dc:creator>Jon Rohan</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[semantic]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.dinnermint.org/?p=2208</guid>
		<description><![CDATA[I like to mix it up on my blog, sometimes posting experiments, and sometimes posting fundamental front end posts. This is a fundamental, but a crucial step in creating a website. Choosing the correct DOCTYPE for your site. What is the Document Type Declaration? A proper DOCTYPE is essential for the correct rendering and functioning [...]]]></description>
			<content:encoded><![CDATA[<p>I like to mix it up on my blog, sometimes posting experiments, and sometimes posting fundamental front end posts. This is a fundamental, but a crucial step in creating a website. Choosing the correct <code>DOCTYPE</code> for your site. </p>
<h3>What is the Document Type Declaration?</h3>
<p>A proper DOCTYPE is essential for the correct rendering and functioning of a website in compliant browsers. If you forget to declare a DOCTYPE, on use an incomplete one, then the browser will render in quirks mode, in which the browser will try and be backward compliant leaving you with a website that might as well have the hard hat under construction animated gif on it. </p>
<p>There are typically 3 types associated with each lang version. Strict, transitional, and frameset. Use Strict when you want a pure website that only uses the lang version&#8217;s current tags. Use transitional, when you have a site that you will be using some depreciated tags. Use frameset, when you include frames.</p>
<h3>Pure Clean HTML</h3>
<p>The HTML DTD are the most typical you&#8217;d find on websites. Use the HTML definition when writing plain old standard HTML. Great thing about this is by using standards there&#8217;s no surprises for any browsers when parsing your page. </p>
<h4>HTML 4.01 Frameset</h4>
<p><pre><code>&lt;!DOCTYPE HTML PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD HTML 4.01 Frameset//EN&quot; 
&nbsp;&nbsp;&quot;http://www.w3.org/TR/html4/frameset.dtd&quot;&gt;</code></pre></p>
<h4>HTML 4.01 Transitional</h4>
<p><pre><code>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;</code></pre></p>
<h4>HTML 4.01 Strict</h4>
<p><pre><code>&lt;!DOCTYPE HTML PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD HTML 4.01//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</code></pre></p>
<h4>HTML 5</h4>
<p>I love the new HTML 5 DOCTYPE. Why? Because this is all it is.</p>
<pre><code>&lt;!DOCTYPE HTML&gt;</code></pre>
<h3>X is for Extreme</h3>
<p>The X in XHTML actually is referring to the fact that XHTML documents are XML conforming. This means that XML tools can more easily validate and parse the HTML. Another advantage of XHTML is that it is as extensable as XML. Meaning you can create your own html tags and use them, here&#8217;s an example of what I mean.<br />
<pre><code>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&nbsp;&nbsp;&lt;head&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;A Math Example&lt;/title&gt;
&nbsp;&nbsp;&lt;/head&gt;
&nbsp;&nbsp;&lt;body&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;The following is MathML markup:&lt;/p&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;apply&gt; &lt;log/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;logbase&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cn&gt; 3 &lt;/cn&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/logbase&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ci&gt; x &lt;/ci&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/apply&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/math&gt;
&nbsp;&nbsp;&lt;/body&gt;
&lt;/html&gt;
</code></pre> </p>
<p>This can be extremely useful when you are using an unofficial webstandard like <a href="http://microformats.org/" target="_blank">microformats</a>, <a href="http://www.foaf-project.org/" target="_blank">foaf</a>, etc&#8230;</p>
<p>Here are the declarations for XHTML.</p>
<h4>XHTML 1.0 Strict</h4>
<p><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;</code></pre></p>
<h4>XHTML 1.0 Transitional</h4>
<p><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;</code></pre></p>
<h4>XHTML 1.0 Frameset</h4>
<p><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;</code></pre></p>
<h4>XHTML 1.1</h4>
<p><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC&nbsp;&nbsp;&quot;-//W3C//DTD XHTML 1.1//EN&quot;
&nbsp;&nbsp;&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;</code></pre></p>
<h3>So which do I choose?</h3>
<p>Let me answer this question with a question. What will be the focus of your site? When you are building a site that will be viewed on non-standard browsers (eg. some mobile browsers, the kindle, the wii) then XHTML is your best choice. When you are building a site that&#8217;s gonna be viewed in standard browsers, (eg. firefox, safari, ie, opera) then HTML is what you should be using.</p>
<p>To decide how to pick between Strict, transitional, and frameset, this really depends on your coding style. I think you should use Strict and in special circumstances use transitional and frameset. My favorite at the moment is the HTML 5 DTD, it&#8217;s extremely simple to remember. <code>&lt;!DOCTYPE HTML&gt;</code> </p>


<p>Related posts:<ol><li><a href='http://www.dinnermint.org/html/getting-started-with-html-5/' rel='bookmark' title='Permanent Link: Getting Started with HTML 5'>Getting Started with HTML 5</a></li>
<li><a href='http://www.dinnermint.org/tutorial/css3-font-face/' rel='bookmark' title='Permanent Link: CSS 3 @font-face'>CSS 3 @font-face</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dinnermint.org/html/doctype-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with HTML 5</title>
		<link>http://www.dinnermint.org/html/getting-started-with-html-5/</link>
		<comments>http://www.dinnermint.org/html/getting-started-with-html-5/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:18:32 +0000</pubDate>
		<dc:creator>Jon Rohan</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[semantic]]></category>

		<guid isPermaLink="false">http://www.dinnermint.org/?p=1972</guid>
		<description><![CDATA[HTML 5 is the next major iteration of HTML, and I know I&#8217;m excited about it. I recently added some new HTML 5 markup into dinnermint. It was a very quick and simple change, which I believe will help clear up some of the &#60;div&#62; soup. The New Tags There are some new tags in [...]]]></description>
			<content:encoded><![CDATA[<p>HTML 5 is the next major iteration of HTML, and I know I&#8217;m excited about it. I recently added some new HTML 5 markup into dinnermint. It was a very quick and simple change, which I believe will help clear up some of the <code>&lt;div&gt;</code> soup.</p>
<h3>The New Tags</h3>
<p>There are some <a href="http://www.w3schools.com/tags/html5.asp">new tags</a> in the HTML 5 specification, that I believe will lead to more semantic code. And what I mean by that is the code says what it does. You&#8217;re no longer left wondering what those <code>&lt;div&gt;</code> tags are for, when you see a tag like <code>&lt;header&gt;</code> you know what it is for.</p>
<h3>The Layout</h3>
<p>There are lost of tags I could have used, like <code>aside, audio, video</code>. I plan on playing around with those later, but for now I set up a basic layout consisting of a <code>header, nav, article, footer</code> like so.<br />
<pre><code>&lt;body&gt;
&nbsp;&nbsp;&lt;header&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;nav&gt;&lt;/nav&gt;
&nbsp;&nbsp;&lt;/header&gt;
&nbsp;&nbsp;&lt;article&gt;
&nbsp;&nbsp;&lt;/article&gt;
&nbsp;&nbsp;&lt;footer&gt;
&nbsp;&nbsp;&lt;/footer&gt;
&lt;/body&gt;
</code></pre></p>
<p>These elements behave like typical block level elements. But are more semantic, if you aren&#8217;t sure of the benefits of this check out this post I wrote on <a href="http://www.dinnermint.org/css/semantic-css-class-naming/" target="_blank">CSS class names</a>. If you are thinking about setting up your site, you can at least use <code>header, footer, nav</code>. If you do setup your site, there are a few things you should know. </p>
<ul>
<li><strong>DOCTYPE</strong> One of my favorite new features of HTML 5. Now you don&#8217;t have to remember a long DOCTYPE when starting a page, just use <code>&lt;!DOCTYPE HTML&gt;</code> and that&#8217;s it!</li>
<li><strong>HTML 4 Browsers</strong> Sigh, unfortunately not all browsers are on the same page, what you&#8217;ll need to do so these elements will be rendered like plain old block elements is below.</li>
</ul>
<p>Add this to your stylesheet, this just reminds the browsers how to display these tags.<br />
<pre><code>header, section, footer,
aside, nav, article, figure {
&nbsp;&nbsp;display: block;
}</code></pre></p>
<p>Add this to the <strong>Beginning</strong> of the <code>&lt;body&gt;</code> tag. This is important for IE browsers, all it is doing is creating an element in the dom for each of the html 5 tags so it doesn&#8217;t ignore them. It&#8217;s important you place this script before any html 5 tags are used, at the top of the page.<br />
<pre><code>&lt;!--[if IE]&gt;
&nbsp;&nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;(function(){if(!/*@cc_on!@*/0)return;
&nbsp;&nbsp;&nbsp;&nbsp;var e = &quot;abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,&quot; +
&nbsp;&nbsp;&nbsp;&nbsp;&quot;figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video&quot;;.
&nbsp;&nbsp;&nbsp;&nbsp;split(&#039;,&#039;),i=e.length;while(i--){document.createElement(e[i])}})()
&nbsp;&nbsp;&lt;/script&gt;
&lt;![endif]--&gt;
</code></pre></p>


<p>Related posts:<ol><li><a href='http://www.dinnermint.org/html/doctype-html/' rel='bookmark' title='Permanent Link: &lt;!DOCTYPE HTML&gt;'>&lt;!DOCTYPE HTML&gt;</a></li>
<li><a href='http://www.dinnermint.org/tutorial/targeting-ie6-with-html-css/' rel='bookmark' title='Permanent Link: Targeting IE6 for style'>Targeting IE6 for style</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dinnermint.org/html/getting-started-with-html-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Targeting IE6 for style</title>
		<link>http://www.dinnermint.org/tutorial/targeting-ie6-with-html-css/</link>
		<comments>http://www.dinnermint.org/tutorial/targeting-ie6-with-html-css/#comments</comments>
		<pubDate>Sun, 31 May 2009 16:35:18 +0000</pubDate>
		<dc:creator>Jon Rohan</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://www.dinnermint.org/?p=1629</guid>
		<description><![CDATA[I wanted to share with you my preferred method of targeting CSS to IE6. Conditional Comments &#60;!-- This is the main stylesheet --&#62; &#60;link rel=&#34;stylesheet&#34; href=&#34;http://www.example.com/css/global.css&#34; type=&#34;text/css&#34; media=&#34;screen&#34;/&#62; &#60;!--[if IE 6]&#62; &#60;!-- This contains ie6 specific overrides --&#62; &#60;link rel=&#34;stylesheet&#34; href=&#34;http://www.example.com/css/ie6.css&#34; type=&#34;text/css&#34; media=&#34;screen&#34;/&#62; &#60;![endif]--&#62; &#60;!--[if IE 7]&#62; &#60;!-- This contains ie7 specific overrides --&#62; &#60;link [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to share with you my preferred method of targeting CSS to IE6.</p>
<p><strong>Conditional Comments</strong></p>
<p><pre><code>&lt;!-- This is the main stylesheet --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.example.com/css/global.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
&lt;!--[if IE 6]&gt;
&lt;!-- This contains ie6 specific overrides --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.example.com/css/ie6.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;
&lt;!-- This contains ie7 specific overrides --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.example.com/css/ie7.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;
&lt;!-- This contains ie8 specific overrides --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.example.com/css/ie8.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
&lt;![endif]--&gt;
</code></pre></p>
<p>I prefer this method because it keeps the CSS cleaner, and when the apocalypse hits and IE6 is no longer relevant it&#8217;s easy to remove code specific to IE6. </p>
<p>The idea behind this method is, you would write your code how you normally would for any standards compliant browser. Then you would go back and  in the ie6.css sheet you would add &#8220;overrides&#8221;. Because CSS (Cascading Style Sheets) is by design built so that style classes lower on the page take higher priority, this should fix your issue.</p>
<p>So you would put something like this in your global.css<br />
<pre><code>.textarea {
&nbsp;&nbsp; border: 1px solid #000;
&nbsp;&nbsp; padding: 3px 5px;
&nbsp;&nbsp; margin: 5px;
}
</code></pre></p>
<p>and you would put this in your ie6.css<br />
<pre><code>.textarea {
&nbsp;&nbsp; border: 1px solid #FF0000;
}
</code></pre></p>
<p>The margin and padding properties are inherited so all you are changing is the border color. And it only occurs in IE6 because of the Conditional Comments.</p>
<p>What is your preferred IE targeting method? Leave a comment below.</p>


<p>Related posts:<ol><li><a href='http://www.dinnermint.org/html/getting-started-with-html-5/' rel='bookmark' title='Permanent Link: Getting Started with HTML 5'>Getting Started with HTML 5</a></li>
<li><a href='http://www.dinnermint.org/css/creating-triangles-in-css/' rel='bookmark' title='Permanent Link: Creating Triangles in CSS'>Creating Triangles in CSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dinnermint.org/tutorial/targeting-ie6-with-html-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
