<?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>The portfolio of davekilljoy, formerly known as David B Stubbs</title>
	<atom:link href="http://www.davekilljoy.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davekilljoy.com/blog</link>
	<description>Introductions, Tutorials and Resources for aspiring web developers everywhere</description>
	<lastBuildDate>Mon, 05 Apr 2010 14:00:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Brief time in the Spotlight =P</title>
		<link>http://www.davekilljoy.com/blog/2010/brief-time-in-the-spotlight-p/</link>
		<comments>http://www.davekilljoy.com/blog/2010/brief-time-in-the-spotlight-p/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:00:27 +0000</pubDate>
		<dc:creator>davekilljoy</dc:creator>
				<category><![CDATA[Expression Blend 3]]></category>

		<guid isPermaLink="false">http://www.davekilljoy.com/blog/?p=38</guid>
		<description><![CDATA[This is a pretty weak blog post, but I&#8217;m going to do it anyways. A while back I had been interviewed by CTV on what User Experience Designers do at Infusion, the company where I work. Anyways long story short, one of my30 under 30 goals (coming soon..maybe) was to be on TV, and I was &#8211; you [...]]]></description>
			<content:encoded><![CDATA[<p>This is a pretty weak blog post, but I&#8217;m going to do it anyways. A while back I had been interviewed by CTV on what User Experience Designers do at Infusion, the company where I work. Anyways long story short, one of my30 under 30 goals (coming soon..maybe) was to be on TV, and I was &#8211; you can check it out <a title="David Stubbs User Experience Designer" href="http://watch.ctv.ca/news/clip284606#clip284606" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davekilljoy.com/blog/2010/brief-time-in-the-spotlight-p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The next evolution of twitter</title>
		<link>http://www.davekilljoy.com/blog/2010/the-next-evolution-of-twitter/</link>
		<comments>http://www.davekilljoy.com/blog/2010/the-next-evolution-of-twitter/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 13:31:56 +0000</pubDate>
		<dc:creator>davekilljoy</dc:creator>
				<category><![CDATA[Random Thought]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.davekilljoy.com/blog/?p=17</guid>
		<description><![CDATA[
Today I was cruising my twitter feed and it dawned on me that the next step in the evolution of the whole micro-blogging stream, is substreams.

Let me explain &#8211; twitter is an all or nothing deal, when you subscribe to someones twitter feed you see everything they are publishing. As of right now there is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-36" title="twitter bird" src="http://www.davekilljoy.com/blog/wp-content/uploads/2010/03/Logo.jpg" alt="twitter bird" width="550" height="216" /></p>
<p>Today I was cruising my <a href="http://twitter.com/davekilljoy" target="_blank">twitter</a> feed and it dawned on me that the next step in the evolution of the whole micro-blogging stream, is substreams.</p>
<p><span id="more-17"></span></p>
<p>Let me explain &#8211; twitter is an all or nothing deal, when you subscribe to someones twitter feed you see everything they are publishing. As of right now there is no way to filter the information easily. I know you can create a specific search on the client side of things, but I&#8217;m talking of this kind of functionality on the server side. Users can also create different twitter accounts for the different kinds of information you want to post. A great example would be <a title="TravelAlerts Twitter" href="http://twitter.com/TravelAlerts" target="_blank">TravelAlerts</a> which is a travel deals website that has multiple twitter accounts for different cities in Canada; one for Toronto, one for Montreal and so on.</p>
<p>What if there was a way to create 1 twitter account &#8211; TravelAlerts, then in there was the ability to subscribe to multiple substreams users can Follow, TravelAlters[Toronto], TravelAlerts[Montreal]. I would imagine that you could subscribe to either the full stream from TravelAlters if you&#8217;d want to see all tweets from all their substreams, or alternatively you can pick and choose which substream to subscribe in a-la cart style.</p>
<p>The admin wouldn&#8217;t be very hard at all either, as your tweeting I would imagine a drop down to select which substream you&#8217;d want to target the tweet, if you don&#8217;t select one then it would just be a global tweet all main stream and substream subscribers would get. For example I want to announce there is a contest coming up for TravelAletrs and it is Canada wide, and I want to reach all my followers, not just Toronto, Montreal etc followers. I would write the tweet with no specific substream target, and because it has no target, the tweet would go out to everyone, regardless of their substream following. With this model it would be very easy to get the attention of all followers, while maintaining 1 consistent account and targeting multiple users specific needs as well.</p>
<p>This seems to me like the next step for twitter, and I am sure many people would love to cut down the amount of accounts they would need to maintain. On top of that, you can have multiple substreams but still have the ability to call out to all of them with global messages. Some examples of services that could use this substream idea would be GameSpot [Ps3, Xbox, Reviews etc], Real Estate [250-300k in Toronto, 300-450k in Montreal etc..] and BestBuy [TV, Music etc..], they could leverage the multiple streams to target the people they want, on top of that you could get some Return On Investment on the data returned &#8211; seeing how many people subscribe to a certain substream, and catering ads to those people.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davekilljoy.com/blog/2010/the-next-evolution-of-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week in Blend &#8211; Reset</title>
		<link>http://www.davekilljoy.com/blog/2009/this-week-in-blend-reset/</link>
		<comments>http://www.davekilljoy.com/blog/2009/this-week-in-blend-reset/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 14:52:42 +0000</pubDate>
		<dc:creator>davekilljoy</dc:creator>
				<category><![CDATA[Expression Blend 3]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[blend]]></category>
		<category><![CDATA[expression blend]]></category>
		<category><![CDATA[tips of the week]]></category>

		<guid isPermaLink="false">http://www.davekilljoy.com/blog/?p=7</guid>
		<description><![CDATA[Hello all, I’m trying this new weekly Blend tip thing. These will be little tips and tricks that will hopefully alleviate some of the nuances and annoyances of Blend.
This week – Reset!
A lot of the time, Blend will set margins and odd settings automatically when you are doing edits on properties (width, height) or when [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all, I’m trying this new weekly Blend tip thing. These will be little tips and tricks that will hopefully alleviate some of the nuances and annoyances of Blend.</p>
<h3>This week – Reset!</h3>
<p>A lot of the time, Blend will set margins and odd settings automatically when you are doing edits on properties (width, height) or when you are dragging objects around the Artboard. A quick and easy way to see what’s going on is by looking at the little square that is next to every property.</p>
<p><img class="size-medium wp-image-8" title="Tip1" src="http://www.davekilljoy.com/blog/wp-content/uploads/2009/07/Tip1-300x247.png" alt="Blend 3 Properties Panel " width="300" height="247" /></p>
<p><span id="more-7"></span></p>
<p>A blank square will denote that there is nothing set for that property, a white square means there is a property set, an orange square means there is a Binding set, and a green square means there is a Local Resource set.</p>
<p><img src="http://www.davekilljoy.com/blog/wp-content/uploads/2009/07/Tip4-300x248.png" alt="Tip4" title="Tip4" width="300" height="248" class="alignleft size-medium wp-image-11" /></p>
<p>Any who, an easy way to get rid of that pesky setting is to simply do a Reset, we can do that by clicking on the white square, and selecting Reset. It’s a good way to get rid of annoying margins, weird alignments, odd heights/widths and so on.</p>
<p><img src="http://www.davekilljoy.com/blog/wp-content/uploads/2009/07/Tip3-300x247.png" alt="Tip3" title="Tip3" width="300" height="247" class="alignleft size-medium wp-image-10" /></p>
<p>That about wraps it up, tune in next week for another crazy tip?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davekilljoy.com/blog/2009/this-week-in-blend-reset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Intermediate CSS Techniques</title>
		<link>http://www.davekilljoy.com/blog/2008/intermediate-css-techniques/</link>
		<comments>http://www.davekilljoy.com/blog/2008/intermediate-css-techniques/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 14:46:38 +0000</pubDate>
		<dc:creator>davekilljoy</dc:creator>
				<category><![CDATA[What I've learned about Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.davekilljoy.com/blog/?p=5</guid>
		<description><![CDATA[Continuing from where we left off, lets take a look at some of the awesome things CSS can really do.
 The Basics
Let&#8217;s start with the most common and basic CSS attributes, width and height. Once you assign a class to an element you are free to style it any way you want. We will be [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing from where we left off, lets take a look at some of the awesome things CSS can really do.</p>
<h3> The Basics</h3>
<p>Let&#8217;s start with the most common and basic CSS attributes, <code>width</code> and <code>height</code>. Once you assign a <code>class</code> to an element you are free to style it any way you want. We will be using this code snipet and styling it as examples.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;test&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Hello<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p><span id="more-5"></span><br />
You can now assign <code>height</code> and <code>width</code> values, like this. Take special note that after each attribute, we add a <code>;</code> to tell the browser to move to the next attribute.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">.test<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Which would look like. Take note I added a background color so you could see the dimensions of the <code>&lt;div&gt;</code>.</p>
<div class="ex_code">
<style type="text/css">
.test{
  width:200px;
  height:200px;
  background-color:Blue;
  color:White;
}
</style>
<div class="test">
<p>Hello</p>
</div>
</div>
<p>We can also apply different colors to text and backgrounds. When applying colors to backgrounds of fonts, you can use color names like Red, Blue, Green (the full list can be seen <a href="http://www.w3schools.com/css/css_colornames.asp" target="_blank">here</a>), hex values (#000000, #FFFFFF) or the RGB value (rgb(0,0,0)). To recap, to change the color of a font, we use <code>color</code>, and to change the color of a background we use <code>background-color</code>. This is how it would look.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">.test<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span>Pink<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span>Blue<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Which would look like this.</p>
<div class="ex_code">
<style type="text/css">
.test2{
  color:Pink;
  background-color:Blue;
}
</style>
<div class="test2">
<p>Hello</p>
</div>
</div>
<p>There are many font modifiers was have available to us as well. Here are a few.</p>
<ul>
<li><code>font-family</code> &#8211; Defines a either a certain font (Times New Roman) or a font type (San-Serif)</li>
<li><code>font-weight</code> &#8211; Defines if the font will be bold or not.</li>
<li><code>font-size</code> &#8211; Defines the size of the font either in pixels(px), points(pt), multiply(em)</li>
</ul>
<p>The CSS would be something like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">.test<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Georgia</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">24px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>And it would look like this.</p>
<div class="ex_code">
<style type="text/css">
.test3{
  font-family:Georgia, "Times New Roman", Times, serif;
  font-size:24px;
  font-weight:bold;
}
</style>
<div class="test3">
<div>Hello</div>
</div>
</div>
<h3>Moving Forward</h3>
<p>Now that you have a good footing on CSS syntax, lets step it up a notch and introduce the <code>float</code>. Firs we&#8217;ll take a little history lesson. Traditionally, if you ever wanted a 2 column layout done in HTML, you would have to resort the tables, which looked something like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Column 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Column 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></td></tr></table></div>

<p>While it doesn&#8217;t look so bad now, tables are a nightmare and most importantly, they are not semantic. Why this is an issue is because tables were made for 1 thing, to display tabular information. This is a problem when Google or Yahoo are indexing your page, it thinks that your whole page is actually a table of information and treats it differently than it would if you have the information in a <code>&lt;div&gt;</code>. So how do we get around this? We use CSS of course.</p>
<p>First you must understand the difference between a Block Element and an Inline Element. A Block Element, like a <code>&lt;div&gt;</code>, is an element that will take up all available horizontal space. Lets take a look at an example. I&#8217;m going to use a <code>&lt;div&gt;</code> (Block Element) and a <code>&lt;span&gt;</code> (Inline Element). I&#8217;m going to apply a <code>background-color</code> to each one so you can really see what space they take up.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;test4&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Block Div<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>Inline Span<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>With no styles applied, the defualt behavior of each element is as follows.</p>
<div class="ex_code">
<style type="text/css">
.ex_code .test4 div{background-color:blue; color:white;}
.ex_code .test4 span{background-color:green; color:white;}
</style>
<div class="test4">
<div>Block Div</div>
<p><span>Inline Span</span>
</div>
</div>
<p>Do you see the difference? The Block Element fills up all the horizontal space it can, where the Inline Element only takes up the space its needs. So then I bet your asking yourself how do we make Block Elements sit next to each other horizontally? We use the magic of <code>Floats</code>. Unfortunately that will take a full tutorial. Stay tuned for the next one =).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davekilljoy.com/blog/2008/intermediate-css-techniques/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to HTML and CSS</title>
		<link>http://www.davekilljoy.com/blog/2008/introduction-to-html-and-css/</link>
		<comments>http://www.davekilljoy.com/blog/2008/introduction-to-html-and-css/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 14:31:18 +0000</pubDate>
		<dc:creator>davekilljoy</dc:creator>
				<category><![CDATA[What I've learned about Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.davekilljoy.com/blog/?p=4</guid>
		<description><![CDATA[Hi! First off, welcome to my website, its a brand new design and overall an excuse to try out my newly founded PHP/MySQL chops.
So here&#8217;s the deal, I&#8217;ve been learning web development for a while now, picking up tidbits from all over the web, books and friends helping me out. Then I started thinking, the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi! First off, welcome to my website, its a brand new design and overall an excuse to try out my newly founded PHP/MySQL chops.</p>
<p>So here&#8217;s the deal, I&#8217;ve been learning web development for a while now, picking up tidbits from all over the web, books and friends helping me out. Then I started thinking, the web has been so great for helping me, I feel like I should do the same, which is why I am writing the first of a long series or how to articles, tutorials and information. I&#8217;ll be covering everything sequentially, so first part will be something along the lines of intro to the web in general, HTML and CSS. The subsequent parts will cover things like advanced CSS, WordPress integration, PHP/MySQL, Javascript and more. Enough of this, lets get to it, after the jump!<br />
<span id="more-4"></span><br />
I suppose the most logical place to start would be introducing the concept of HTML and CSS to you.</p>
<h3>HTML</h3>
<p>HTML is a markup language, not to be confused with actual coding. I&#8217;m going to assume that you know absolutely nothing about HTML and start from the very beginning. All HTML tags start with a <code>&lt;tag&gt;</code> and end with a <code>&lt;/tag&gt;</code>, this for example would be valid markup.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>hello<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></td></tr></table></div>

<p>Here is a list of the most common tags:</p>
<ul>
<li><code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;h4&gt;</code>, <code>&lt;h5&gt;</code>, and <code>&lt;h6&gt;</code> &#8211; These are the most important to the least important header tags</li>
<li><code>&lt;p&gt;</code> &#8211; This is a paragraph tag, it is generally a good idea to put all your body text into one of these tags</li>
<li><code>&lt;a&gt;</code> &#8211; This is a link tag, use this to link to off site pages or in-site pages</li>
<li><code>&lt;div&gt;</code> &#8211; This is a container generally used to arrange content in an organized fashion</li>
</ul>
<p>There are many more tags for many different uses, to see all of them described go <a href="http://www.w3schools.com/tags/default.asp" target="_blank">here</a>.</p>
<p>So now we have a basic idea of what HTML tags look like, now lets go through some of the theory that goes behind coding HTML. HTML is a very linear language, where the further down in the code you are, the further down in the page you should technically be. Lets take a look at how some typical HTML should look.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Example 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/css/style.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/scripts/script.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Hi I'm a header<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>And I'm a paragraph of text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>Lets break it down, line by line. First we have the <code >&lt;head&gt;</code> tag. Anything put in between the opening <code >&lt;head&gt;</code> tag and closing <code >&lt;/head&gt;</code> tag will NOT be rendered in your browser. The <code >&lt;head&gt;</code> tag is used to load in things that are needed to make your web page work, things like your CSS style sheet, and Javascript. It is also where you define the title of your page, descriptions and keywords which we will get to in a bit.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></td></tr></table></div>

<p>Now lets take a closer look at some of the items we can have in the head tag.<br />
The <code >&lt;title&gt;</code> tag is used to define the title of the web page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Example 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span></pre></td></tr></table></div>

<p>The <code >&lt;link&gt;</code> tag is used to link to an external file. Notice in the <code >&lt;link&gt;</code> tag there is are &#8220;type&#8221; and &#8220;rel&#8221; identifiers. &#8220;Type&#8221; and &#8220;Rel&#8221; combined tell the browser how to handle the file it is linking to. In this instance we are linking to a CSS style sheet which literally styles the entire page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/css/style.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<p>This <code >&lt;script&gt;</code> tag is used to link to a Javascript file that contains code to modify your web page. We will discuss Javascript later on, but its good to know how to link to it properly. Notice again that we have a &#8220;type&#8221; identifier, to tell the browser how to handle the file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/scripts/script.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>Next we have the <code >&lt;html&gt;</code> and <code >&lt;body&gt;</code> tags. These are ESSENTIAL for your web page to work. They tell the browser that the actual HTML code starts and stops!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Hi I'm a header<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>And I'm a paragraph of text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>Next take a look at the <code >&lt;div&gt;</code> tag, its wrapping the <code >&lt;h1&gt;</code> and the<code >&lt;p&gt;</code> tags in a box.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>9
10
11
12
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Hi I'm a header<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>And I'm a paragraph of text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>This is useful because you can think of HTML as a collection of boxes stacked one on top of another, and that way its very easy to move things around if they are sectioned off in their own little boxes.</p>
<h3>CSS</h3>
<p>Now lets move on to CSS, the reason the web looks so cool now-a-days. CSS stands for Cascading Style Sheet. CSS is basically a separate file that defines your HTML tags (remember &#8211; <code >&lt;h1&gt;</code>, <code >&lt;p&gt;</code> etc.). By default every tag has a style already applied to it, that can be useful but I generally don&#8217;t like this, so I use a style sheet reset, which re-defines every HTML tag to have no style at all. You can get that reset <a href="http://developer.yahoo.com/yui/reset/" target="_blank">here</a>.</p>
<p>Now that we have a completely clean slate lets stay learning what CSS does and how its suppose to be written. CSS is based on &#8216;Classes&#8217;. Classes are a way of targeting specific tags to be styled a certain way. </p>
<p>First lets take a look at how to include a CSS file in your web page. You must include a .css file in the head of your HTML page, and the link is relative to where the HTML page is. Take a look at the example below, the style.css file is located in a folder called css.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Example 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/style.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></td></tr></table></div>

<p>Now lets take a look at what a Class looks like.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>This is a paragraph<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></td></tr></table></div>

<p>And then in the CSS stylesheet, we define the Class like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.header</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Take special note of the period <code>.</code> before the Class Name, that tells the browser reading the CSS style sheet that what you&#8217;re designating is indeed a Class. </p>
<p>This is how our code would look in a browser.</p>
<div class="ex_code">
<style type="text/css">
.ex_code .header {background-color:red; width:100px; height:40px; color:white;} 
</style>
<div class="header">
<p>This is a paragraph</p>
</div>
</div>
<p>You can pretty much do anything once you have assigned an element (<code>&lt;p class="text" &gt;</code> etc..) a Class, for the full specifications of what attributes you can give a Class, refer to the <a href="http://www.w3schools.com/Css/css_intro.asp" target="_blank">W3C Schools</a>. </p>
<p>This concludes Part 1 of What I&#8217;ve learned about Web Development, in Part 2, I&#8217;ll be diving much more in depth about CSS, tricks and tips.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davekilljoy.com/blog/2008/introduction-to-html-and-css/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
