<?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>Daniel Sellergren</title>
	<atom:link href="http://danielsellergren.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://danielsellergren.com</link>
	<description>A freelancer takes on HTML5, CSS3, and the future of the web.</description>
	<lastBuildDate>Wed, 22 Jun 2011 14:10:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Introduction to RSS</title>
		<link>http://danielsellergren.com/2011/03/introduction-to-rss/</link>
		<comments>http://danielsellergren.com/2011/03/introduction-to-rss/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 01:02:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=190</guid>
		<description><![CDATA[RSS stands for Really Simple Syndication, and it is the most popular feed standard on the web today. You may have seen links on some of your favorite websites (including this one) that advertise their RSS feeds for you to &#8230; <a href="http://danielsellergren.com/2011/03/introduction-to-rss/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>RSS stands for <span class="highlight">Really Simple Syndication</span>, and it is the most popular feed standard on the web today. You may have seen links on some of your favorite websites (including this one) that advertise their RSS feeds for you to subscribe to. If you&#8217;ve never used a web feed before, you may be surprised how simple they really are.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/03/RSS_icon.png"><img class="size-full wp-image-191 aligncenter" title="RSS Icon" src="http://danielsellergren.com/wp-content/uploads/2011/03/RSS_icon.png" alt="RSS Icon" width="240" height="240" /></a></p>
<p>RSS is a family of standardized formats for web content that allow you to check your favorite websites for new material all at once, without having to go to each site individually. Everything is brought directly to your <span class="highlight">feed reader</span> when it&#8217;s made available by the publishers.</p>
<h3>How does it work?</h3>
<p>RSS is essentially just an extension of <span class="highlight">eXtensible Markup Language (XML)</span>, a set of standards that allow for easy organization of content for consumption by machines. It details the relationships between the information so that it can be translated by the computer in a way that makes sense to human readers. A simple RSS document might look like the following:</p>
<pre class="brush: xml; toolbar: false">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;rss version="2.0"&gt;
&lt;channel&gt;
	<!-- These tags are required -->
	&lt;title&gt;Title of the feed&lt;/title&gt;
	&lt;link&gt;http://danielsellergren.com/rss&lt;/link&gt;
	&lt;description&gt;Description of the feed's content&lt;/description&gt;

	<!-- These tags are optional -->
	&lt;pubDate&gt;Mar, 21 2010 00:16:45 EST&lt;/pubDate&gt;
	&lt;category&gt;Web development&lt;/category&gt;
	&lt;language&gt;en-us&lt;/language&gt;
	&lt;copyright&gt; © 2011 Daniel Sellergren&lt;/copyright&gt;

	<!-- First article -->
	&lt;item&gt;
		&lt;title&gt;Title of the first article&lt;/title&gt;
		&lt;description&gt;Description of first article&lt;/description&gt;
		&lt;link&gt;http://danielsellergren.com/first-article&lt;/link&gt;
		&lt;pubDate&gt;Mar, 21 2010 00:16:45 EST&lt;/pubDate&gt;
	&lt;/item&gt;

	<!-- Second article -->
	&lt;item&gt;
		&lt;title&gt;Title of the second article&lt;/title&gt;
		&lt;description&gt;Description of second article&lt;/description&gt;
		&lt;link&gt;http://danielsellergren.com/second-article&lt;/link&gt;
		&lt;pubDate&gt;Mar, 11 2010 00:08:17 EST&lt;/pubDate&gt;
	&lt;/item&gt;
&lt;/channel&gt;
&lt;/rss&gt;</pre>
<p>One of the major advantages to RSS/XML markup is that it mimics the hierarchical way in which humans often organize information. Outer <code>&lt;xml&gt;</code> and <code>&lt;rss&gt;</code> tags tell what type of document is to follow, and the <code>&lt;channel&gt;</code> tags enclose the content itself. Inside there are also tags for <code>&lt;title&gt;</code>, <code>&lt;description&gt;</code>, and <code>&lt;link&gt;</code> which are required attributes for describing the overall content of the feed itself. There are also many optional fields that you can include to enhance your feed by giving information about publication date and category. For a full list of <code>&lt;channel&gt;</code> tags you can click <a href="http://www.make-rss-feeds.com/rss-tags.htm" target="_blank">here</a>.</p>
<p>Within the <code>&lt;channel&gt;</code> tags there can be numerous <code>&lt;item&gt;</code> tags that denote individual articles within the feed. Each one has a <code>&lt;title&gt;</code>, <code>&lt;description&gt;</code>, and <code>&lt;link&gt;</code> just like the feed except tailored to relate to a specific article. These also accept many optional fields that can allow the reader to have more detailed information.</p>
<h3>Using a reader</h3>
<p>There are many options available for reading RSS feeds, including some that you may already have access to. For example, most of the major web browsers such as Firefox, Safari, and Internet Explorer have built in RSS readers that you can use without even opening another application. Chrome is notoriously missing its own built in reader, most likely due to the popularity of the <a href="http://reader.google.com" target="_blank">Google Reader</a>, their web-based RSS client.</p>
<p>Adding a feed to your reader is generally as simple as clicking the link provided on a website. If you use your browser&#8217;s built in reader, it will add it automatically to your list. Some sites will also provide a set of links that will automatically add their feed to one of your web-based readers such as Google&#8217;s. If all else fails, you can simply copy and paste a link to the site&#8217;s RSS feed into your preferred reader and you&#8217;re good to go!</p>
<h3>RSS for your site</h3>
<p>Adding an RSS feed for your site is generally simple if you use a <span class="highlight">Content Management System (CMS)</span> like <a href="http://wordpress.org" target="_blank">WordPress</a> or <a href="http://joomla.org" target="_blank">Joomla!</a> Many have built in RSS capabilities, but any major CMS that doesn&#8217;t will certainly have an appropriate plugin that updates feed when you update your site. For WordPress automatically maintains an RSS feed for you in several different versions which you can link to by using the following commands:</p>
<pre class="brush: php; toolbar: false">&lt;?php

	/* RDF/RSS 1.0 feed */
	bloginfo('rdf_url');
	/* RSS 0.92 feed */
	bloginfo('rss_url');
	/* RSS 2.0 feed */
	bloginfo('rss2_url');
	/* Atom feed */
	bloginfo('atom_url');

?&gt;</pre>
<p>If you are not using a CMS, you&#8217;re going to have to either write code into your application that generates the feed for you, or update it manually each time you make an update to your site. This can be very time consuming, which is why many sites prefer to use an established CMS if they are regularly producing a large amount of content.</p>
<h3>Further reading</h3>
<p>For more information please visit the following resources.</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/RSS" target="_blank">Wikipedia Article on RSS</a></li>
<li><a href="http://www.whatisrss.com/" target="_blank">What is RSS?</a></li>
<li><a href="http://www.w3schools.com/rss/default.asp" target="_blank">W3Schools RSS Tutorial</a></li>
<li><a href="http://www.make-rss-feeds.com/rss-tags.htm" target="_blank">Make RSS Feeds</a></li>
<li><a href="http://cyber.law.harvard.edu/rss/rss.html" target="_blank">RSS 2.0 at Harvard Law</a></li>
<li><a href="http://feed2.w3.org/docs/rss2.html" target="_blank">W3 RSS Feed Standard</a></li>
<li><a href="http://codex.wordpress.org/WordPress_Feeds" target="_blank">WordPress RSS URLs</a></li>
</ul>
<p></code></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2011/03/introduction-to-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Modernizr to Determine HTML5/CSS3 Support</title>
		<link>http://danielsellergren.com/2011/02/using-modernizr-to-determine-html5css3-support/</link>
		<comments>http://danielsellergren.com/2011/02/using-modernizr-to-determine-html5css3-support/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 15:47:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modernizr]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=182</guid>
		<description><![CDATA[Modernizr is an open source, MIT-licensed Javascript library that allows web designers and developers to start using HTML5 and CSS3 features while still having precise control over older browsers. While the site loads, it automatically checks the browser&#8217;s support of &#8230; <a href="http://danielsellergren.com/2011/02/using-modernizr-to-determine-html5css3-support/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.modernizr.com/" target="_blank">Modernizr</a> is an open source, MIT-licensed Javascript library that allows web designers and developers to start using HTML5 and CSS3 features while still having precise control over older browsers. While the site loads, it automatically checks the browser&#8217;s support of new HTML features like <code>&lt;canvas&gt;</code> and <code>&lt;video&gt;</code> and new CSS properties like <code>border-radius</code>, <code>box-shadow</code>, and <code>text-shadow</code>. It then provides the results in a global variable, and adds classes to the <code>&lt;html&gt;</code> element which allow you to handle the CSS and Javascript differently for incompatible browsers.</p>
<p>Getting started is easy &mdash; you just need to <a href="http://www.modernizr.com" target="_blank">download the latest version of the library</a>, place it in your main or /js directory, put a class of &ldquo;no-js&rdquo; in your <code>&lt;html&gt;</code> tag and link to the file address in your <code>&lt;head&gt;</code>.</p>
<pre class="brush: xhtml; toolbar: false">&lt;html class="no-js"&gt;
&lt;head&gt;
	&lt;title&gt;Using the Modernizr library&lt;/title&gt;
	&lt;script type="text/javascript" src="js/modernizr-1.7.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The file itself is only 3.7 kilobytes and the script runs automatically without any sort of <code>initialize()</code> function for you to run. After the script is loaded, you can test for various support by checking the properties of the global <code>Modernizr</code> object.</p>
<pre class="brush: js; toolbar: false">if (Modernizr.canvas) {
	// We can play with the &lt;canvas&gt;!
} else {
	// Sad time! No &lt;canvas&gt;!
}</pre>
<p>Additionally, you can use different CSS depending on whether there is support of an element by using the new <code>&lt;html&gt;</code> classes that Modernizr adds. A full list of the Javascript properties and CSS classes is available in the <a href="http://www.modernizr.com/docs/" target="_blank">Modernizr documentation</a>.</p>
<pre class="brush: css; toolbar: false">/* Happy background for canvas support */
.canvas {
	background: yellow;
}
/* Sad background for no canvas support */
.no-canvas {
	background:
}</pre>
<p>The last thing that Modernizr takes care of for you is creating dummies for the new HTML5 Semantic Elements. This allows less supportive browsers to recognize (and let you style) elements like <code>&lt;header&gt;</code>, <code>&lt;footer&gt;</code>, <code>&lt;nav&gt;</code>, <code>&lt;section&gt;</code>, and <code>&lt;article&gt;</code>. This keeps Internet Explorer from inserting unrecognized elements into the DOM as empty nodes with no children. You can now use the newest HTML5 elements in your markup, and style them in your stylesheet, without having to worry about whether they are supported.</p>
<p>That&#8217;s all there is to it, so get started using HTML5 today!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2011/02/using-modernizr-to-determine-html5css3-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>W3C Targets 2014 for HTML5 Standard, IE9 Lagging Behind</title>
		<link>http://danielsellergren.com/2011/02/w3c-targets-2014-for-html5-standard-ie9-lagging-behind/</link>
		<comments>http://danielsellergren.com/2011/02/w3c-targets-2014-for-html5-standard-ie9-lagging-behind/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 19:06:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=136</guid>
		<description><![CDATA[The W3C, the main international standards organization for the web, announced yesterday that they will be advancing HTML5 to “Last Call” in May and are aiming at 2014 for a Recommended standard. Hopefully this is a step in the right &#8230; <a href="http://danielsellergren.com/2011/02/w3c-targets-2014-for-html5-standard-ie9-lagging-behind/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">The <a href="http://w3.org/" target="_blank">W3C</a>, the main international standards organization for the web, <a href="http://www.w3.org/2011/02/htmlwg-pr.html " target="_blank">announced yesterday</a> that they will be advancing HTML5 to “Last Call” in May and are aiming at 2014 for a Recommended standard. Hopefully this is a step in the right direction for web interoperability, though not all the news is good.</p>
<p><a href="http://people.mozilla.com/~prouget/ie9/" target="_blank">A rather scathing blog post today by Paul Rouget of Mozilla</a> makes a valid point that despite extensive promises from Microsoft, Internet Explorer 9 is not only late but still lacking far behind other modern browsers. As of now it does not support HTML5&#8242;s application caching and web forms, CSS3&#8242;s text-shadow, gradients, or transitions, and a whole host of other standards that are gaining traction with Mozilla and Webkit.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/02/HTML5_Logo_256.png"><img class="size-full wp-image-137  aligncenter" title="HTML5 Logo" src="http://danielsellergren.com/wp-content/uploads/2011/02/HTML5_Logo_256.png" alt="HTML5 Logo" width="256" height="256" /></a></p>
<p>Take a look at the articles and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2011/02/w3c-targets-2014-for-html5-standard-ie9-lagging-behind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Our Ner Tamid</title>
		<link>http://danielsellergren.com/2011/01/our-ner-tamid/</link>
		<comments>http://danielsellergren.com/2011/01/our-ner-tamid/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 19:21:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=169</guid>
		<description><![CDATA[Kuhn Studio needed an online business card for a proposed piece and this simple, classic site was built to order from concept to completion in less than a day. A subtle beige background and an embedded typeface from the Google &#8230; <a href="http://danielsellergren.com/2011/01/our-ner-tamid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kuhnstudio.com/ournertamid" target="_blank">Kuhn Studio needed an online business card</a> for a proposed piece and this simple, classic site was built to order from concept to completion in less than a day.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/02/ournertamid1.jpg"><img class="aligncenter size-full wp-image-170" title="Our Ner Tamid Site #1" src="http://danielsellergren.com/wp-content/uploads/2011/02/ournertamid1.jpg" alt="Our Ner Tamid Site #1" width="525" height="376" /></a></p>
<p style="text-align: left;">A subtle beige background and an embedded typeface from the Google Font Directory give detail for the modern browser, while Ajax-powered navigation gives a snappy unity to the small site.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/02/ournertamid2.jpg"><img class="aligncenter size-full wp-image-171" title="Our Ner Tamid Site #2" src="http://danielsellergren.com/wp-content/uploads/2011/02/ournertamid2.jpg" alt="Our Ner Tamid Site #2" width="525" height="374" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2011/01/our-ner-tamid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 for Block Elements: Shadows, Corners, and Gradients</title>
		<link>http://danielsellergren.com/2010/12/css3-for-block-elements-shadows-corners-and-gradients/</link>
		<comments>http://danielsellergren.com/2010/12/css3-for-block-elements-shadows-corners-and-gradients/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 20:22:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[border-radius]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[gradient]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=113</guid>
		<description><![CDATA[With most modern browsers starting to support CSS3 standards, designers and developers now have access to some pretty cool styling tools that were once limited to Photoshop. Commonly used design elements such as shadows, rounded corners, and gradients can now &#8230; <a href="http://danielsellergren.com/2010/12/css3-for-block-elements-shadows-corners-and-gradients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With most modern browsers starting to support <span class="highlight">CSS3 standards</span>, designers and developers now have access to some pretty cool styling tools that were once limited to Photoshop.  Commonly used design elements such as <span class="highlight">shadows</span>, <span class="highlight">rounded corners</span>, and <span class="highlight">gradients</span> can now be rendered in the browser without need for custom images.  There are still some cross-browser issues that have to be taken into account, but the overall implementation is still very simple.</p>
<h3>Box Shadows</h3>
<p>Box Shadows are an easy way to add depth to your design but up until now they&#8217;ve required the use of images, extra <code>&lt;div&gt;s</code>, and the <code>z-index</code> property.  Now you can add your own shadows to any block element with just a few lines of CSS.</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Box shadow */
	-moz-box-shadow: 2px 2px 3px 1px #AAA;
	-webkit-box-shadow: 2px 2px 3px 1px #AAA;
	box-shadow: 2px 2px 3px 1px #AAA;
}</pre>
<p>The pixel values represent horizontal offeset (positive values move shadow right), vertical offset (positive values move shadow down), blur radius, and spread distance.  The blur radius and spread distance values can be omitted if so desired.  The final value dictates the color of the shadow in either hexadecimal <code>#AAAAAA</code> format or <code>rgb(170,170,170)</code> format.  Some browsers also support the <code>rgba(170,170,170,0.5)</code> format which adds an opacity value.  Our example box looks like this so far:</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/css3block1.jpg"><img class="size-full wp-image-116  aligncenter" title="CSS3 Block Level Box Shadow" src="http://danielsellergren.com/wp-content/uploads/2010/12/css3block1.jpg" alt="CSS3 Block Level Box Shadow" width="376" height="274" /></a></p>
<p><span id="more-113"></span></p>
<h3>Rounded Corners</h3>
<p>Another design element that has become very popular in the “Web 2.0” design generation is rounding the corners on block elements to give a smoother, cooler feel.  This can be done with CSS3 using the <code>border-radius</code> attribute either to individual corners or all at once.</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* All corners */
	-moz-border-radius: 15%;
	border-radius: 15%;
}</pre>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Top left corner */
	-moz-border-radius-topleft: 50px 100px;
	border-top-left-radius: 50px 100px;
	/* Top right corner */
	-moz-border-radius-topright: 100px 50px;
	border-top-right-radius: 100px 50px;
	/* Bottom right corner */
	-moz-border-radius-bottomright: 50px 100px;
	border-bottom-right-radius: 50px 100px;
	/* Bottom left corner */
	-moz-border-radius-bottomleft: 100px;
	border-bottom-left-radius: 50px;
}</pre>
<p>Notice that you still have to account for the Mozilla prefix <code>-moz-</code>, but for the most part it is still very simple.  The pixel and percentage values determine how far away from the corner the rounding will begin.  When two values are given, the first represents horizontal offset and the second represents vertical offset.  The is also a shorthand method for specifying all four corners at once:</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Shorthand for all corners */
	border-radius: 50px 100px 50px 100px / 100px 50px 100px 50px;
}</pre>
<p>The first four values describe the horizontal offset for the top-left, top-right, bottom-right, and bottom-left corners.  The four values after the <code>/</code> describe the vertical offset.  By varying the horizontal and vertical offsets on each corner you can come up with some really unique shapes like this:</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/css3block2.jpg"><img class="size-full wp-image-117  aligncenter" title="CSS3 Block Level Rounded Corners" src="http://danielsellergren.com/wp-content/uploads/2010/12/css3block2.jpg" alt="CSS3 Block Level Rounded Corners" width="375" height="274" /></a></p>
<h3>Gradients</h3>
<p>One last design element that is already being implemented in modern browsers is the color gradient.  It is another option that allows you to add depth and detail to your websites without creating inflexible background images.  Once again, Webkit browsers (Chrome &amp; Safari) and Mozilla browsers (Firefox) both support CSS3 gradients but unfortunately not under the same standards.</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Non-CSS3 browsers */
	background: #EEEEEE;
	/* Chrome/Safari */
	background: -webkit-gradient(linear, 0 0, 0 100%,
                             from(#EEEEEE), to(#AAAAAA));
	/* Firefox */
	background: -moz-linear-gradient(top, #EEEEEE, #AAAAAA);
}</pre>
<p>With the Webkit gradient we are defining five parameters: type of gradient (linear), coordinates (x, y) of starting position, coordinates (x, y) of ending position, starting color, and ending color.  The Mozilla gradient defines the type of gradient <code>-linear-</code> within the vendor extension, then requires a starting position (top, bottom, or -Xdeg), a starting color, and an ending color.  You can add multiple colors by using <span class="highlight">color-stops</span>:</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Non-CSS3 browsers */
	background: #EEEEEE;
	/* Chrome/Safari */
	background: -webkit-gradient(linear, 0 0, 0 100%,
        from(#EEEEEE), color-stop(#CCCCCC), color-stop(#AAAAAA));
	/* Firefox */
	background: -moz-linear-gradient(top, #EEEEEE,
        #CCCCCC 50%, #DDDDDD 75%, #EEEEEE 100%);
}</pre>
<h3>Finished Product</h3>
<p>So let&#8217;s take a look at one final example to see how everything works together.</p>
<pre class="brush: xhtml; toolbar: false">#anyBlock {
	/* Box shadow */
	-moz-box-shadow: 2px 2px 3px 1px #AAA;
	-webkit-box-shadow: 2px 2px 3px 1px #AAA;
	box-shadow: 2px 2px 3px 1px #AAA;
	/* Rounded corners */
	-moz-border-radius: 5px 10px 5px 10px / 10px 5px 10px 5px;
	border-radius: 5px 10px 5px 10px / 10px 5px 10px 5px;
	/* Background gradient */
	background: #FFFFFF;
	background: -webkit-gradient(linear, 0 0, 0 100%, from(#FF0000), to(#AA0000));
	background: -moz-linear-gradient(top, #FF0000, #AA0000);
}</pre>
<p>Which gives us a pretty snazzy looking box that uses nothing but CSS3!</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/css3block3.jpg"><img class="size-full wp-image-118  aligncenter" title="CSS3 Block Level Color Gradient" src="http://danielsellergren.com/wp-content/uploads/2010/12/css3block3.jpg" alt="CSS3 Block Level Color Gradient" width="370" height="271" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/12/css3-for-block-elements-shadows-corners-and-gradients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Structure a Simple Site with PHP</title>
		<link>http://danielsellergren.com/2010/12/how-to-structure-a-simple-site-with-php/</link>
		<comments>http://danielsellergren.com/2010/12/how-to-structure-a-simple-site-with-php/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 17:48:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=88</guid>
		<description><![CDATA[Using PHP to structure your small business or personal site is a very simple process that can save you hours of hassle when it comes time to make changes. By dynamically creating each page out of multiple source files, changes &#8230; <a href="http://danielsellergren.com/2010/12/how-to-structure-a-simple-site-with-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Using PHP to structure your small business or personal site is a very simple process that can save you hours of hassle when it comes time to make changes.  By dynamically creating each page out of multiple source files, changes made to one section of code can ripple throughout the entire site.  Think of it in the same way that CSS allows for sweeping design changes by altering a single stylesheet.</p>
<p>Rather than creating an <code>.html</code> file for each page with all the site architecture repeated on each page, we&#8217;re going to separate out common, reusable sections such as the header, footer, and navigation menu.  We&#8217;re going to create a main file named <code>index.php</code>, and several subfiles named <code>header.php</code>, <code>nav.php</code>, and <code>footer.php</code>.  Let&#8217;s take a look at <code>index.php</code> so we can get an overview of what we&#8217;re doing.</p>
<pre class="brush: xhtml; toolbar: false">&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;A basic site architecture&lt;/title&gt;
	&lt;!-- Include all CSS, JS, and meta information --&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;?php require("header.php"); ?&gt;
	&lt;?php require("nav.php"); ?&gt;

	&lt;div id="main"&gt;
		&lt;!-- Main content goes here --&gt;
	&lt;/div&gt;

	&lt;?php require("footer.php"); ?&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p><span id="more-88"></span></p>
<p>The parts of our site that are common to all pages have been separated out so that they can be reused rather than copied.  In lines 8, 9, and 15 we load three files containing the code for our header (logo and other graphics), navigation menu, and footer.  When you view the <code>index.php</code> file in a web browser it will assemble the four files into one, and will appear this way if you choose to view the page source.  Take a look at the final assembled index file:</p>
<pre class="brush: xhtml; toolbar: false">&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;A basic site architecture&lt;/title&gt;
	&lt;!-- Include all CSS, JS, and meta information --&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;!-- header.php --&gt;
	&lt;div id="header"&gt;
		&lt;img src="image/logo.gif" alt="Logo" height="50" width="200" /&gt;
		&lt;h2&gt;A place to fly with turtles!&lt;/h2&gt;
	&lt;/div&gt;
	&lt;!-- nav.php --&gt;
	&lt;ul id="nav"&gt;
		&lt;li&gt;&lt;a href="about/index.php"&gt;About&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="blog/index.php"&gt;Blog&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="contact/index.php"&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;

	&lt;div id="main"&gt;
		&lt;!-- Main content goes here --&gt;
	&lt;/div&gt;

	&lt;!-- footer.php --&gt;
	&lt;div id="footer"&gt;&lt;p&gt;Copyright 2010&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Looks just like a normal <code>.html</code> file, but it was created from smaller files at the moment we requested it from the server!  You can use this simple method to abstract out just about anything from your pages, including the <code>&lt;head&gt;</code> information if you so choose.  Other pages can be created using the <code>index.php</code> file as a template (and replacing the content in the main div) or by using an <span class="highlight">Ajax request</span> to dynamically load new files into the main div.  If you choose to create the files individually, I recommend creating a new subdirectory and <code>index.php</code> for each subpage.  This with allow you to link people directly to subpages (http://www.yourdomain.com/about) without having to explain what a <code>.php</code> file is.</p>
<p>Remember that the goal here is to reduce redundancy and allow for maximum flexibility.  That being said, you must decide for yourself which sections of your site are best to separate out and which you are going to want to customize for each page.  Reusing the same meta information for every page on your site may save you some time, but you lose the ability to adjust your keywords and page titles to optimize your search engine placement.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/12/how-to-structure-a-simple-site-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Google Font Directory</title>
		<link>http://danielsellergren.com/2010/12/using-the-google-font-directory/</link>
		<comments>http://danielsellergren.com/2010/12/using-the-google-font-directory/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 19:24:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=92</guid>
		<description><![CDATA[The Google Font Directory (or Google WebFonts) is an extremely simple way for developers and designers to expand their repertoire of available fonts. Typography on the web is usually restricted by the short list of Common Websafe Fonts that are &#8230; <a href="http://danielsellergren.com/2010/12/using-the-google-font-directory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://code.google.com/webfonts" target="_blank">Google Font Directory (or Google WebFonts)</a> is an extremely simple way for developers and designers to expand their repertoire of available fonts.  Typography on the web is usually restricted by the short list of <a href="http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html" target="_blank">Common Websafe Fonts</a> that are available (or nearly equivalent) on all platforms.  The only solution for many years was to use images, but this decreases readability for search engines and web crawlers, and can add significant loading time for your site.</p>
<p>Modern browsers are beginning to accept a variety of ways to import outside fonts, but the easiest and most universal way at this time is Google WebFonts.  By going to the <a href="http://code.google.com/webfonts" target="_blank">directory</a> and selecting the font you&#8217;d like you use, Google will give you a link to a remote stylesheet (hosted by their servers), and then all you have to do is use it.  Let&#8217;s take a look:</p>
<pre class="brush: xhtml; toolbar: false">&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Checking out Google WebFonts&lt;/title&gt;
	&lt;link href="http://fonts.googleapis.com/css?family=Droid+Sans"
		rel="stylesheet" type="text/css" /&gt;
	&lt;link href="css/style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;

	&lt;h1&gt;Check out this headline!&lt;/h1&gt;
	&lt;p&gt;This will just be normal text&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p><span id="more-92"></span></p>
<p>You can see that in the <code>&lt;head&gt;</code> we have loaded two external stylesheets.  The first is from the Google Font API which will have the browser load and initialize the use of your desired font, and the second is your own stylesheet for the site.  Inside your stylesheet all you have to add is:</p>
<pre class="brush: xhtml; toolbar: false">h1 {
	font-family: 'Droid Sans', Helvetica, Arial, sans-serif;
}</pre>
<p>That&#8217;s it!  Anytime you want to use this font all you have to do is change the <code>font-family</code> declaration.  You&#8217;ll notice that I&#8217;ve included several fallback fonts for older browsers that don&#8217;t support WebFonts.  It&#8217;s always important to degrade gracefully for your older users, although it is becoming less of a concern as even Microsoft is starting to catch up with the technology.  Remember, because you&#8217;re using actual text instead of an image you can apply all the CSS you want to customize your look.  Try some other neat CSS3 like <code>text-shadow</code> for a really modern look!</p>
<pre class="brush: xhtml; toolbar: false">h1 {
	font-family: 'Droid Sans', Helvetica, Arial, sans-serif;
	font-size: 3em;
	letter-spacing: -1px;
	-moz-text-shadow: 2px 2px 3px #CCC;
	-webkit-text-shadow: 2px 2px 3px #CCC;
	text-shadow: 2px 2px 3px #CCC;
}</pre>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/webfonts1.jpg"><img class="size-full wp-image-96  aligncenter" title="Google WebFonts Example" src="http://danielsellergren.com/wp-content/uploads/2010/12/webfonts1.jpg" alt="Google Font Directory Example" width="516" height="165" /></a></p>
<p>Head over to the <a href="http://code.google.com/webfonts" target="_blank">Google Font Directory</a> to try it out yourself!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/12/using-the-google-font-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kuhn Studio</title>
		<link>http://danielsellergren.com/2010/12/kuhn-studio/</link>
		<comments>http://danielsellergren.com/2010/12/kuhn-studio/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 20:11:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[portfolio]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=104</guid>
		<description><![CDATA[World renowned glass artist Jon Kuhn needed a modern website to maintain his creative business. We decided to go for a very modern, dark, minimalist design so that the artwork could speak for itself. Thin, sans-serif typography and an Ajax &#8230; <a href="http://danielsellergren.com/2010/12/kuhn-studio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>World renowned glass artist <a href="http://www.kuhnstudio.com" target="_blank">Jon Kuhn needed a modern website to maintain his creative business.</a> We decided to go for a very modern, dark, minimalist design so that the artwork could speak for itself.  Thin, sans-serif typography and an Ajax powered interface gives a slick feel that is easy to navigate.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn1.jpg"><img class="aligncenter size-full wp-image-105" title="Kuhn Studio Site #1" src="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn1.jpg" alt="Kuhn Studio Site #1" width="517" height="403" /></a></p>
<p>Using a slightly modified version of the beautiful jQuery photo gallery plugin <a href="http://galleria.aino.se" target="_blank">Galleria</a> gives a smooth way of viewing Jon&#8217;s artwork.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn2.jpg"><img class="aligncenter size-full wp-image-106" title="Kuhn Studio Site #2" src="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn2.jpg" alt="Kuhn Studio Site #2" width="517" height="386" /></a></p>
<p>We created a customized Google Map to display some of the most prominent museums and galleries where Jon&#8217;s work can be seen in person.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn3.jpg"><img class="aligncenter size-full wp-image-107" title="Kuhn Studio Site #3" src="http://danielsellergren.com/wp-content/uploads/2010/12/kuhn3.jpg" alt="Kuhn Studio Site #3" width="518" height="403" /></a></p>
<p>I designed and coded each page by hand while receiving feedback from the studio.  Take a look at the <a href="http://www.kuhnstudio.com" target="_blank">finished product</a> and tell me what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/12/kuhn-studio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Litter Free RVA</title>
		<link>http://danielsellergren.com/2010/11/litter-free-rva/</link>
		<comments>http://danielsellergren.com/2010/11/litter-free-rva/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 19:03:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=160</guid>
		<description><![CDATA[Litter Free RVA needed a social headquarters where they could post announcements, take donations, and maintain contact with their group of volunteers. I modified a simple WordPress theme that allowed them to create their own content and broadcast their messages &#8230; <a href="http://danielsellergren.com/2010/11/litter-free-rva/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://litterfreerva.com" target="_blank">Litter Free RVA needed a social headquarters</a> where they could post announcements, take donations, and maintain contact with their group of volunteers. I modified a simple WordPress theme that allowed them to create their own content and broadcast their messages to Facebook, Twitter, and Picasa.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/02/lfrva1a.jpg"><img class="aligncenter size-full wp-image-161" title="Litter Free RVA Site #1" src="http://danielsellergren.com/wp-content/uploads/2011/02/lfrva1a.jpg" alt="Litter Free RVA Site #1" width="525" height="357" /></a></p>
<p style="text-align: left;">By creating a central place for news, cleanup dates, past photos, and live Twitter updates they are able to reach more people with less redundant effort.</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2011/02/lfrva2a.jpg"><img class="aligncenter size-full wp-image-162" title="Litter Free RVA Site #2" src="http://danielsellergren.com/wp-content/uploads/2011/02/lfrva2a.jpg" alt="Litter Free RVA Site #2" width="525" height="357" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/11/litter-free-rva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to HTML in 30 minutes</title>
		<link>http://danielsellergren.com/2010/10/introduction-to-html-in-30-minutes/</link>
		<comments>http://danielsellergren.com/2010/10/introduction-to-html-in-30-minutes/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 04:47:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[deprecation]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://danielsellergren.com/?p=30</guid>
		<description><![CDATA[HTML stands for HyperText Markup Language, and it is the building block for every site on the internet. It is not a programming language but rather an architecture that defines and organizes information for display in a web browser. HTML &#8230; <a href="http://danielsellergren.com/2010/10/introduction-to-html-in-30-minutes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>HTML stands for <span class="highlight">HyperText Markup Language</span>, and it is the building block for every site on the internet.  It is not a programming language but rather an architecture that defines and organizes information for display in a web browser.  HTML is actually quite easy to learn but it is important to get a firm hold on the basics so that later on you can build upon your knowledge with the design of Cascading Style Sheets and the client-side scripting of JavaScript.</p>
<h3>Getting Started</h3>
<p>HTML is made entirely of little bits of code called <span class="highlight">tags</span>.  Each set of tags gives context to the information contained between them.  For example, an HTML page is contained within the opening tag <code>&lt;html&gt;</code> and the closing tag <code>&lt;/html&gt;</code>.  Within those tags are other tags that describe and contain smaller sections of the page until each desired element has been created.  Placing tags within tags is called <span class="highlight">nesting</span>.  All sets of tags must be closed in the order they are opened, which means that a nested tag must be closed before its parent (the outside set of tags) is closed.</p>
<pre class="brush: xhtml; toolbar: false">&lt;html&gt;
&lt;head&gt;
	... Header information goes here ...
&lt;/head&gt;
&lt;body&gt;
	... The content of the page ...
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>With these rules in mind we can start to build ourselves a web page.</p>
<p><span id="more-30"></span></p>
<h3>Headers</h3>
<p>As we learned before, the entire HTML document is contained within the <code>&lt;html&gt;</code> and <code>&lt;/html&gt;</code> tags.  Well, almost.  Before we can get started we need to give the web browser a little information that it will use to determine what it is trying to display.  You can instruct the browser to display the page as HTML by including <code>&lt;!doctype html&gt;</code> in the very first line of the document.  In the past this <span class="highlight">doctype declaration</span> was much longer and more complicated but with the coming of HTML5 it has been simplified to just two words.  <em>Note that although this looks like an HTML tag it is just an instruction for the web browser and therefore does not have to be closed.</em></p>
<p>Now that the doctype is out of the way, let&#8217;s get into the rest of the header.  Anything between the <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags will describe information about the document as a whole.  Take a look at the following code:</p>
<pre class="brush: xhtml; toolbar: false">&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Top of the browser!&lt;/title&gt;
	&lt;meta name="Keywords" content="html, porkchops, web" /&gt;
	&lt;meta name="Description" content="Introduction to HTML" /&gt;
	&lt;link /&gt;
	&lt;script&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
	... We will cover this area next ...
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Within the <code>&lt;head&gt;</code> tags you&#8217;ll notice four new tags that describe various information about the document itself.  The <code>&lt;title&gt;</code> tags contain the text, generally the name of the site and information about the current page, that appears at the very top of every browser window.  It will also be used by search engines to help list your site (if you want them to) and by users who choose to bookmark your page.  The <code>&lt;meta&gt;</code> tags contain even more information that search engines can use to categorize your content and guide people to your site.  An important part of <span class="highlight">SEO</span>, or Search Engine Optimization, is researching and choosing the right words to get your page listed by the major search engines.</p>
<p>The <code>&lt;link&gt;</code> tag refers to an external stylesheet, something we will cover in the next tutorial.  It links this HTML file to a separate <span class="highlight">CSS</span> file that determines the style and design of the page.  The HTML is simply for the architecture and content of the page.  Similarly the <code>&lt;script&gt;</code> tag refers to a separate <span class="highlight">JavaScript</span> file that contains any functions or plugins that the page may want to use.  Do not concern yourself too much with these now as they will be explained in the CSS and JavaScript tutorials.</p>
<h3>Text &amp; Links</h3>
<p>Now that we&#8217;ve taken care of describing our page, it&#8217;s time to populate it with real content.  All of the text, images, and data for display go between the <code>&lt;body&gt;</code> tags and are surrounded by their own specific tags.  Take a look at the following code:</p>
<pre class="brush: xhtml; toolbar: false">&lt;body&gt;
	&lt;h1&gt;Lizards for sale!&lt;/h1&gt;
	&lt;h2&gt;Limited time only&lt;/h2&gt;
	&lt;p&gt;I am selling a dozen green and purple iguanas that I found
	near my uncle's house.  They are going for fifty dollars each but I
	am willing to barter.  &lt;em&gt;Serious offers only.&lt;/em&gt;
	&lt;strong&gt;You must be able to drive to Florida to pick up!&lt;/strong&gt;
	For more information about iguanas please
	&lt;a href="http://en.wikipedia.org/wiki/Iguanidae"&gt;click here&lt;/a&gt;.&lt;/p&gt;
&lt;/body&gt;</pre>
<p>Now take a look at how this looks when displayed in a web browser with no additional CSS.  Can you tell which tags contain each different type of text?</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/10/intro-to-html12.png"><img class="size-full wp-image-63  aligncenter" title="HTML Example" src="http://danielsellergren.com/wp-content/uploads/2010/10/intro-to-html12.png" alt="HTML Example" width="533" height="168" /></a></p>
<p>Let&#8217;s quickly break down each of these tags and what they are used for.  The <code>&lt;h1&gt;</code> tags and the <code>&lt;h2&gt;</code> tags are used for headlines and sub–headlines.  By default they may be larger or have a thicker font–weight than normal text, but they can be completely customized in your CSS file.  Headlines can run from <code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code> with each having its own distinct style if so desired.</p>
<p>The <code>&lt;p&gt;</code> tags wrap around any paragraph of normal text.  Using <code>&lt;p&gt;</code> automatically starts a new line with some normal sized text.  Within a paragraph you can alter any segment of text in several different ways.  The <code>&lt;em&gt;</code> tag stands for “emphasis” which defaults to the same thing as <em>italics</em> in most browsers.  The &lt;strong&gt; tag is another way to stress the importance of a specific string of text and it defaults to <strong>bold</strong> in most browsers.  Either of these modifier tags can have their effects altered through CSS.</p>
<p>The &lt;a&gt; tag is probably the most important aspect of the early days of the internet.  It is the tag that creates a <span class="highlight">hyperlink</span> (usually just referred to as a link) that allows for the association of two related pages.  There are often dozens or hundreds of links on every webpage, with some linking internally to other parts of a site, and some linking to any site on the internet.  This interconnected nature is the most fundamental aspect of what has evolved online.</p>
<h3>Visual elements</h3>
<h4>Lists</h4>
<p>Now that we&#8217;ve covered how to display normal text in paragraphs and headlines we can delve deeper into various methods of displaying alternate types of information.  You can undoubtably seen different types of lists in word processing software and all over the web.  There are three basic types of lists in HTML which use the tags <code>&lt;ul&gt;</code>, <code>&lt;ol&gt;</code>, and <code>&lt;dl&gt;</code>.  Let&#8217;s take a look at them in action:</p>
<pre class="brush: xhtml; toolbar: false">&lt;body&gt;
	&lt;ul&gt;
		&lt;li&gt;Almonds&lt;/li&gt;
		&lt;li&gt;Skittles&lt;/li&gt;
		&lt;li&gt;Tuna&lt;/li&gt;
	&lt;/ul&gt;
	&lt;ol&gt;
		&lt;li&gt;Slay dragon&lt;/li&gt;
		&amp;li;li&gt;???&lt;/li&gt;
		&lt;li value="4"&gt;Profit&lt;/li&gt;
	&lt;/ol&gt;
	&lt;dl&gt;
		&lt;dt&gt;Muffins: &lt;/dt&gt;
		&lt;dd&gt;Delicious oven yumyums&lt;/dd&gt;
		&lt;dt&gt;Sniffum: &lt;/dt&gt;
		&lt;dd&gt;What you should do to muffins&lt;/dd&gt;
	&lt;/dl&gt;
&lt;/body&gt;</pre>
<p>And now let&#8217;s see how these are displayed by default:</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/10/list_example.png"><img class="size-full wp-image-81  aligncenter" title="List example" src="http://danielsellergren.com/wp-content/uploads/2010/10/list_example.png" alt="List example" width="500" height="240" /></a></p>
<p>The first type of list is the <span class="highlight">unordered list</span> which uses the <code>&lt;ul&gt;</code> tag.  Each individual list item is surrounded by <code>&lt;li&gt;</code> tags.  This type of list is useful to illustrate talking points, and is quite often used as the structure for a navigation menu (don&#8217;t worry we&#8217;ll get to this later).  By default each list item is given its own line and bullet.  These are completely customizable, or can be removed, in the stylesheet.</p>
<p>The next type of list is the (you guessed it) <span class="highlight">ordered list</span> which uses the <code>&lt;ol&gt;</code> tag.  It is almost the same as the unordered list, but uses an increasing number instead of a bullet.  Each list item will increment the number by one, unless you specify the <code>&lt;value&gt;</code> attribute.  An <span class="highlight">attribute</span> is something within a tag that modifies it.  In this case we replace what would normally have been a 3 with a 4 by setting a <code>&lt;value&gt;</code> attribute.</p>
<p>The final type is the <span class="highlight">definition list</span> which contains separate tags <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> for <span class="highlight">definition term</span> and <span class="highlight">definition description</span>, respectively.  This allows you to specify lists that have two distinct parts, usually a value and a description of that value.</p>
<h4>Tables</h4>
<p><span class="highlight">Tables</span> are useful for displaying larger amounts of data in an organized way.  Much like the lists we just covered, tables are made of a parent tag called <code>&lt;table&gt;</code> within which are more specific tags that define different aspects of the data.  Take a look at the code:</p>
<pre class="brush: xhtml; toolbar: false">&lt;body&gt;
	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Animal&lt;/th&gt;
			&lt;th&gt;# of Teacups needed&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Giraffe&lt;/td&gt;
			&lt;td&gt;1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Penguin&lt;/td&gt;
			&lt;td&gt;2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Octopus&lt;/td&gt;
			&lt;td&gt;8&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
&lt;/body&gt;</pre>
<p>Which displays as:</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/10/table_example.png"><img class="size-full wp-image-82  aligncenter" title="Table example" src="http://danielsellergren.com/wp-content/uploads/2010/10/table_example.png" alt="Table example" width="500" height="105" /></a></p>
<p>Inside the <code>&lt;table&gt;</code> tags you&#8217;ll notice three new tags that cover different elements of the table.  The <code>&lt;tr&gt;</code> tag begins a new row in the table, inside which you can have either a <code>&lt;th&gt;</code> for table header (usually describing the contents of the row or column) or a <code>&lt;td&gt;</code> for table data that contains the actual data you want to display.  Note the indentation on the code that helps visualize how the final table will look but don&#8217;t focus too much on appearances.  HTML is all about structure and meaning which is later styled with CSS.</p>
<h4>Images</h4>
<p>While initially images were too large to be transmitted quickly across the web, they are now an irreplaceable part of our online experience.  There are billions of photographs and images on the internet and they allow for a level of detail and intimacy that often cannot be easily expressed in words.  The most common way for an image to be displayed on a web page is by using the <code>&lt;img&gt;</code> tag.</p>
<pre class="brush: xhtml; toolbar: false">&lt;body&gt;
	&lt;p&gt;Here is an image I found of a turtle: &lt;/p&gt;
	&lt;img src="wiki_turtle.png" alt="Turtle" height="470" width="571" /&gt;
&lt;/body&gt;</pre>
<p>See it in action:</p>
<p style="text-align: center;"><a href="http://danielsellergren.com/wp-content/uploads/2010/10/image_example.png"><img class="size-full wp-image-83  aligncenter" title="Image example" src="http://danielsellergren.com/wp-content/uploads/2010/10/image_example.png" alt="Image example" width="401" height="363" /></a></p>
<p>Make sure to notice a few things about the <code>&lt;img&gt;</code> tag.  It contains several attributes such as <code>alt</code> that provides alternate text if the image cannot be displayed, and <code>height</code> and <code>weight</code> attributes that make sure your layout displays correctly even if the image is not found.  Because the <code>&lt;img&gt;</code> cannot enclose anything, it is self closing with a <code>/&gt;</code> after the attributes have been set.  Note that it is very common to surround the <code>&lt;img&gt;</code> tag with the <code>&lt;a&gt;</code> tag in order to turn the image into a clickable link.</p>
<h4>Layout</h4>
<p>The last visual elements we will discuss are perhaps the most important, and can be a little abstract for newcomers so pay attention.  Web layout—in other words how individual elements are arranged horizontally and vertically on the page—used to be done with the <code>&lt;table&gt;</code> tag.  This worked fine in the early days of the visual web, but over the last decade this inflexible practice has been replaced by the <code>&lt;div&gt;</code> element.  A <code>&lt;div&gt;</code> defines a block of space that contains information related to one another.  It can contain a logo, a navigation menu, a blog post, or a section of a page.  Anything that you may want to position or style as one cohesive unit goes in a <code>&lt;div&gt;</code>.  In the CSS tutorial we will cover the <span class="highlighter">box model</span> and how the visual layout is created, but for now just appreciate the idea of separating related content into its own box.</p>
<p>The <code>&lt;span&gt;</code> tag is conceptually similar to the <code>&lt;div&gt;</code> except for it relates specifically to chunks of text.  If you want to mark a particular segment of text as being of a type you may want to use again, such as the <span class="highlight">highlighted</span> text you see in this tutorial, then you should surround the text with <code>&lt;span&gt;</code> tags.</p>
<p>Either of these tags can be given an <code>id</code> and <code>class</code> attribute that will identify it and allow you to control its style in the stylesheet.</p>
<h3>Looking ahead</h3>
<h4>Validation</h4>
<p>Now that you know the basics of HTML, you should always be following the simple rules that govern how it works.  Make sure you close every tag you open, and in the correct order.  Make sure quotation marks and parentheses always come in pairs.  Make sure that all required attributes are in place.  These simple syntactical requirements can become rather cumbersome to keep up with and difficult to double-check when pages become larger, so luckily there are simple tools that allow you to check your pages against the rulebook.  This is called <span class="highlight">validation</span> and is an important final step before releasing your page to the world.</p>
<p>The <a href="http://validator.w3.org/" target="_blank">W3C Markup Validation Service</a> is a free online program that will <span class="highlight">parse</span> your page and tell you if you have made any errors that might affect how is is displayed in a web browser.  Simply go to the site and pick one of three options: link to your page, upload your .html file, or copy and paste the code itself.  There are also several plugins available for popular browsers like FireFox and Chrome and will automatically validate any site you visit.  Having valid code not only helps you make sure that your site displays correctly, but it also makes your work significantly more professional in appearance.</p>
<h4>Deprecated tags</h4>
<p>There are many tags and attributes that you may come across when viewing older source code.  These tags are largely outdated, and will become <span class="highlight">deprecated</span> or no longer valid in forthcoming versions of the HTML standard.  Here is a (very) partial list that you may come across:</p>
<ul class="post_list">
<li><code>&lt;center&gt;</code> — replaced by CSS: <code>text-align</code> property</li>
<li><code>&lt;font&gt;</code> — replaced by CSS: <code>font-family</code> property</li>
<li><code>&lt;b&gt;</code> — replaced by <code>&lt;strong&gt;</code> and CSS: <code>font-weight</code> property</li>
<li><code>&lt;i&gt;</code> — replaced by <code>&lt;em&gt;</code> and CSS: <code>font-style</code> property</li>
<li><code>&lt;u&gt;</code> — replaced by CSS: <code>text-decoration</code> property</li>
<li><code>&lt;strike&gt;</code> — replaced by CSS: <code>text-decoration</code> property</li>
<li><code>align</code> attribute — replaced by CSS: <code>text-align</code> property</li>
<li><code>bgcolor</code> attribute — replaced by CSS: <code>background-color</code> property</li>
<li><code>color</code> attribute — replaced by CSS: <code>color</code> property</li>
</ul>
<h4>HTML5</h4>
<p>The web is currently in transition to the next version of the HTML standard, which is HTML5.  XHTML2 has been incorporated into the new HTML standard, and there are many significant changes coming.  Although the official implementation won&#8217;t be adopted for several years, most modern browsers are already supporting many of the new features and tags.  The biggest updates are coming to layout, audio/video, graphics, webforms, and user interface.  I will be posting a full HTML5 tutorial in the coming weeks, but until then there is a great source of information available at <a href="http://diveintohtml5.org" target="_blank">Dive into HTML5</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielsellergren.com/2010/10/introduction-to-html-in-30-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
