<?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>Design Shack &#187; HTML</title>
	<atom:link href="http://designshack.net/category/articles/html/feed" rel="self" type="application/rss+xml" />
	<link>http://designshack.net</link>
	<description>Inspiration, CSS Gallery &#38; Community News</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Keep That New Year&#8217;s Resolution and Make the Leap From Print to Web Design</title>
		<link>http://designshack.net/articles/html/keep-that-new-years-resolution-and-make-the-leap-from-print-to-web-design/</link>
		<comments>http://designshack.net/articles/html/keep-that-new-years-resolution-and-make-the-leap-from-print-to-web-design/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 14:30:16 +0000</pubDate>
		<dc:creator>Carrie Cousins</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://designshack.net/?p=28553</guid>
		<description><![CDATA[You’ve been designing for print since college and have an eye for what makes visuals work. But the landscape has changed (and for some, might even look a little scary). So when the ball dropped at the start of 2012, your resolution was to learn a little more about the digital side of it all [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/printtoweb-0.jpg" alt="screenshot" width="510" /></div>
<p>You’ve been designing for print since college and have an eye for what makes visuals work. But the landscape has changed (and for some, might even look a little scary). So when the ball dropped at the start of 2012, your resolution was to learn a little more about the digital side of it all and make yourself that much more marketable.</p>
<p>Now is the time to get started. There are tons of resources out there to help print designers get their feet wet in coding, HTML and digital design. Because of the skills you already possess as a print designer, the transition might even be easier than you think. You already know how to use text, color and images, but need the skills to make it happen in the online format. With a little time and dedication, almost anyone can learn the basics with a few great (and free) tutorials right at your computer. </p>
<p><span id="more-28553"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Coding for Beginners</h2>
<p>Sites such as <a href="http://www.codecademy.com/#!/exercises/0">Codeacademy</a> and <a href="http://www.highercomputingforeveryone.com/">Carl Herold’s Higher Computing for Everyone</a> allow users to learn the basics of computer coding at no cost. Users go through a series of courses designed by developers.</p>
<p>Codeacademy, which started in the summer of 2011, boasts more than 500,000 users and received $2.5 million from investors to finance the venture in October, according to <a href="http://bits.blogs.nytimes.com/2011/10/27/codecademy-lands-2-5-million-from-investors/">The New York Times</a>. Higher Computing for Everyone, which started in 2009, claims about 6,000 subscribers. Each of the sites is easy to use and do not require previous knowledge of coding.</p>
<p><a href="http://www.codecademy.com/#!/exercises/0">
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/codeaca1.jpg" alt="screenshot" width="510" /></div>
<p></a></p>
<p>The bonus for Codeacademy is that the lessons are structured in an almost game-like way, allowing you to earn achievement badges for finishing lessons and sharing them online. Codeacademy lessons start at the most basic level – Lesson 1: Getting to Know You shows the syntax of programming – and moves on to lessons in Javascript functions. The only real downside is that the lessons lack context as to why things are done this way.</p>
<p>The game-like atmosphere of Codeacademy is fun. Going through the lessons gives you an immediate sense of accomplishment and understanding. With each entry in the practice area, the user gets immediate feedback on if the code was entered properly and if not, hints on how to proceed. The interface does not require sound and can be practiced at any pace, although it does work better if you complete whole lessons before logging out.</p>
<p><a href="http://www.highercomputingforeveryone.com/Course_2/Unit_5/Lesson_1/"><a href="http://www.highercomputingforeveryone.com/">
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/highercomput1.jpg" alt="screenshot" width="510" /></div>
<p></a></a></p>
<p>Carl Herold’s Higher Computing for Everyone is a much more structured setup. You do not have to register for the site to go through the lessons, which are more like reading lectures than the interactive nature of Codeacademy. Herold takes users through the history and background of coding and programming languages in the first lessons and moves on to writing basic programs. </p>
<p>The depth of information is impressive but the interface might be intimidating for first-time coders. The lessons require a lot of reading and the interface does not have a practice workspace. </p>
<p>Combining the lessons in the two online modules might be the best route for learning as much about coding as possible. Herold’s information explains the principles in a clear way so that you can get a grasp on what it all means. Codeacademy’s lessons offer hands-on experience working with programming in an easy-to-use format.</p>
<h2>Learn HTML</h2>
<p>Although a basic knowledge of coding can’t hurt anyone, most designers want to jump right into website design. That’s where HTML comes in. The markup language uses a set of tags noted inside angle brackets to describe what is on a web page.</p>
<p>Start with the free tutorials at <a href="http://www.w3schools.com/html/default.asp">w3schools.com</a> or <a href="http://htmldog.com/guides/htmlbeginner/">HTML Dog</a>. Each site offers a series of short lessons for beginners from how to use basic HTML – setting up paragraphs and headers – to more complex functions, such as building tables or inserting images. </p>
<p><a href="http://www.w3schools.com/html/default.asp">
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/w3sch1.jpg" alt="screenshot" width="510" /></div>
<p></a></p>
<p>The lessons from w3schools.com are fairly interactive and simple to understand. Each module allows users try playing with bits of HTML and see the results on the screen. The lessons also add an extra element of teaching to the exercises, explaining why certain tags work the way they do and how tings correspond to old and new methods of building web pages.</p>
<p>The beginner’s lessons at w3schools.com are pretty basic, but can lay a great groundwork for someone making the move from print having never worked online. The advanced lessons can really help designers make a page look the way they want without having to rely on free templates or boxed design sheets. The lessons include information on how to set up the layout of a web page; go into detail about working with media, such as images, video and audio; and introduce users to HTML5.</p>
<p><a href="http://htmldog.com/guides/htmlbeginner/paragraphs/">
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmldog1.jpg" alt="screenshot" width="510" /></div>
<p></a></p>
<p>HTML Dog’s lessons are much more of a guided tour. They serve as a direct guide that lets users practice on their own using Notepad and a web browser (which are standard on most computers). The lessons are pretty simple and direct but lack interactivity. The site though, does go into pretty good detail about all of the common usage terms that will pop up in HTML, such as &#8220;strong&#8221; and &#8220;em.&#8221;</p>
<p>HTML Dog does allow users to delve into more complex lessons as well, with an introduction to CSS and intermediate and advanced HTML courses that cover items such as Javascript and using forms.</p>
<h2>More Advanced “Courses”</h2>
<p>Now that you’re hooked on learning everything you can about the digital format, check out all the materials at <a href="http://code.google.com/edu/">Google Code University</a>. The program, sponsored by web giant Google, has the look and feel of a college course guide. </p>
<p><a href="http://code.google.com/edu/"></p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/google11.jpg" alt="screenshot" width="510" /></div>
<p></a></p>
<p>Lessons and courses are free and don’t require any registration. There are a host of different things to try, including tutorials recorded talks and courses with exercises. Much of the coursework is pretty advanced, with lectures and materials from educators and students at Harvard, Duke and Carnegie Mellon universities.</p>
<p>The major advantage to Google Code University is the network of resources. Lessons are up-to-date and move with technology, such as “Building an Android Application 101.” Each course lists prerequisite knowledge needed for the course, necessary software or materials and learning objectives.</p>
<h2>Practice New Skills</h2>
<p>The best way to test what you have learned is to put the concepts in action.</p>
<p>Feeling good about some of your coding skills? Create simple game or program to showcase your work. Play with something you can continue to work with and keep refining new skills. Create a web page – and don’t use a template. Start simple, but over time try to add new elements. Look at things you like online and try to replicate them on your site.</p>
<p>If you are feeling extra-confident, ask your boss to collaborate with others on a digital project or look for a small one you can handle alone but with supervision and guidance if you run into trouble. Let people know you are trying to make the leap to digital design; it is likely your peers will assist you along the way.</p>
<p>Finally keep learning new things. Once you have mastered coding and HTML, think about design in other areas such as for mobile applications and tablets.</p>
<h2>Conclusion</h2>
<p>There are great resources out there to help you learn all the new skills you want in 2012 – and you don’t have to go back to school to do it. Set a few goals and start with online courses and tutorials to make the most of your learning experience. </p>
<p>Practice everything you learn; just running through tutorials is not enough to make the skills relevant. Seek out experiences and projects that will test your new-found knowledge. Remember that the basic concepts that determine good design don&#8217;t change from print to the web; the key to success in both areas is an updated toolkit.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/keep-that-new-years-resolution-and-make-the-leap-from-print-to-web-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What Is HTML? The Anatomy of an HTML5 Document</title>
		<link>http://designshack.net/articles/html/what-is-html-the-anatomy-of-an-html5-document/</link>
		<comments>http://designshack.net/articles/html/what-is-html-the-anatomy-of-an-html5-document/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:00:20 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[anatomy]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=25480</guid>
		<description><![CDATA[This is the second article in our series on the absolute fundamentals of web development. Our first article explained in detail what HTML is on a conceptual level. We looked at what a markup language is, what tags are and how HTML compares to other important pieces of the web development puzzle such as CSS. [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlanatomy-2.jpg" alt="screenshot" width="510"/></div>
<p>This is the second article in our series on the absolute fundamentals of web development. Our <a href="http://designshack.net/?p=25363">first article</a> explained in detail what HTML is on a conceptual level. We looked at what a markup language is, what tags are and how HTML compares to other important pieces of the web development puzzle such as CSS.</p>
<p>Join us today as we move on and take a look at each basic piece of an HTML document. I&#8217;ll explain all that stuff at the top of an HTML file that confuses you and outline the basic structure that you&#8217;ll follow for creating your own HTML files. </p>
<p><span id="more-25480"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>DOCTYPE</h2>
<p>The very first thing that you typically see in an HTML file is the DOCTYPE declaration. Before HTML5, this could be a very confusing bit of code that looked something like this:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>There&#8217;s a lot going on here and every bit of it speaks to either the web browser, the reader or both. The &#8220;PUBLIC&#8221; part just speaks to the availability, the DTD  stands for <em>Document Type Definition</em>, which declares the version of HTML being used and the final section is a URL pointing to where the DTD can be found. </p>
<p>The words &#8220;loose,&#8221; (or transitional) &#8220;strict&#8221; and &#8220;frameset&#8221; refer to different versions of HTML 4, which allowed for slightly different markup. These were essentially just to help transition developers from older versions of HTML. </p>
<h3>The HTML5 DOCTYPE</h3>
<p>There are several DOCTYPEs to choose from, which can be monumentally confusing for new developers. Fortunately, HTML5 completely simplifies the situation with a refreshingly simple DOCTYPE:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>See how easy that is by comparison? It really is a beautiful thing. </p>
<h3>What Does the DOCTYPE Do?</h3>
<p>Now we&#8217;ve seen what a DOCTYPE <em>looks like</em> but we haven&#8217;t really discussed what it <em>does</em>. The answer is that the DOCTYPE tells the browser which type of HTML to expect, which in turn affects how the browser renders the page.</p>
<p>As you explore web development more, you&#8217;ll learn that there&#8217;s a huge emphasis on &#8220;standards-based development.&#8221; The general idea is that if we all follow certain rules and standards, web development will be a more cohesive and consistent practice. This is better for developers, better for browsers and most importantly, better for users.</p>
<p>DOCTYPEs were originally designed to trigger &#8220;standards mode&#8221; in browsers, which meant that the page was rendered using newer web standards. Similarly, older pages without a DOCTYPE triggered &#8220;quirks mode&#8221; in browsers, which allowed for older practices to be used that wouldn&#8217;t function properly in standards mode.</p>
<p>The new, very simple HTML5 DOCTYPE is supported in all major browsers, and it triggers standards mode in all of them. The DOCTYPE also helps you <a href="http://validator.w3.org/">validate</a> your code, which ensures that current standards are being adhered to. Every page that you create should use a DOCTYPE and hopefully be fully standards compliant. </p>
<h2>Root Element</h2>
<p>After the DOCTYPE, the HTML really begins. This is indicated by the HTML Root Element. If your entire HTML is a tree, this is the root from which everything else sprouts.</p>
<p>The Root Element is defined by a &#8220;tag,&#8221; which we learned about in our last article. In this case, it&#8217;s the &#8220;HTML&#8221; tag.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- Everything Goes Here --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Notice that the root element includes a language attribute, in our case English. Always be sure to indicate the appropriate language for every page you create. </p>
<p>Everything else that we will add to this page is situated inside of the Root Element. It is the container for every scrap of information and piece of content, the only exclusion being the DOCTYPE. </p>
<h2>Head Element</h2>
<p>The next thing you&#8217;ll encounter in an HTML document is the &#8220;head&#8221; section. The head tag is exactly what you&#8217;d expect it to be: </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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: #808080; font-style: italic;">&lt;!-- Some Code Goes Here --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>The stuff that goes into the head section is primarily informational, it tells both you and the browser certain things about the page such as the title, the charset, etc. This is also where you traditionally load in important external resources.</p>
<p>There are a few important things that go into a head tag. Let&#8217;s look at them one by one.</p>
<h3>Meta Tags</h3>
<p>As you can probably guess, meta tags hold metadata about the page. Metadata takes many forms and can include keywords, authors, descriptions, etc. Here are a few notable inclusions: </p>
<p><strong>Charset</strong><br />
This is pretty boring stuff, the charset is typically set to <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> and essentially tells the browser which character encoding to use. </p>
<p>Your pages should definitely include an indication of which charset to use. Don&#8217;t over think it, it&#8217;s just one of those things you need to stick in your template. Below is a typical charset declaration in HTML5. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>This is yet another thing that has gotten easier with HTML5. Check out the version of this snippet required for HTML 4.01:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Some other typical metatags include description and author. Here&#8217;s a quick, self-explanatory example of each of these: </p>
<p><strong>Description</strong></p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Some description about your page&quot;</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p><strong>Author</strong></p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Josh Johnson&quot;</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<h3>Title</h3>
<p>Another thing that goes inside the head portion of your document is the title tag. This is a very simple piece of code that simply states whatever you&#8217;d like the title of the page to be. Here&#8217;s an example:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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>Design Gallery, Deals, Tutorials <span style="color: #ddbb00;">&amp;amp;</span> Community | Design Shack<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>This title is usually shown to the user at the very top center of the browser window, on a tab, etc.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlanatomy-1.jpg" alt="screenshot" width="510"/></div>
<h3>Links and Scripts</h3>
<p>The last thing we&#8217;ll discuss regarding the head tag is the inclusion of external resources. In a very simple web page, you&#8217;ll typically see these take the form of a stylesheet or script:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/jquery.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Here I&#8217;m essentially loading my CSS file as well as jQuery (a JavaScript library) into the page. If these resources are included in the source files but not linked to in the head section, they will not function. Note that the links for these could either point to something in the local folder hierarchy (as above) or something hosted on another web server. </p>
<p>The link used above for the CSS file uses a <em>link relation</em> (rel=&#8221;stylesheet&#8221;). For more on link relations, check out <a href="http://blog.whatwg.org/the-road-to-html-5-link-relations">this article</a>.</p>
<p>Also, as an alternative to linking to external files, you can embed code right into the head element. Here&#8217;s an example with CSS, but the same can be done via the &#8220;script&#8221; tag and JavaScript (embedded scripts are often placed at the end of the body element instead).</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
	a { text-decoration: none; }
	p { color: #333; }
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<h2>Body Element</h2>
<p>The final portion of an HTML page is the most important. Everything inside of the body element defines the content and structure of your page. As far as development time, you&#8217;ll likely use a set template for everything above and spend a few minutes customizing it for specific projects. The rest of your HTML time will be spend inside the body element.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- Page Content Goes Here --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<h2>Putting it All Together</h2>
<p>Now that we&#8217;ve walked through each individual piece of an HTML file, let&#8217;s put it all together into one extremely basic HTML5 template. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
&nbsp;
<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;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Design Shack<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;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;A Very Basic HTML5 Anatomy&quot;</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/jquery.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;">body</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- Page Content Goes Here --&gt;</span>
<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></div></div>

</div>
<p></ br></p>
<h2>An Overview</h2>
<p>A thousand apologies for the mundane nature of this topic, beginners are often turned off by boredom at this point but hang in there, the real fun of HTML is everything between the body tags, which we haven&#8217;t even discussed!</p>
<p>All of these pieces were necessary to accurately paint the picture of what an HTML document actually is. We now see that an HTML document has a DOCTYPE that tells the browser how to render the page and helps ensure the proper standards are being used.</p>
<p>We also know that there&#8217;s a set hierarchy to how HTML pages are structured. Just about everything but the DOCTYPE is thrown into the root element, meaning it is the &#8220;parent element&#8221; of the head and body elements, which in turn have their own children. </p>
<div class="tutorialimage"><a href="http://designshack.net/articles/html/deeper-study-into-the-wwws-document-object-model/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/dom-tree-graphic.jpg" alt="screenshot" width="510"/></a></div>
<p>The basic structure of an HTML document is referred to as the DOM, or the Document Object Model. This is almost always metaphorically referred to as a tree and depicted like image above. Our own Jack Rocheleau wrote an in-depth look into the DOM titled <a href="Deeper Study Into the WWW’s Document Object Model">Deeper Study Into the WWW’s Document Object Model</a>. For the next set in understanding the basic structure of an HTML page, check out that article. </p>
<h2>Conclusion</h2>
<p>This article represents a very brief overview of how an HTML skeleton is structured and the types of things that are typically included. It is by no means exhaustive, but should serve as a good basic introduction to these topics. </p>
<p>When you&#8217;re just starting out in code, most people will simply give you a template for all of the code above without really explaining what it all does. This can leave a sizable hole in your education so it&#8217;s important to read through this information and attempt to understand what you can.</p>
<p>Stay with us in this series and check back soon as we answer another important question: What is CSS?</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/what-is-html-the-anatomy-of-an-html5-document/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>What Is HTML? Back to Basics</title>
		<link>http://designshack.net/articles/html/what-is-html-back-to-basics/</link>
		<comments>http://designshack.net/articles/html/what-is-html-back-to-basics/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 14:00:29 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[what is html]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=25363</guid>
		<description><![CDATA[Since I have a background in print, I&#8217;m always eager to help designers from other areas get a start in web design and basic development. I know from experience that the transition is an extremely intimidating one that many people simply don&#8217;t think they can manage. Fortunately, I can also attest to the fact that [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlbasics-0.jpg" alt="screenshot" width="510"/></div>
<p>Since I have a background in print, I&#8217;m always eager to help designers from other areas get a start in web design and basic development. I know from experience that the transition is an extremely intimidating one that many people simply don&#8217;t think they can manage.</p>
<p>Fortunately, I can also attest to the fact that it&#8217;s probably not as difficult as you might imagine. In the world of hardcore coding, HTML and CSS rank pretty low on the <em>barrier to entry</em> scale.</p>
<p>Today we&#8217;re going to start a series that examines the basic building blocks of web development. HTML, CSS, JavaScript; if you&#8217;re a complete and utter beginner who might not even have a basic grasp of what these technologies are much less how to wield them, then this series is for you. </p>
<p><span id="more-25363"></span></p>
<p><em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>What Is HTML?</h2>
<p>There are a million ways that I could start this discussion. We could go into the drivel of how HTML stands for Hypertext Markup Language or how it was invented in 1980 by physicist Tim Berners-Lee as a system for sharing documents, but you can get all that from Wikipedia. If you&#8217;re interested in the history of the World Wide Web, I highly recommend investigating the topic further, but that doesn&#8217;t help us much in our discussion of what HTML is today and how you&#8217;ll need to use it.</p>
<p>What you really need to understand is the conceptual purpose of HTML. What is it for? Why do you need it? How does it compare and relate to other technologies like CSS and JavaScript?</p>
<h3>HTML: The Most Important Piece</h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlbasics-3.jpg" alt="screenshot" width="510"/></div>
<p>Along these lines, HTML can be thought of as the fundamental building block of the web as you know it. There&#8217;s an underlying architecture of complicated technology that makes up &#8220;The Internet&#8221; but the good ol&#8217; WWW is largely dependent on HTML.</p>
<p>In fact, technically, <strong>HTML is all you need to create a web page</strong>. A few extremely simple lines of HTML uploaded to a web server would constitute a web page, which is definitely not something that can be said for CSS and typically not something that can be said of JavaScript. The point here is that, while all of these technologies are closely related, HTML is the pivotal piece of the puzzle.</p>
<p>Now, before you get too excited, that doesn&#8217;t mean that you can get away with only learning HTML. You&#8217;d be hard pressed to find a modern web page that doesn&#8217;t utilize, at minimum, a combination of HTML and CSS. </p>
<h2>Markup Languages</h2>
<p>To truly understand what HTML is, you&#8217;ll need to understand what markup languages are and why they exist (I&#8217;m sneaking in that drivel after all).</p>
<p>Basically, the web is written in plain text. Now, by &#8220;plain text&#8221; I don&#8217;t just mean a lack of images, I mean a lack of rich formatting of any kind. Unlike in Microsoft Word where you can easily create bold italic text at any point size, writing code is more like using <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a> or <a href="http://www.informationarchitects.jp/en/ia-writer-for-mac/">IA Writer</a>; all you get is plain old letters and symbols.</p>
<h3>The Typewriter Metaphor</h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlbasics-1.jpg" alt="screenshot" width="510"/></div>
<p>Imagine composing an essay on an antique typewriter, then handing that essay to someone so that they could enter it into a computer. Your typewriter doesn&#8217;t have any formatting features, but when your associate enters your essay into the modern word processor, you want it to have headers, bold text, italic text, bulleted lists and more. How would you tell that person where to implement these features?</p>
<p>The answer is of course that you would &#8220;mark up&#8221; your document and insert extra indicators of how you want the text to be formatted. These wouldn&#8217;t be present on the end result but are merely meant to tell the interpreter how to make everything look the way you intend. This is exactly how a markup language works. With HTML, this markup is accomplished through tags. </p>
<h3>Tag, You&#8217;re It</h3>
<p>As I write this article, I&#8217;m doing so in plain text HTML. This means when I want to <strong>bold</strong> something, I can&#8217;t simply hit a button. Instead, I insert a bold tag:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">The last word will be in <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">b</span>&gt;</span>bold<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">b</span>&gt;</span>.</pre></div></div>

</div>
<p></ br></p>
<p>See how I used &#8220;&lt;b>&#8221; to indicate where the bolded text would begin? Also notice how I used &#8220;&lt;/b>&#8221; to indicate where the bolded text would end. To italicize something, I use the same technique. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">i</span>&gt;</span>This is italicized.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">i</span>&gt;</span> This isn't.</pre></div></div>

</div>
<p></ br></p>
<p>The bracketed portions are known as tags, and each set of tags has a starting and stopping point. With these, you tell the interpreter, in our case a web browser like Firefox, how you want the content to be formatted. When we place content between an opening and close tag, we typically say that we have &#8220;wrapped&#8221; it in a tag. </p>
<h3>Example Tags</h3>
<p>Now that you know what tags are, here are some more very basic examples of some HTML tags:</p>
<ul>
<li>&lt;p>paragraph&lt;/p></li>
<li>&lt;h1>header&lt;/h1> <em>(h2, h3, h4, etc. create incrementally smaller headers)</em></li>
<li>&lt;small>small text&lt;/small></li>
</ul>
<h2>Links, Tags and Attributes</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlbasics-4.jpg" alt="screenshot" width="510"/></div>
<p>This is where the &#8220;Hypertext&#8221; in &#8220;Hypertext Markup Language&#8221; part comes in. One of the major parts about writing HTML, and indeed about using the web in general, is linking. That&#8217;s how it all works right? If there is a web page loaded into your browser and you want to get to another page, what do you do? Click a link! This system is fantastic for connecting all of the various bits and pieces of information stored on the web.</p>
<p>To link something in HTML, we of course use a tag. This tag is going to look a bit more complex than most though. Let&#8217;s look at an example that links to the Design Shack home page.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">Read <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://designshack.net/&quot;</span>&gt;</span>Design Shack<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> daily for awesome bits of design goodness.</pre></div></div>

</div>
<p></ br></p>
<p>Here we have not just a <em>tag</em> but an <em>attribute</em> as well. The tag (&lt;a>&lt;/a>) tells the browser that there&#8217;s a link and the attribute (href) tells the browser where the link should go. The syntax for this type of structure is as follows:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;tag attribute<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;VALUE&quot;</span>&gt;</span>Text, images, etc.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>tag&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>In our previous example, anything between the &#8220;a&#8221; tags becomes a link. So the words &#8220;Design Shack&#8221; would&#8217;ve been an active text link that, upon clicking, directed the user to the href URL, which was the Design Shack homepage. </p>
<p>Placing an image via HTML works much the same way. We use the &#8220;src&#8221; attribute to point the browser to the location of the image and the &#8220;alt&#8221; attribute for text that will appear in place of the image if it can&#8217;t be displayed. Notice the closing tag structure is a bit different this time with all the &#8220;img&#8221; info placed within a single tag. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/thepicture.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;alternative text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<h2>You Can Read HTML!</h2>
<p>If you&#8217;ve been reading along up to this point, the following should make perfect sense. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>What is HTML?<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>You've officially learned enough that you should be able to read basic <span style="color: #009900;">&lt;bold&gt;</span>HTML<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>bold&gt;</span> fairly easily. This text is marked up with all kinds of tags, but once you know what they all mean, it becomes fairly readable doesn't it?<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Now that you know what HTML looks like, let's move on and discuss it from a more <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">em</span>&gt;</span>conceptual<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">em</span>&gt;</span> point of view. What purpose does it serve in the grand scheme of web design?<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<h2>HTML: The Skeleton of a Web Page</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/htmlbasics-6.jpg" alt="screenshot" width="510"/></div>
<p>We now have a good idea of how HTML is a markup language and what that means. We know that it&#8217;s basically a way to give the browser plain text and have it output richly formatted and even active content that can be clicked on to some end. The last thing we need to understand is how it fits into the overall picture of a completed web page.</p>
<p>As we&#8217;ve seen in the examples above, HTML <em>mostly</em> relates to directly inputting content onto a page. The actual underlying structure of any web page is the kind of tagged statements we just learned about. Most text and links you see on any given page, as well as many of the images, are implemented directly with HTML. </p>
<h3>HTML is Meant to Be Boring</h3>
<p>As I said above, HTML is technically all you need for a web page. However, this HTML content by itself is quite plain. Notice that nowhere in the examples above have we told the page what background color we want to use, what size the text should be, which fonts to apply where, how wide certain portions should be and how they should line up, etc. </p>
<p>We&#8217;ve simply thrown in the content without any real thought towards what it will look like. Looking at any page on the web you can see that no one stops here. Each site has its own look and feel, its own color scheme, typography, layout, etc.</p>
<p>For example, imagine that your local news site picks up a story from the Associate Press. They could print the story verbatim and therefore have the same basic HTML structure for that content, yet it would likely look quite different from the version on the AP site. Why?</p>
<h3>CSS is The Skin, Hair and Clothing</h3>
<p>The answer is that modern HTML is not generally used to govern aesthetic style and layout. For this, we&#8217;ve adopted something called Cascading Style Sheets, or CSS.</p>
<p>The typical web developer workflow might be to insert all the various pure content first into an HTML document, then jump over to CSS and begin crafting that content to appear in a more visually pleasing and usable way. A year later the developer could come back and toss in a brand new CSS file that makes the website look completely different, all without touching the HTML. </p>
<p>JavaScript jumps into this game by taking a more active role in how the page <em>behaves</em>. Animations, form submissions, dynamic content, these are the domain of JavaScript. Lately CSS has been encroaching on this territory, but that&#8217;s a topic for another day. </p>
<h2>What Is HTML5?</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/TheBasicsGold2.jpg" alt="screenshot" width="510"/></div>
<p>Before we wrap this up, you&#8217;re probably wondering what the heck all this HTML5 talk is about. HTML5 is exactly what it sounds like: the fifth major iteration of HTML.</p>
<p>Web technologies aren&#8217;t set in stone, they&#8217;re constantly evolving and expanding. Just like print designers generally have to keep up with the newest bells and whistles in the latest version of Photoshop, so web designers have to keep an eye out for changes in web standards. </p>
<p>HTML5 brings lots of new features to the table while cutting out some unnecessary fat from its previous installment. For instance, HTML5 developers have some new tags to work with that make the basic structure of a web page more logical. </p>
<p>For more on HTML5, check out our complete series on the topic:</p>
<ul>
<li><a href="http://designshack.net/articles/html/html5-the-basics-1-of-4">HTML5: The Basics</a></li>
<li><a href="http://designshack.net/articles/html/html5-new-elements-2-of-4/">HTML5: New Elements</a></li>
<li><a href="http://designshack.net/articles/html/html5-semantic-changes-3-of-4/">HTML5: Semantic Changes</a></li>
<li><a href="http://designshack.net/articles/html/html5-get-it-working-today-4-of-4/">HTML5: Get It Working Today</a></li>
</ul>
<h2>Conclusion: More to Come!</h2>
<p>This article was meant to give you a basic conceptual overview of HTML. If you started reading without a clue as to what HTML is and how it&#8217;s used, hopefully you now have a basic grasp of these concepts.</p>
<p>As we look to the future I&#8217;ll be expanding this topic and walking through the basic anatomy of an HTML document and then moving on to another important question: What is CSS? </p>
<p>Be sure to check back soon for more on these topics!</p>
<p><em>Image sources: <a href="http://www.flickr.com/photos/xlibber/4855182596/">xlibber</a>, <a href="http://www.flickr.com/photos/intvgene/370973576/">Ryan Amos</a>, <a href="http://www.flickr.com/photos/daveparker/2104384103/">Dave Parker</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/what-is-html-back-to-basics/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Mastering Markdown: 30 Resources, Apps and Tutorials to Get You Started</title>
		<link>http://designshack.net/articles/html/mastering-markdown-30-resources-apps-and-tutorials-to-get-you-started/</link>
		<comments>http://designshack.net/articles/html/mastering-markdown-30-resources-apps-and-tutorials-to-get-you-started/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 21:00:03 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=23870</guid>
		<description><![CDATA[If you&#8217;re like me, learning Markdown has been on your todo list for months. I finally took the plunge and instantly became addicted to sorting through the wealth of resources, apps and other Markdown related materials available. The following is a collection of the best Markdown resources that I&#8217;ve found. Whether you&#8217;re a complete Markdown [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, learning Markdown has been on your todo list for months. I finally took the plunge and instantly became addicted to sorting through the wealth of resources, apps and other Markdown related materials available. </p>
<p>The following is a collection of the best Markdown resources that I&#8217;ve found. Whether you&#8217;re a complete Markdown newbie looking to learn the syntax or a seasoned expert in the market for a new iPad app, you&#8217;ll find something here that&#8217;s perfect for your needs. </p>
<p><span id="more-23870"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>What Is Markdown?</h2>
<p>Markdown is a markup language that was created by John Gruber to simplify the workflow of web writers. Many bloggers, like myself, usually write our posts in straight HTML, which can be cumbersome and difficult to read through. Markdown provides a much simpler and easier to read alternative that can easily and instantly be converted to HTML using any number of free tools.</p>
<p>If you&#8217;re a writer and you constantly use HTML, Markdown is for you. If not, you might just find it to be absolutely useless. I personally really like the syntax and find it to be quite intuitive. Take a look at the resources below and see what you think!</p>
<h2>Learning Resources</h2>
<h3><a href="http://daringfireball.net/projects/markdown/">Markdown</a></h3>
<p>Here&#8217;s the gist on Markdown straight from the source. Gruber introduces the concept, outlines its use and syntax and even provides a Pearl plugin that works with Movable Type, Blosxom, and BBEdit.</p>
<div class="tutorialimage"><a href="http://daringfireball.net/projects/markdown/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-1.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://old-wp.slekx.com/the-markdown-tutorial-home/">Slekx Interactive Tutorial</a></h3>
<p>Normal tutorials are boring, check out this interactive tutorial and you&#8217;ll pick up the Markdown Syntax in no time. You will be editing the actual text of the tutorial, adding Markdown elements as you learn them. Markup elements are reused throughout the tutorial in order to ingrain the Markdown that you’re learning. </p>
<div class="tutorialimage"><a href="http://old-wp.slekx.com/the-markdown-tutorial-home/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-3.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://www.simpleeditions.com/59001/markdown-an-introduction">Markdown: An Introduction</a></h3>
<p>This is a super short and simple introduction to Markdown without all the fluff. If you have at least a double-digit IQ, you can probably pick up Markdown in under two minutes by browsing through this tutorial.</p>
<div class="tutorialimage"><a href="http://www.simpleeditions.com/59001/markdown-an-introduction"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-4.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://www.youtube.com/watch?v=6A5EpqqDOdk">Video Markdown Tutorial</a></h3>
<p>If reading makes your eyes sleepy and you prefer a video tutorial, here&#8217;s one from Stevan Wing. It&#8217;s a really in-depth look that walks you through the concept, syntax and implementation.</p>
<div class="tutorialimage"><a href="http://www.youtube.com/watch?v=6A5EpqqDOdk"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-5.jpg" alt="screenshot" width="510"/></a></div>
<h2>Multimarkdown</h2>
<p>MMD is a superset of the Markdown syntax. It adds multiple syntax features (tables, footnotes, and citations, to name a few), in addition to the various output formats listed above (Markdown only creates HTML). Additionally, it builds in “smart” typography for various languages (proper left- and right-sided quotes, for example).</p>
<h3><a href="https://github.com/fletcher/MultiMarkdown-Gallery/raw/master/What-Is-MMD/what_is_mmd.pdf">MultiMarkdown Introduction PDF Presentation</a></h3>
<div class="tutorialimage"><a href="https://github.com/fletcher/MultiMarkdown-Gallery/raw/master/What-Is-MMD/what_is_mmd.pdf"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-13.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide">MultiMarkdown Syntax Guide</a></h3>
<p>A GitHub hosted guide to the markup syntax used in the MultiMarkdown system.</p>
<div class="tutorialimage"><a href="https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-14.jpg" alt="screenshot" width="510"/></a></div>
<h2>Cheat Sheets</h2>
<h3><a href="http://warpedvisions.org/projects/markdown-cheat-sheet/">WarpedVisions Markdown cheat sheet</a></h3>
<p>A short sheet of the Markdown, Markdown Extra, and SimpleLink syntax. </p>
<div class="tutorialimage"><a href="http://warpedvisions.org/projects/markdown-cheat-sheet/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-6.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://support.mashery.com/docs/customizing_your_portal/Markdown_Cheat_Sheet">Mashery Markdown Cheat Sheet</a></h3>
<p>This web page contains a bunch of nicely formatted tables that showcase examples of Markdown syntax and the resulting output. </p>
<div class="tutorialimage"><a href="http://support.mashery.com/docs/customizing_your_portal/Markdown_Cheat_Sheet"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-7.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://www.squarespace.com/display/ShowHelp?section=Markdown">Squarespace Markdown Syntax Reference</a></h3>
<p>A simple, no frills Markdown reference sheet from Squarespace.</p>
<div class="tutorialimage"><a href="http://www.squarespace.com/display/ShowHelp?section=Markdown"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-8.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://code.ahren.org/markdown-cheatsheet">Ahren Code Markdown Cheatsheet</a></h3>
<p>Instead of a web page, this one comes as a PDF that you can download. As you can see below, it has an interesting dark visual theme. </p>
<div class="tutorialimage"><a href="http://code.ahren.org/markdown-cheatsheet"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-9.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://scottboms.com/2004/03/markdownsyntaxcheatsheet/">Scott Boms Markdown Syntax Cheatsheet</a></h3>
<p>If you didn&#8217;t like the dark theme of the previous PDF, here&#8217;s one with a much simpler, more typography-driven design. </p>
<div class="tutorialimage"><a href="http://scottboms.com/2004/03/markdownsyntaxcheatsheet/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-10.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://packetlife.net/media/library/16/Markdown.pdf">Jeremy Stretch&#8217;s Markdown Cheat Sheet</a></h3>
<p>A dense but nicely organized cheat sheet perfect for printing as a desk reference. </p>
<div class="tutorialimage"><a href="http://packetlife.net/media/library/16/Markdown.pdf"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-11.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://stationinthemetro.com/storage/dev/Markdown_Cheat_Sheet_v1-1.pdf">Station in the Metro ￼Markdown Syntax Cheat Sheet</a></h3>
<p>A very thorough, two page PDF cheatsheet. </p>
<div class="tutorialimage"><a href="http://stationinthemetro.com/storage/dev/Markdown_Cheat_Sheet_v1-1.pdf"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-12.jpg" alt="screenshot" width="510"/></a></div>
<h2>Mac Apps</h2>
<h3><a href="http://bywordapp.com/">Byword</a></h3>
<p>A really nice full-screen text editor with Markdown support. Byword is currently $9.99.</p>
<div class="tutorialimage"><a href="http://bywordapp.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-19.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/marked/id448925439?mt=12">Marked</a></h3>
<p>Marked opens MultiMarkdown, Markdown, Text or HTML files and previews them as HTML documents. It watches the file for changes, updating the preview any time the file is saved. With a full set of customization options and preview styles, Marked adds an ideal “live” Markdown preview to any text editor. Marked is $2.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/marked/id448925439?mt=12"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-20.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/macchiato/id450098921?mt=12"> Macchiato </a></h3>
<p>Macchiato is a simple plain text editor with a twist. Modeled after TextEdit&#8217;s plain text mode, the editor is a chrome-less blank canvas. However, it is built from the ground up for writing Markdown prose—and, as such, it will format Markdown text as you write it. Macchiato will not *parse* your Markdown. Rather, it will *stylize* your Markdown source. Macchiato is $14.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/macchiato/id450098921?mt=12"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-21.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/markmywords/id406500316?mt=12">MarkMyWords</a></h3>
<p>MarkMyWords is a powerhouse of functionality for Markdown users. It&#8217;s not the prettiest app out there but it&#8217;s by far the most fully-featured Markdown client I&#8217;ve ever seen. MarkMyWords is $24.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/markmywords/id406500316?mt=12"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-22.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/ia-writer/id439623248?mt=12">IA Writer</a></h3>
<p>IA Writer is one of the best apps in the full-screen text editor genre. The interface is gorgeously simple and the app has some excellent auto Markdown functionality built in. IA Writer is $9.99. </p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/ia-writer/id439623248?mt=12"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-23.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://brettterpstra.com/project/nvalt/">nvALT</a></h3>
<p>nvALT is a fork of the original Notational Velocity with some additional features and interface modifications, including MultiMarkdown functionality. nvALT is a free download.</p>
<div class="tutorialimage"><a href="http://brettterpstra.com/project/nvalt/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-24.jpg" alt="screenshot" width="510"/></a></div>
<h2>iOS Apps</h2>
<h3><a href="http://itunes.apple.com/us/app/elements-dropbox-and-markdown/id382752422?mt=8">Elements (iPhone and iPad)</a></h3>
<p>Elements is a dedicated Markdown and Dropbox powered text editor for iOS. Elements allows you to view, edit and share plain text documents on your iPad, iPhone or iPod touch. All of your data is stored in a folder on your personal Dropbox account so that it&#8217;s accessible from any device you have. Elements is $4.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/elements-dropbox-and-markdown/id382752422?mt=8"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-27.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/id396073482?mt=8">Nocs (iPhone &#038; iPad)</a></h3>
<p>With integration to Dropbox, Markdown, and a text editor, Nocs lets you work with your documents on any iDevice. Nocs is $2.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/id396073482?mt=8"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-28.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://getwritingkit.com/">WritingKit (iPad)</a></h3>
<p>Link to Dropbox. Write Markdown-formatted text. Use your favorite TextExpander snippets. Do quick research to find reference materials. Insert quotes and links into your documents. Upload images to CloudApp. Export your writings as Markdown or HTML files. Do all this and more with this awesome iPad text editor. WritingKit is $4.99</p>
<div class="tutorialimage"><a href="http://getwritingkit.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-29.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://itunes.apple.com/us/app/markdownnote/id393721189?mt=8">MarkdownNote (iPad)</a></h3>
<p>MarkdownNote makes it really easy to create notes using Markdown. Using live preview feature, you can preview your Markdown markup syntax to HTML. MarkdownNote is $3.99.</p>
<div class="tutorialimage"><a href="http://itunes.apple.com/us/app/markdownnote/id393721189?mt=8"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-30.jpg" alt="screenshot" width="510"/></a></div>
<h2>Windows Apps</h2>
<h3><a href="http://writemonkey.com/index.php">Writemonkey</a></h3>
<p>Writemonkey is a free app that&#8217;s a lot like Writeroom for Windows. Writemonkey supports Markdown and Textile markup standards.</p>
<div class="tutorialimage"><a href="http://writemonkey.com/index.php"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-25.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://www.sublimetext.com/">Sublime Text</a></h3>
<p>Sublime Text is a powerful Windows text editor with, among many other things, Markdown support. Sublime Text is $59.</p>
<div class="tutorialimage"><a href="http://www.sublimetext.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-26.jpg" alt="screenshot" width="510"/></a></div>
<h2>Free Web Apps</h2>
<h3><a href="http://daringfireball.net/projects/markdown/dingus">Markdown Dingus</a></h3>
<p>The official online Markdown Converter from Daring Fireball. Simply paste in your text and get both the HTML output and a preview. There&#8217;s also a handy cheat sheet on the right side of the page. </p>
<div class="tutorialimage"><a href="http://daringfireball.net/projects/markdown/dingus"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-2.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://joncom.be/experiments/markdown-editor/edit/">Jon Combe Markdown Editor</a></h3>
<p>This is one of my favorite online Markdown editors. It&#8217;s nice and simple with just the right amount of options and zero clutter. I love the two window mode that lets you see the HTML preview of your Markdown as you type. You can then download the HTML and/or Markdown versions.</p>
<div class="tutorialimage"><a href="http://joncom.be/experiments/markdown-editor/edit/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-15.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://www.ctrlshift.net/project/markdowneditor/">CtrlShift.net Markdown Editor</a></h3>
<p>Like the previous link, this tool has a two window setup that lets you view the output as you type.</p>
<div class="tutorialimage"><a href="http://www.ctrlshift.net/project/markdowneditor/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-16.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://hashify.me">Hashify</a></h3>
<p>This one is new to me but I already really like it. It updates the preview live as you type like the previous two links but places a much larger visual emphasis on the output with a huge preview. There&#8217;s also a tweet button and even a QR code generator for your result, how cool is that?</p>
<div class="tutorialimage"><a href="http://hashify.me/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-17.jpg" alt="screenshot" width="510"/></a></div>
<h3><a href="http://backpager.amasan.co.uk/">Backpager</a></h3>
<p>Yet another two window Markdown Editor with options to preview either source or syntax. </p>
<div class="tutorialimage"><a href="http://backpager.amasan.co.uk/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/markdown-18.jpg" alt="screenshot" width="510"/></a></div>
<h2>Alternatives</h2>
<p>Markdown fits into a category known as Lightweight markup languages, and it&#8217;s by no means the only one. If you&#8217;re looking for others, <a href="http://en.wikipedia.org/wiki/Lightweight_markup_language">Wikipedia</a> has a stellar feature by feature comparison of all of the popular options such as Markdown, Textile, txt2tags and more.</p>
<h2>Conclusion</h2>
<p>That concludes our roundup of Markdown resources. If you&#8217;re just starting your Markdown journey, bookmark this page as your one-stop-shop for everything you need to know and download. </p>
<p>Leave a comment below and let us know what you think of Markdown. Have you ever tried it? Do you use it frequently? What resources and apps have you found to be helpful?</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/mastering-markdown-30-resources-apps-and-tutorials-to-get-you-started/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Embedding Google Maps Into a Web Page: A Beginner&#8217;s Guide</title>
		<link>http://designshack.net/articles/html/embedding-google-maps-into-a-web-page-a-beginners-guide/</link>
		<comments>http://designshack.net/articles/html/embedding-google-maps-into-a-web-page-a-beginners-guide/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 18:59:15 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=23014</guid>
		<description><![CDATA[Google Maps is one of the best utilities to ever hit the web. It has become the standard way for people to get directions online, view satellite and terrain imagery and perform any other map-related task. There are a number of reasons that you would want to embed a Google Map into your web page, [...]]]></description>
			<content:encoded><![CDATA[<p>Google Maps is one of the best utilities to ever hit the web. It has become the standard way for people to get directions online, view satellite and terrain imagery and perform any other map-related task.</p>
<p>There are a number of reasons that you would want to embed a Google Map into your web page, whether it be for functional purposes, such as guiding users to your physical location, or aesthetic purposes, such as using map for a background graphic. Today we&#8217;re going to look at two ways you can go about this task: the quick and easy way and the powerful, flexible API route. </p>
<p><span id="more-23014"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Embedding a Google Map</h2>
<p>The first thing that we&#8217;ll learn to do is a simple and straight embed of a Google map. The functionality here is pretty limited but it&#8217;s super easy. </p>
<p>The first thing you need to do is simply go to Google Maps like you would if you were looking for directions. Simply type in the address where you want the map to start. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-3.png" alt="screenshot" width="510"/></div>
<p>Now click the little link icon in the upper right of the screen. This should pop up a little window that includes a pure link and an HTML snippet, copy the second to your clipboard and paste it into an HTML document.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-2.jpg" alt="screenshot" width="510"/></div>
<h3>The HTML</h3>
<p>That&#8217;s all there is to it! This should give you a live map on your web page. However, you&#8217;ll likely never want to paste in the code and be done but instead style it to match your needs. </p>
<p>To do this, let&#8217;s take a look at the raw code that results:</p>
<div style="word-wrap: break-word; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;425&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;350&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">scrolling</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">marginheight</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">marginwidth</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://maps.google.com/maps?client=safari&amp;amp;q=phoenix+az&amp;amp;oe=UTF-8&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Phoenix,+Maricopa,+Arizona&amp;amp;gl=us&amp;amp;ll=33.448377,-112.074037&amp;amp;spn=0.040679,0.07699&amp;amp;z=14&amp;amp;output=embed&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://maps.google.com/maps?client=safari&amp;amp;q=phoenix+az&amp;amp;oe=UTF-8&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Phoenix,+Maricopa,+Arizona&amp;amp;gl=us&amp;amp;ll=33.448377,-112.074037&amp;amp;spn=0.040679,0.07699&amp;amp;z=14&amp;amp;source=embed&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color:#0000FF;text-align:left&quot;</span>&gt;</span>View Larger Map<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Now, this may look like a big mess but it&#8217;s pretty easy to sort through. The links are really the result of all that nasty-looking code so let&#8217;s toss those out just for the purpose of the example. Now the code looks much more manageable. </p>
<div style="word-wrap: break-word; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;425&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;350&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">scrolling</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">marginheight</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">marginwidth</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color:#0000FF;text-align:left&quot;</span>&gt;</span>View Larger Map<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>We can see some pretty basic inline style controls here. For starters, let&#8217;s try  resizing the map to 600px wide. We can easily wrap that in a div and center it. I&#8217;ve also changed the color of the link near the end to white.</p>
<div style="word-wrap: break-word; background-color: #eeeeee;">

<div class="wp_syntax"><div 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;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;theMap&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;350&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">scrolling</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">marginheight</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">marginwidth</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color:#fff;text-align:left&quot;</span>&gt;</span>View Larger Map<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</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></div></div>

</div>
<p></ br></p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-4.png" alt="screenshot" width="510"/></div>
<p>Let&#8217;s say we wanted to have a little more fun with this. Let&#8217;s ditch that last link completely and set our width to stretch all the way across the page. The code for this is nice and concise. </p>
<div style="word-wrap: break-word; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;280&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">scrolling</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">marginheight</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">marginwidth</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-5.jpg" alt="screenshot" width="510"/></div>
<h2>Going Fullscreen: The Quick and Dirty Way</h2>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/GoogleMaps/index.html"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-6.jpg" alt="screenshot" width="510"/></a></div>
<p>The trick above is perfect for embedding a live map into your contact page, but let&#8217;s say you wanted to make the map more of a design feature than a utility. It&#8217;s pretty easy to use this same technique and stretch the map over the entire screen. </p>
<h3>The HTML</h3>
<p>To get started, create two divs, one that will hold any artwork, text, etc. and another for the map. I threw in some basic text for the overlay portion and pasted my map into the second div. Notice that I removed the link portion at the end of the embed link as well as the size styles near the beginning of the link. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;overlay&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Fullscreen Google Map<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>A Design Shack Example<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;theMap&quot;</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">scrolling</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">marginheight</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">marginwidth</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;LINK&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</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;">div</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></div></div>

</div>
<p></ br></p>
<p>That&#8217;s really all the markup that we need. Let&#8217;s jump over to our CSS to make everything look pretty and get it stacking right.</p>
<h3>The CSS</h3>
<p>The first thing you&#8217;ll want to do is target the iframe in our map div and set it&#8217;s height and width to 100%. This will ensure that our map stretches over the full size of the browser window. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#theMap</span> iframe <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p><em>Update: This works in Safari but it turns out getting Firefox to display a div at 100% height is trickier than I thought. Check out <a href="http://peterned.home.xs4all.nl/examples/csslayout1.html">this article</a> for details.</em></p>
<p>Next, we style the overlay. The key here is to set the <em>position</em> property to <em>absolute</em>, which will pull it out of the normal flow of the document and sit it on top of the map. From here we can style and move it into place.</p>
<p>I wanted a slightly transparent black bar so I used <em>rgba</em> set to 90% opacity. From here I added some margin on the top and set the fonts for both text tags using CSS shorthand. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#overlay</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> .9<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#overlay</span> h2 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">200</span> <span style="color: #933;">4em</span>/<span style="color: #933;">1.5em</span> <span style="color: #ff0000;">&quot;Helvetica Neue&quot;</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> Geneva<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#overlay</span> p <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">100</span> <span style="color: #933;">1.2em</span>/<span style="color: #933;">1.5em</span> <span style="color: #ff0000;">&quot;Helvetica Neue&quot;</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> Geneva<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<h3>Get Creative</h3>
<p>You can treat the map like any other item on the page, so experiment with changing its shape, applying effects and anything else you can come up with!</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-7.jpg" alt="screenshot" width="510"/></div>
<h2>The Google Maps APIs</h2>
<p>We&#8217;ve barely scratched the surface of what you can do with Google Maps on your site. In fact, Google has a whole family of APIs aimed at helping you structure, style and embed highly customized versions of their maps.</p>
<div class="tutorialimage"><a href="http://code.google.com/apis/maps/index.html"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/googlemaps-8.jpg" alt="screenshot" width="510"/></a></div>
<p>The iframe method above is fun and simple, but the best route to go for embedding maps into your site is probably the <a href="http://code.google.com/apis/maps/documentation/javascript/">JavaScript API</a>. Using this, all you have to do to embed a map is create a div with a specific ID like so:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;initialize()&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;map_canvas&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width:100%; height:100%&quot;</span>&gt;&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: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Then you jump into your JavaScript, call a function, set up some options and store them in a variable, and create the map using the ID from the HTML above. </p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">  function initialize() {
  var mapOptions = {some options here}    
  var map = new google.maps.Map(document.getElementById(&quot;map_canvas&quot;),
        mapOptions);</pre></div></div>

</div>
<p></ br></p>
<p>The API provides you with a <strong>ton</strong> of options for settings like zoom level and which controls are visible. You can even customize the little map markers with your own images. </p>
<h3>API Tutorials</h3>
<p>If you wanted to get started with the Google Maps APIs, here are some links that you&#8217;ll definitely want to check out.</p>
<ul>
<li><a href="http://code.google.com/apis/maps/documentation/javascript/tutorial.html">Official Google JavaScript API Tutorial</a></li>
<li><a href="http://blog.wadehammes.com/post/3837158298">Wade Hammes: Setting a Google Map as the Background of your Web Site</a></li>
</ul>
<h3>Static Maps</h3>
<p>Don&#8217;t want an interactive map? Check out the documentation for adding a <a href="http://code.google.com/apis/maps/documentation/staticmaps/">static map</a>. Many of the features are the same, the result is simply a non-moving image rather than a real map that users can play with.</p>
<h2>Conclusion</h2>
<p>To sum up, if you want a Google Map on your site with no effort, follow the steps above to go the iframe route. Your control over the map is limited but you can have a lot of fun with how you embed it in the page. If you need more features and flexibility, sign up for a free API key and go the JavaScript route.</p>
<p>Leave a comment below and show us any pages you&#8217;ve created with Google Maps. What techniques and resources have you found helpful?</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/embedding-google-maps-into-a-web-page-a-beginners-guide/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why Web Design Books Suck and How to Fix Them</title>
		<link>http://designshack.net/articles/html/why-web-design-books-suck-and-how-to-fix-them/</link>
		<comments>http://designshack.net/articles/html/why-web-design-books-suck-and-how-to-fix-them/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 14:00:51 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=20787</guid>
		<description><![CDATA[Do you have a list of things that you know you should learn but just haven&#8217;t been able to pick up? Have you tried to read through a book or two with no success? Today we&#8217;re going to discuss why you can&#8217;t get through those boring web design books, how they should be different and [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/designbooks-0.jpg" alt="screenshot" width="510"/></div>
<p>Do you have a list of things that you know you should learn but just haven&#8217;t been able to pick up? Have you tried to read through a book or two with no success?</p>
<p>Today we&#8217;re going to discuss why you can&#8217;t get through those boring web design books, how they should be different and what to look for to leverage the way you actually learn.</p>
<p><span id="more-20787"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Are You Broken?</h2>
<p>We&#8217;ve all been there before. You want to learn something new so you do what any educated person would do: head off to the book store. We work in an industry that&#8217;s growing and evolving faster than any of us can keep with up so these trips are a necessity to any web designer that doesn&#8217;t want to be obsolete in a few years. </p>
<p>The pressure that we feel from this environment gives us a sense of panicky urgency. We <strong>need</strong> to learn to survive. If I could only code WordPress themes, learn Ruby on Rails, or figure out what HTML5 apps really are, then I would be much more employable!</p>
<p>We browse the small collection of nerd books that are inevitably shoved into a corner, make our purchases and drive home feeling a deep sense of accomplishment. I&#8217;m on my way now. Give me a week and I&#8217;ll master this new skill, I know because the book jacket says so!</p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;You pour yourself a drink, crack open the book and awake two hours later with your face stuck to the pages&#8221;
</div>
<p></ br></p>
<p>When you get home, there&#8217;s no time like the present to begin your educational journey. You pour yourself a drink, crack open the book and awake two hours later with your face stuck to the pages. After a week or two of similar episodes, you&#8217;ve read 100 pages and don&#8217;t feel like you&#8217;ve learned a single thing.</p>
<p>What happened? Why can some people learn new skills so easily while you struggle to finish a single book? Are you broken?</p>
<h2>Textbooks ≠ Engaging</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/designbooks-1.jpg" alt="screenshot" width="510"/></div>
<p>Think back to your days in college, pouring over textbooks before finals. You learned a lot in those days, but can even the best students among us really say that they <em>enjoyed</em> reading their textbooks?</p>
<p>The truth is, you learned because you had a test coming up, not because you enjoyed the material, otherwise you&#8217;d still be reading those books. Even then, that boring book was backed by hours and hours of class time that was spent pouring over the important information. There were presentation slides, discussions, quizzes and projects all aimed at one thing: getting you to actually learn and absorb all that lame crap that was in the book.</p>
<p>Textbooks are written by academics for academics. One thing that I find interesting is that when a web designer writes a book, he/she often puts on the same cloak of academia and attempts to write under these guidelines, thereby neglecting the intended audience in favor of fitting the accepted mold (admittedly, publishers are likely more to blame than authors).</p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;Instead of blaming the readers, why don&#8217;t we consider how to make the learning experience a little better?&#8221;
</div>
<p></ br></p>
<p>This format, when the pressures of classes and tests are taken away, often results in stacks of unread books that readers had every intention of making it through, but simply weren&#8217;t successful. Instead of blaming the readers, why don&#8217;t we consider how to make the learning experience a little better?</p>
<h2>Books vs. Blogs: A Different Learning Model</h2>
<p>It&#8217;s easy to make vague claims about how design books are boring to make myself feel better about not enjoying them, but where&#8217;s the solid explanation of what&#8217;s wrong and suggestions for how to fix it?</p>
<p>To answer this question, I&#8217;m of course going to stand on a very biased platform and say that design blogs know something that book publishers don&#8217;t about how web designers and even developers often prefer to learn. </p>
<h3>Discouraging: The Book Way</h3>
<p>What&#8217;s the worst part about learning web development? All that stuff at the beginning right? Web development 101: here&#8217;s what an HTML tag is, here&#8217;s the guy who invented them, here&#8217;s where he grew up, here&#8217;s why using tags is better than not using tags, blah blah bah. Then, once you learn all there is to learn about tags in general, it&#8217;s time to walk through each tag in depth to see what it&#8217;s all about. </p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;The academic way to learn something is to lay down a solid foundation of dry theory on every aspect individually before you&#8217;re allowed to try to put it all together.&#8221;
</div>
<p></ br></p>
<p>After twenty pages of this you&#8217;re ready to scoop your eyes out with a spoon just so you never have to see another HTML tag again. Why is web design taught like this? Because the academic way to learn something is to lay down a solid foundation of dry theory on every aspect individually before you&#8217;re allowed to try to put it all together. Otherwise, you&#8217;re brain would explode or you would just carelessly learn to code without knowing the difference between &lt;b> and &lt;strong>.</p>
<p>The problem with a learning model that so heavily leans towards theory is that no one can get through it. You pick up a book on HTML and read 3/4 or even all of it before you&#8217;re ever actually empowered with the skills and knowledge you need to bust out a web page all on your own. This is a flat out discouraging way to learn.</p>
<h3>Encouraging: The Blog Way</h3>
<p>For many people, including myself, one of the best ways to learn to code basic websites turns out to be frequenting web design blogs where tutorials are published. What&#8217;s the difference? Why does it seem easier to learn in this environment?</p>
<p>The obvious answer is that web design blogs break up content into manageable chunks. You&#8217;re not nearly as overwhelmed by a single post as an entire book. But in reality, books are split up fairly nicely as well so that doesn&#8217;t seem to be the full picture.</p>
<p>One interesting thing about writing a blog post is that, for the most part, each post is treated as an individual identity meant to appeal to as many people as possible in a fairly small amount of space. These constraints have led to a learning model that, for many, is much more friendly than the approach most books take.</p>
<h3>Seeing the Big Picture</h3>
<p>As I said before, web design books tend to make you sift through so much of the boring stuff that many people don&#8217;t even make it to the good stuff at the end. Even if you do, there&#8217;s usually not a whole lot even there to redeem the book.</p>
<p>Web design blogs on the other hand are famous for a specific brand of posts that were beyond instrumental in my education: Converting a PSD to HTML and CSS. In a single, brief post (sometimes two if they teach you to build the PSD), these awesome tutorials go through the layout, coding and styling of a basic web page. </p>
<p>Even if I&#8217;ve never touched a text editor in my life, I can follow these tutorials and have a live web page up and running in a single afternoon! This is probably less than the time it would take you to get through that HTML tags section from the hypothetical book above. </p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;Right off the bat you get to build something real and get a feel for what web design and development are really all about.&#8221;
</div>
<p></ br></p>
<p>In contrast to the other method, this is a very encouraging way to learn. Right off the bat you get to build something real and get a feel for what web design and development are really all about. There are some important lessons here about learning in general.</p>
<h2>Jumping In All At Once</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/designbooks-2.jpg" alt="screenshot" width="510"/></div>
<p>The difference between the two methods of teaching is clear. Books tend to ease you very slowly into web development, imagining that having you build a website right from the beginning would be an overwhelming and damaging experience. Only after you have an extremely thorough and solid foundation of theory should you actually attempt to build a complete web page.</p>
<p>PSD to HTML blog posts take the opposite route. Here there is no wading, you&#8217;re thrown into the pool all at once to see if you can swim. You&#8217;re taught as you go what certain things are for and how they work. You are assumed to be reasonably intelligent and therefore allowed to derive a good deal from context and to reach conclusions through doing.</p>
<p>Will running through a single PSD to HTML post thoroughly teach you to be a web developer? Absolutely not. Will there still be huge critical gaps in your knowledge? You bet! However, you&#8217;ve seen what it&#8217;s all about and had the immensely encouraging experience of seeing something complicated that you built come to life.</p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;You’ll start to learn enough to know what you don’t know&#8221;
</div>
<p></ br></p>
<p>The more of these posts you go through, the more you learn, each author is different and has unique insight. Once you&#8217;ve gone through a bunch of these, you&#8217;ll start to learn enough to know what you don&#8217;t know and can then start digging into meatier posts about the complexities of the trade.</p>
<h3>Just Like Learning a Song</h3>
<p>This idea applies in several areas of learning. Imagine that you&#8217;re learning to play guitar and you have two teachers to choose from. One is going to make you memorize every note on the neck, every chord/voicing/variant, and every possible progression before you learn to play a single song.</p>
<p>The other teacher will start the class by teaching you the five chords and simple strum that make up &#8220;The House of the Rising Sun&#8221;. If you&#8217;re like me, you&#8217;re going to choose teacher number two. Sure, the first teacher might actually produce students who are better musicians, but ten years from now the second teacher will have three times as many students who still play guitar simply because that first song gave them enough encouragement to not give up.</p>
<div style="overflow: auto; color: 4e4e4e; background-color: #eeeeee; float: right; width: 250px; margin: 20px 0 20px 20px; padding: 20px -10px 20px 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;">
&#8220;They kill your drive to learn with information overload.&#8221;
</div>
<p></ br></p>
<p>Web design books too often take the route of the first teacher. They kill your drive to learn with information overload and wait far too long to bring you the reward of actually feeling like you can build something.</p>
<p>To be fair, some books do in fact take the approach of the second teacher, walking you through the education process in a series of fulfilling projects. If you&#8217;re in the market for a good way to learn something when other methods have failed, find a book like that and see if it&#8217;s not much easier to get through.</p>
<h2>Conclusion</h2>
<p>This post has two simple messages, each with a specific audience. For authors and publishers, consider creating books that actually take advantage of the way your audience learns rather than following an academic schema that discourages a large portion of your readers. Let them dive into big projects right away, make some conclusions  and even some mistakes, then fill in the gaps in knowledge as they progress.</p>
<p>For those of you trying to pick up a new skill, whether it&#8217;s basic CSS or advanced PHP, try to find a teaching source that fits the way you learn. If you learn better by reading chapters and chapters of theory before attempting anything, great, you have plenty of books to choose from.</p>
<p>However, if this doesn&#8217;t work for you, look for something that throws you in the deep end right away. Identifying and leveraging your own learning tendencies is a life-changing experience!</p>
<p><em>Photo Credits: <a href="http://www.flickr.com/photos/gottgraphicsdesign/4251724620/">bgottsab</a>, <a href="http://www.flickr.com/photos/danielflower/485194245/">danflo</a> and <a href="http://www.flickr.com/photos/8047705@N02/5530819321/">LifeSupercharger</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/why-web-design-books-suck-and-how-to-fix-them/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Link to Specific Points in a Page and Animate the Scroll</title>
		<link>http://designshack.net/articles/html/how-to-link-to-specific-points-in-a-page-and-animate-the-scroll/</link>
		<comments>http://designshack.net/articles/html/how-to-link-to-specific-points-in-a-page-and-animate-the-scroll/#comments</comments>
		<pubDate>Thu, 19 May 2011 14:00:29 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=20323</guid>
		<description><![CDATA[You&#8217;ve seen it done before, you click a link in the navigation and it takes you not to another page but a specific point within the current page. How is this accomplished? With some extremely basic HTML that you can pick up in a few seconds! To take it further, we&#8217;re also going to see [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve seen it done before, you click a link in the navigation and it takes you not to another page but a specific point within the current page. How is this accomplished? With some extremely basic HTML that you can pick up in a few seconds!</p>
<p>To take it further, we&#8217;re also going to see how to animate the transition using a little jQuery.</p>
<p><span id="more-20323"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Internal Linking: The Gist</h2>
<p>As I explained in the intro, today we&#8217;re going to learn a basic trick and then see how to make it even better. When I was first learning web design, this was one of those things that I always told myself I needed to figure out but always put off learning, if you&#8217;re in the same boat, this article is for you.</p>
<p><strong>Live Demo:</strong> <a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks.html">Click Here</a></p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks.html"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/scroll-links-3.jpg" alt="screenshot" width="510"/></a></div>
<h3>A Tale of Two Links</h3>
<p>As you can probably guess, linking to an internal section in your page requires not one but two links. First, you want to add the link that will serve as the anchor to scroll to, then you create the standard clickable link like you normally would and direct it at the first link. Make sense? If not, don&#8217;t worry, it&#8217;s easier than you think.</p>
<p>For the first part, let&#8217;s say we&#8217;re putting a link in a footer that will scroll to the top of the page, a common practice on longer pages. To insert this link, we use some syntax that you might or might not be familiar with:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;linktotop&quot;</span>&gt;</span>Back To Top<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Notice that instead of the typical &#8220;a href&#8221;, we used &#8220;a name&#8221;. This is important and is a likely point to get tripped up on if you&#8217;re used to inserting links with the former. You can pick anything you want for the name, just remember that it&#8217;s best to use something descriptive like we&#8217;ve done here. Also, make sure you take note of the name that you use, because we&#8217;ll have to refer to it again in the next step. </p>
<p>Once you&#8217;ve got that link all ready to go, it&#8217;s time to insert the anchor. Essentially, if you want to scroll to a specific point in a page, you have to insert a bit of code at that point so that the link we just created knows where to go. </p>
<p>Since we want to link to the top of the page, we would insert this snippet at the top of our HTML.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#linktotop&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>There are a couple of important things to take note of here. First of all, we added a hashtag to the beginning of the link name. This doesn&#8217;t appear in the first link, but it&#8217;s necessary in the second. Also, the text portion of this link has been left blank. This is not necessary, but is in fact an option. More often than not you&#8217;ll probably be linking to an element that is already in your layout so there will be content here. </p>
<h2>Building the Demo</h2>
<p>Now that you understand the syntax, it&#8217;s time to build a basic web page using what we&#8217;ve learned. Obviously, we&#8217;ll need to build a page that&#8217;s long enough to have to scroll. To this end, let&#8217;s start by tossing in some big blocks of text, each with its own headline.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
 	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&quot;</span>&gt;</span>	
	    <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;section&quot;</span>&gt;</span>
	    	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Headline One<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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	    	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Headline Two<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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	    	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Headline Three<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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	    	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Headline Four<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>Lorem ipsum dolor sit amet...<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>
    <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: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>The four headlines should provide us with four potential places to scroll to so we&#8217;re perfectly set up! From here we want to add in the named links the the h1 items.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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;section&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;headline1&quot;</span>&gt;</span>Headline One<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;headline2&quot;</span>&gt;</span>Headline Two<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;headline3&quot;</span>&gt;</span>Headline Three<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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>Lorem ipsum dolor sit amet...<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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;headline4&quot;</span>&gt;</span>Headline Four<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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>Lorem ipsum dolor sit amet...<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></div></div>

</div>
<p></ br></p>
<h3>Starting CSS</h3>
<p>Now we toss in some basic styling for this text. All I&#8217;ve really done is styled the fonts and added a bit of margin to each section to spread them out nicely.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*Text Sections*/</span>
<span style="color: #6666ff;">.section</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.section</span> h1 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span>/<span style="color: #933;">65px</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.section</span> p <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span>/<span style="color: #933;">25px</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>Here&#8217;s what the resulting paragraphs look like. Super simple but they&#8217;ll get the job done for what we need.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/scroll-links-1.jpg" alt="screenshot" width="510"/></div>
<h3>Navigation and Header Image</h3>
<p>To navigate to the anchors, we&#8217;ll need to create a series of links in our html using the hashtag method at the beginning of this article. We&#8217;ll also throw in a placeholder image just to give us a little more scrolling room.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nav&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clearfix&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#headline1&quot;</span>&gt;</span>1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#headline2&quot;</span>&gt;</span>2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#headline3&quot;</span>&gt;</span>3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#headline4&quot;</span>&gt;</span>4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bigPic&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://lorempixum.com/600/400/city/9&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;">div</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Here we&#8217;ve created the text links with simple numerals and inserted the anchors to the various sections of our HTML. Now we just have to apply a little more styling and we&#8217;ll be ready to go.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*Navigation*/</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span>/<span style="color: #933;">30px</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#444</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	-webkit-transition<span style="color: #00AA00;">:</span> all 0.5s ease<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#6fcbf3</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*Image*/</span>
<span style="color: #cc00cc;">#bigPic</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>Basically what I&#8217;ve done here is turned each link into a little box:</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/scroll-links-2.jpg" alt="screenshot" width="510"/></div>
<p>When you hover over one of the links, the background color transitions to blue. Notice that the line height on the text is set to the size of the box, this is a neat trick for centering the text vertically. </p>
<h3>Clearing the Float</h3>
<p>Since I wanted to turn the links into little boxes, I had to keep the display property set to block. This means to make the links line up horizontally, a float was necessary. There&#8217;s a lot of debate on how to clear floats these days, but a quick search revealed that the current favorite method seems to be the following from <a href="http://pathfindersoftware.com/2007/09/developers-note-2/">Pathfinder Software</a>.</p>
<p>Feel free to disagree and implement your own float solutions. I won&#8217;t go any further into this so as to avoid distraction from the main purpose of this tutorial.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* float clearing for IE6 */</span>
<span style="color: #00AA00;">*</span> html .clearfix<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1%</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* float clearing for IE7 */</span>
<span style="color: #00AA00;">*+</span>html .clearfix<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* float clearing for everyone else */</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<h2>Finished Demo: Pure HTML/CSS</h2>
<p>With that, our internal link demo is complete! Click any of the links in the navigation and they should take you to that point of the page. Notice that, for the anchors near the bottom of the page, the scroll just goes down as far as it can. </p>
<p><strong>Live Demo:</strong> <a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks-nojs.html#headline3">Click Here</a></p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks-nojs.html#headline3"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/scroll-links-3.jpg" alt="screenshot" width="510"/></a></div>
<h2>Animating the Scroll</h2>
<p>With HTML, anchor linking works, but the transition is pretty harsh. There&#8217;s no animation at all, the page just jumps right to the anchor upon clicking. What if we want to make this a more gradual effect so the user can plainly see that the page is scrolling down?</p>
<p>You could perform the entire linking and scrolling operation in JavaScript, but I think that&#8217;s a bad idea simply because you&#8217;re unnecessarily limiting the number of people that can use your site to those with JavaScript turned on. Instead, it&#8217;s much better to set the linking up in HTML exactly like we&#8217;ve done here and then add the animation effect for JavaScript users. The site will still work for anyone with JS turned off, they just won&#8217;t see the animation.</p>
<p>To accomplish this, we need three things. The first is of course jQuery because it&#8217;s amazing and makes everything easier. The second is an extremely handy little jQuery plugin from Ariel Flesler called <a href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">ScrollTo</a> and finally, you&#8217;ll need an offshoot of ScrollTo called <a href="http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html">LocalScroll</a>.</p>
<p>This sounds complicated but it&#8217;s super simple. LocalScroll was built for the sole purpose of animating anchor link scrolling so it&#8217;s the perfect tool for the job. It&#8217;s also by far the easiest solution to implement that I was able to find! The first thing you need to do is <a href="http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html">download LocalScroll</a> and insert it along with jQuery into your HTML (ScrollTo will be included in the download as well).</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&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: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.localscroll.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&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: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.scrollTo.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Next we need to pass into it the parent element that contains the hashtag links. In our case the #nav div contains the links so we&#8217;ll insert that into the following snippet:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div 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>&gt;</span>
$(document).ready(function() {
   $('#nav').localScroll({duration:800});
});
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>All you need to do to implement this in your own projects is change the target and, if you choose, specify a duration for the animation. That&#8217;s it! This one little block of text takes care of the animated scrolling effect for us. </p>
<h2>Finished Demo: Animated with JavaScript</h2>
<p>Here&#8217;s version two of our demo, this time with the JavaScript magic throw in. Compare it to the previous version to see how much nicer the effect feels with the transition. </p>
<p><strong>Live Demo:</strong> <a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks.html">Click Here</a></p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/ScrollLinks/internallinks.html"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/scroll-links-3.jpg" alt="screenshot" width="510"/></a></div>
<h2>Conclusion</h2>
<p>In closing, remember that linking to a scroll point within your page is easy with pure HTML. All you need to do is set up a named link that is attached to a specific spot and a clickable link that will get you there.</p>
<p>After that, if you want to make the transition more gradual, use jQuery and LocalScroll together. Be sure to specify both the parent container for your links and the duration of the animation.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/how-to-link-to-specific-points-in-a-page-and-animate-the-scroll/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Weekly Freebies: 180 Incredibly Useful HTML Email Templates</title>
		<link>http://designshack.net/articles/html/weekly-freebies-180-incredibly-useful-html-email-templates/</link>
		<comments>http://designshack.net/articles/html/weekly-freebies-180-incredibly-useful-html-email-templates/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 15:09:16 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[html email]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=15818</guid>
		<description><![CDATA[HTML Email has seen mass amounts of debate, not only about how it should be done but even whether it should be done at all. However, the popularity of this medium has shown only growth in recent years. As support from email applications grows, so to does the richness of the designs. Below we&#8217;ve included [...]]]></description>
			<content:encoded><![CDATA[<p>HTML Email has seen mass amounts of debate, not only about how it should be done but even whether it should be done at all. However, the popularity of this medium has shown only growth in recent years. As support from email applications grows, so to does the richness of the designs.</p>
<p>Below we&#8217;ve included some of the best and most recent free templates from a number of sources. The templates range from heavily designed to extremely basic so that no matter what you&#8217;re looking for, be it a simple layout aid or a nearly finished product, there is something here for you. </p>
<p><span id="more-15818"></span></p>
<h2><a href="http://www.campaignmonitor.com/templates/">Campaign Monitor: 100 Templates</a></h2>
<p>Recently, Campaign Monitor asked some very well-known designers to create some free html email templates for them to distribute. The end result was over 100 beautiful templates that you can <a href="http://www.campaignmonitor.com/templates/">download</a> at zero charge to you.</p>
<p>Unfortunately, 100 templates can be quite a lot to sort through so to help narrow the selection down I&#8217;ve chosen some of my favorite templates from this collection and listed them below. </p>
<h3><a href="http://i4.campaignmonitor.com/files/meagan_fisher/spring.zip">Spring: Meagan Fisher</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-1.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://i1.campaignmonitor.com/files/mike_kus/colordirect_updated.zip">Mike Kus: Color Direct</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-2.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://i2.campaignmonitor.com/files/newism/natural.zip">Newism: Natural</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-3.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://i3.campaignmonitor.com/files/simon_collison/retrogreen.zip"><br />
Simon Collison: Retro Green</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-4.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://i2.campaignmonitor.com/files/veerle_pieters/textile.zip">Veerle Pieters: Textile</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-5.jpg" alt="screenshot" width="510"/></div>
<h2><a href="http://mailchimp.com/resources/html-email-templates/">MailChimp: 36 Templates</a></h2>
<p>If you&#8217;re looking for something to start your own design, the fairly finished templates above might be a pain to customize. MailChimp has a collection of basic layouts that you can use as nice starters for your own aesthetic scheme.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-6.jpg" alt="screenshot" width="510"/></div>
<h2><a href="http://www.cakemail.com/newsletter-templates">CakeMail: 23 Templates</a></h2>
<p>Though I&#8217;m definitely not a fan of all of these templates, the basic layouts at the top of the list serve as nice starters for your own designs, just as with those from MailChimp above.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-7.jpg" alt="screenshot" width="510"/></div>
<h2><a href="http://freemailtemplates.com/">FreeMailTemplates: 20 Templates</a></h2>
<p>Though not as stellar as the Campaign Monitor designs, this collection does feature some really nice looking templates that are versatile enough to be used for almost any business.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-8.jpg" alt="screenshot" width="510"/></div>
<h2><a href="http://beautifulemails.com/category/templates/">Beautiful Emails: 2 Templates</a></h2>
<p>This blog is dedicated to bringing you tutorials, inspiration and templates for better email marketing. They currently have two free HTML email templates that are free to download.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/emailTemplates-9.jpg" alt="screenshot" width="510"/></div>
<h2>Which Will You Use?</h2>
<p>Leave a comment below and let us know which templates above you found to be the most useful. Do you like letting professional designers do all the heavy lifting as with the Campaign Monitor templates or do you want to create custom designs built on top of rock solid layouts like the MailChimp templates?</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/weekly-freebies-180-incredibly-useful-html-email-templates/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Introduction to Developing a Custom Tumblr Blog Theme</title>
		<link>http://designshack.net/articles/html/introduction-to-developing-a-custom-tumblr-blog-theme/</link>
		<comments>http://designshack.net/articles/html/introduction-to-developing-a-custom-tumblr-blog-theme/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 14:00:16 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=15738</guid>
		<description><![CDATA[Tumblr is the fastest growing blog network on the web today. With the ability to quickly reblog any of your followers&#8217; posts it truly revolutionizes the way we interact with a digtial community. Tumblr has taken the popular dashboard feature and expanded it into a personal blog feed. Amongst the many popular features of the [...]]]></description>
			<content:encoded><![CDATA[<p>Tumblr is the fastest growing blog network on the web today. With the ability to quickly reblog any of your followers&#8217; posts it truly revolutionizes the way we interact with a digtial community. Tumblr has taken the popular dashboard feature and expanded it into a personal blog feed.</p>
<p>Amongst the many popular features of the service is the ability to directly customize the look and feel of your page. Each blog has its own theme which is used to give your page its layout and color scheme. There are plenty of free and paid themes to choose from, but it&#8217;s much easier and more fun to create your own.</p>
<p><span id="more-15738"></span></p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/tumblr-ipad-home.jpg" alt="screenshot" width="510"/></div>
<p>In this brief tutorial we&#8217;ll be going over the major pieces to any Tumblr theme. The engine is powered using straight HTML/CSS code along with in-text variables for block elements. Basic HTML is all that&#8217;s required to really get started and build your own theme.</p>
<h2>Understanding Pages</h2>
<p>Any Tumblr theme is simply a single page of HTML code with conditional case variables in-between. This basically means all of the page views are separated by case variables in one long document.</p>
<p>So for example all posts from your site will be broken down into categories. These are based on media content such as text, image, video, URL link, etc. These are all different options or <strong>views</strong> for your blog. Separate options can be activated based on whichever type of page is being requested.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/tumblr-mac-laptop.jpg" alt="screenshot" width="510"/></div>
<p>Now these types of conditionals are known as <strong>blocks</strong>. These are known as case variables which display unique content based on certain conditions. Page variables are single containers which hold dynamic values. For example, a Page Title or RSS feed will change with each blog so these values can be added through variables (<code>{Title}</code> and <code>{RSS}</code> respectively).</p>
<h2>Building the Header</h2>
<p>The heading is the first piece to any Tumblr theme. It contains all the important details about your blog and which meta options are set. Below is a bit of sample code to use in your header to get started.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<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;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
{block:IndexPage}
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>{Title}<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;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{MetaDescription}&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
{/block:IndexPage}
{block:PostSummary}<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>{PostSummary}<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>{/block:PostSummary}
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;if:Show Search&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;if:Show people I follow&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{Favicon}&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;alternate&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/rss+xml&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{RSS}&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</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: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://jakerocheleau.com/tumblr/global.css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</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: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://static.tumblr.com/ji8ycjw/YLalddwdr/print.css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;print&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--[if IE 8]&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://static.tumblr.com/ji8ycjw/SNRlddwgz/ie8.css&quot; media=&quot;screen&quot; /&gt;&lt;![endif]--&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>The document doesn&#8217;t look much different than a standard HTML page. You begin with a DOCTYPE declaration followed by your html and head tags. Inside you may notice two lines of code delineating a block element. The opening <code>{block:IndexPage}</code> is creating a block of code to only display on the index page.</p>
<p>Inside we have a title and meta description which display the <code>{title}</code> variable of your blog. All other pages have a title containing a post content summary labeled <code>{postSummary}</code>. You will find these variables littered throughout themes such as <code>{Favicon}</code> and <code>{RSS}</code> for header placings.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/tumblr-love.jpg" alt="screenshot" width="510"/></div>
<p>One last bit to notice is how all of my theme&#8217;s CSS styles are in external documents. This provides a much quicker way to access data and process DOM actions. Also since Tumblr has to load its own files before loading your theme external styles will expedite the whole process.</p>
<h2>Blog Posts</h2>
<p>Spend some time examining your document body and building your page structure. With time you should reach your primary content area. Inside here is where all of your blog posts and comments will be listed. This is marked by a <code>{block:Posts}</code> and contains many sub-variables.</p>
<p>Within the Posts block we are checking for the different types of media. There are a lot to go over and they&#8217;re all relatively straightforward. I&#8217;ve added a list of post block types below:</p>
<ul>
<li><code>{block:Text}</code></li>
<li><code>{block:Photo}</code></li>
<li><code>{block:Photoset}</code></li>
<li><code>{block:Quote}</code></li>
<li><code>{block:Link}</code></li>
<li><code>{block:Chat}</code></li>
<li><code>{block:Audio}</code></li>
<li><code>{block:Video}</code></li>
<li><code>{block:Answer}</code> <em>*for ask messages</em></li>
</ul>
<p>These may seem a bit difficult to take in at first. Truthfully the best way to understand is by practicing and building out new Tumblr themes. If you&#8217;d like deeper information into each post media check out the <a href="http://www.tumblr.com/docs/en/custom_themes">official themes docs</a>.</p>
<h2>Functional Pagination</h2>
<p>Tumblr doesn&#8217;t plan to keep all your posts loaded on a single page, that could become very intrusive. Pagination is built into Tumblr&#8217;s themeing engine and supports next/previous links for your archive pages.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/coda-tumblr-theme.jpg" alt="screenshot" width="510"/></div>
<p>The first style of pagination guides the user between your older pages. Each page generally stores 7-10 posts, but can be altered to contain more. This type of conditional will work on any page and can display links as long as there are more pages to traverse. Below is an example of this style:</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">{block:Pagination}
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
    {block:PreviousPage}
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{PreviousPage}&quot;</span>&gt;</span>Previous<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    {/block:PreviousPage}
&nbsp;
    {block:NextPage}
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{NextPage}&quot;</span>&gt;</span>Next<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    {/block:NextPage}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
{/block:Pagination}</pre></div></div>

</div>
<p></ br></p>
<p>This is a very rudimentary example, though it does clearly illustrate the point. This could be placed anywhere in your code to generate a Pagination block of links.</p>
<p>The second option is to offer links between posts. These will show only on individual post pages where a visitor can see your content and responses listed. Whenever there is a post either before or after in the archives you can display nav links.</p>
<p>The code looks exactly the same as above, except with slightly different variable names. The initial block checks for <code>{block:PermalinkPagination}</code> instead of just Pagination. Also all instances of <strong>Page</strong> are replaced by <strong>Post</strong> as outlined below.</p>
<ul>
<li><code>{block:PreviousPost}{/block:PreviousPost}</code></li>
<li><code>{block:NextPost}{/block:NextPost}</code></li>
<li><code>{PreviousPost}</code></li>
<li><code>{NextPost}</code></li>
</ul>
<h2>JumpPage Nav</h2>
<p>There is also a 3rd option for navigation links called jump pages. These offer visitors a list of numerical links pointing each towards a page in your blog archives. The structure is similar to other forms of pagination, though with its own slight changes.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/tumblr-reblog-symbol.jpg" alt="screenshot" width="510"/></div>
<p>I&#8217;ve included another example below for Jump Pagination. The content is a bit more confusing to digest so take time to look over the code. There are no new concepts here since all Tumblr themes are straight HTML and basic variables.</p>
<div style="overflow: auto; background-color: #eeeeee;">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">{block:JumpPagination length=&quot;5&quot;}
    {block:CurrentPage}
        <span style="color: #ddbb00;">&amp;lt;</span>span class=&quot;currentPage&quot;&gt;{PageNumber}<span style="color: #ddbb00;">&amp;lt;</span>/span&gt;
    {/block:CurrentPage}
&nbsp;
    {block:JumpPage}
        <span style="color: #ddbb00;">&amp;lt;</span>a class=&quot;jumpPage&quot; href=&quot;{URL}&quot;&gt;{PageNumber}<span style="color: #ddbb00;">&amp;lt;</span>/a&gt;
    {/block:JumpPage}
{/block:JumpPagination}</pre></div></div>

</div>
<p></ br></p>
<p>The length=&#8221;5&#8243; attribute through the first element counts how many links to show. This means our block list will always contain 5 links geared towards a central axis.</p>
<p>To further expand on this theory the only times you&#8217;ll see the current page towards an endpoint is at the very start or end of navigating pages. The system works by setting the current page directly in the middle of all Jump Pages. So for example on page 7 of our blog archives we should see links for pages 5-9.</p>
<h2>Further Readings</h2>
<p>These are some of the most basic intro pieces for developing into Tumblr. Themes are a great way to customize your blog and add in your own pinch of creativity. It&#8217;s encouraged to check out Tumblr&#8217;s official theme documentation for detailed examples and resources.</p>
<p>Some pages you may potentially be interested reading include <a href="http://www.tumblr.com/docs/en/custom_themes#likes">likes</a>, <a href="http://www.tumblr.com/docs/en/custom_themes#following">following count</a>, <a href="http://www.tumblr.com/docs/en/custom_themes#search">search queries</a>, and <a href="http://www.tumblr.com/docs/en/custom_themes#notes">post notes</a>. For every Tumblr account you are given a free theme by default. Spend some time dissecting their official code to get a better understanding of how Tumblr&#8217;s system works and how to manipulate your own customizations.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/introduction-to-developing-a-custom-tumblr-blog-theme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Deeper Study Into the WWW&#8217;s Document Object Model</title>
		<link>http://designshack.net/articles/html/deeper-study-into-the-wwws-document-object-model/</link>
		<comments>http://designshack.net/articles/html/deeper-study-into-the-wwws-document-object-model/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 16:40:52 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=15054</guid>
		<description><![CDATA[The Document Object Model is a fundamental part of the World Wide Web. DOM for short, this is a set of API standards which define how a browser should construct a web document and how developers are able to manipulate objects. We&#8217;ll be looking a bit further into how the DOM really works. The model [...]]]></description>
			<content:encoded><![CDATA[<p>The Document Object Model is a fundamental part of the World Wide Web. DOM for short, this is a set of API standards which define how a browser should construct a web document and how developers are able to manipulate objects.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/egypt-pyramids-object-model.jpg" alt="screenshot" width="510"/></div>
<p>We&#8217;ll be looking a bit further into how the DOM really works. The model has been around for years and currently resides at DOM level 3 (<a href="http://www.w3.org/TR/DOM-Level-3-Core/">DOM3 documentation here</a>). There is a <a href="http://dev.w3.org/2006/webapi/DOM4Core/DOM4Core.html">DOM4</a> currently in editor&#8217;s draft with some brand new specs coming soon. For now we can focus on a brief understanding of how the object model came into being.<br />
<span id="more-15054"></span></p>
<h2>A History Lesson</h2>
<p>During the early days of web scripting there was no standard way to access page objects. This allowed major browsers to come in and write their own standards and rules for document manipulation. Software companies even wrote their own Scripting languages such as VBScript by Microsoft and Applescript by Apple.</p>
<p>The early models were very limited. You could only access specific elements like images or form inputs. Over time the World Wide Web Consortium developed a standard model which most mainstream software publishers followed. Notably Microsoft&#8217;s Internet Explorer, Netscape, Safari, and Opera.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/code-applescript-directory.jpg" alt="screenshot" width="510"/></div>
<p>Currently the DOM has been through many revisions and allows for very precise manipulation of page elements. With script libraries such as <strong>jQuery</strong> and <strong>MooTools</strong> developers are able to spend much less time hung up on bugs.</p>
<h2>Modern DOM Scripting Today</h2>
<p>JavaScript is by far the most popular language amongst developers. Originally started as an open source project by Netscape in 1995. It&#8217;s based off the popular programming language Java and has been modified by countless communities of web developers.</p>
<p>The DOM itself is only useful in situations when objects are able to be accessed. Mostly all standards compliant browsers today support all elements and methods for DOM manipulation in full. With this standardization of the object model we have seen a rise in simple scripting and page functionality.</p>
<h2>The Document Tree</h2>
<p>When envisioning the DOM it can be easily understood in comparison to a tree. When a document loads each page element is held in memory as a new object. These are sometimes referred to as <strong>nodes</strong> of the tree.</p>
<p>As an example each proper HTML page should start with an HTML element and all page content should load within a <code>body</code> element. This means your tree hierarchy starts at a root HTML element and traverses into its first node <code>body</code>.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/dom-tree-graphic.jpg" alt="screenshot" width="510"/></div>
<p>This is a simple idea but it provides immense power to developers. From this we are able to pull many types of elements from the page just by accessing their specific node or location in the document. A small script could be written to pull all images from a page and push them into an array for storage.</p>
<p>From here it&#8217;s possible to access each image element via JavaScript. Below I&#8217;ve added some code which sets 2 variables. The first holds the 3rd image object in memory while the second pulls the <code>src</code> string from the element.</p>
<pre>var imgtag = document.images[3];
var imgsrc = document.images[3].src;
</pre>
<h2>Node Methods</h2>
<p>Once you have the ability to manipulate and access nodes you are able to push functions onto them. The Object Model is not just for traversing the page but also applying new effects.</p>
<p>These are called <strong>methods</strong> and they are written into the DOM specification. When imagining a node-based tree system these methods will clear up most any confusion. Below is a small example list of some popular methods you can use on nodes:</p>
<ul>
<li><code>nodeA.firstChild</code></li>
<li><code>nodeA.lastChild</code></li>
<li><code>nodeA.parentNode</code></li>
<li><code>nodeA.nextSibling</code></li>
<li><code>nodeA.prevSibling</code></li>
</ul>
<p>Most of these methods can be used within a variable declaration or function return statement. They will return an object from the DOM in relation to your current placement.</p>
<p>The first two will grab the first inner node and last inner node, respectively. This is what the keyword <strong>child</strong> is supposed to represent, with <em>nodeA</em> being the parent to both children. This should also explain how <code>parentNode</code> works as you can pull the node object which sits directly above your current selector.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/windows-classic-theme-view.jpg" alt="screenshot" width="510"/></div>
<p>Both sibling functions are unbeknownst to most and target elements at the same hierarchical level. As an example if you were traversing an unordered list with 3 <code>li</code> tags you could only call <code>nextSibling</code> 2 times before returning <em>null</em>. Many of these functions have since become scaled down by 3rd party libraries into quicker, more accurate methods.</p>
<h2>Element Classes and IDs</h2>
<p>One of the most popular ways to retrieve object information is through direct targeting. If you&#8217;ve written HTML code you should know about class and ID attributes. These can be set on any page element and are notoriously useful for applying CSS styles.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/java-programming-printout.jpg" alt="screenshot" width="510"/></div>
<p>When you create these attributes the DOM recognizes them as separate environments from the overall document. IDs are required to be unique amongst your page and will cause errors in scripting if you duplicate the same name. Classes may contain countless elements, although they can become bogged down quickly.</p>
<p>The popular method <code>getElementById()</code> has been used by developers for a decade to simplify the process of object manipulation. This method takes a single string argument which holds the ID value of any element you&#8217;re looking to target. As such you can change an image&#8217;s <code>src</code> attribute quickly with similar code:</p>
<pre>document.getElementById('myImg').src = "images/newImg.jpg";
</pre>
<h2>Advances in the Model</h2>
<p>With the release of the popular <a href="http://designshack.net/articles/javascript/build-an-ipad-themed-image-slider-with-jquery">jQuery library</a> it&#8217;s easier than ever to develop powerful scripts. Older functions such as <code>getElementById()</code> and <code>getElementsByTagName()</code> are still accessible, though deprecated by most standards.</p>
<p>The quickest way to get started manipulating the DOM is by accessing objects through jQuery. A simple method call <code>$(document).ready({})</code> is all that&#8217;s required to run a new event. The <code>$()</code> syntax is used to represent pulling any type of object from the page.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/city-street-night.jpg" alt="screenshot" width="510"/></div>
<p>This can be used in unison to pull IDs and tags from a page. Each simply requires the same symbols used in CSS declarations such as <code>$('#myid')</code> and <code>$('.myclass')</code>. Once inside the ready function jQuery allows you to pull out as many events and functions as you need.</p>
<p>The library is optimized for speed and with the DOM currently advancing rapidly we are seeing huge leaps in scripting support. Each node is loaded into an object memory slot which both the web browser <em>and</em> developer may access.</p>
<h2>Conclusion</h2>
<p>The open source movement has largely contributed to the advancement of DOM specs, too. Over the past 10 years we&#8217;ve seen XML welcomed into the documentation along with ways of defining content feeds (RSS, Atom, etc).</p>
<p>It&#8217;s important to stay on top of trends as web developer. The web is advancing quickly and the Document Object Model&#8217;s latest revisions show how much control is available today. If you&#8217;d like to delve further into DOM scripting we offer <a href="http://designshack.net/articles/javascript/20-simple-jquery-tricks">collections of jQuery tricks</a> and many <a href="http://designshack.net/articles/css/30-free-video-tutorials-for-learning-web-design">web design video tutorials</a> completely free!</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/deeper-study-into-the-wwws-document-object-model/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to Build a Website With Adobe Project Rome</title>
		<link>http://designshack.net/articles/html/how-to-build-a-website-with-adobe-project-rome/</link>
		<comments>http://designshack.net/articles/html/how-to-build-a-website-with-adobe-project-rome/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 17:05:06 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=14165</guid>
		<description><![CDATA[Adobe recently launched a project called Rome that is meant to be a sort of all-in-one content publishing platform. You can use this innovative application to build websites, print projects, interactive PDFs and more. Today I&#8217;ll give you a super basic beginner&#8217;s introduction to Rome so you can see what it is, how to use [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><a href="http://rome.adobe.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-21.jpg" alt="screenshot" width="510"/></a></div>
<p>Adobe recently launched a project called Rome that is meant to be a sort of all-in-one content publishing platform. You can use this innovative application to build websites, print projects, interactive PDFs and more. </p>
<p>Today I&#8217;ll give you a super basic beginner&#8217;s introduction to Rome so you can see what it is, how to use it and whether or not it&#8217;s right for you.</p>
<p><span id="more-14165"></span></p>
<h2>Rome</h2>
<p>In Adobe&#8217;s own words, Project Rome is &#8220;Simple, powerful, all-in-one content creation and publishing for virtually anyone.&#8221; If you think this is a little vague, you&#8217;re right. But then again, the entire project is a little puzzling. Is Rome the future of Photoshop? Is it competition for Dreamweaver or InDesign?</p>
<p>The answer is really &#8220;none of the above.&#8221; After playing with it a bit, it becomes obvious that Adobe is attempting to target a different market than with the Creative Suite. While CS is an incredibly expensive set of powerful, professional applications that can take years (decades?) to learn thoroughly, Rome is meant to be a user-friendly way for just about anyone to create rich content. </p>
<p>Before we get started, you&#8217;ll want to stop by the <a href="http://rome.adobe.com/">Rome website</a> and either download the desktop application or launch the web app (I&#8217;ll be using the desktop version).</p>
<div class="tutorialimage"><a href="http://rome.adobe.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-1.jpg" alt="screenshot" width="510"/></a></div>
<h3>How Much Does It Cost?</h3>
<p>Rome is currently available in a free preview. Adobe apparently hasn&#8217;t yet decided their pricing strategy and wants to see how users respond before proceeding. You can download a copy now but just know that one day it will likely deactivate it and make you either purchase a one-time license or perhaps even a subscription. </p>
<h2>Getting Started</h2>
<p>Once you&#8217;ve downloaded the application, firing it up should make a vertical strip of buttons appear on your desktop.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-2.jpg" alt="screenshot" width="510"/></div>
<p>From here you can browse the default templates or even a nice gallery of user-submitted templates, but these already have a lot going on so it&#8217;s better for learning purposes to start from scratch. </p>
<p>Click the &#8220;Create New&#8221; button to open a rather large gallery of possible document sizes. From here go to &#8220;Blank for Screen&#8221; and select something in the &#8220;Browser Sizes&#8221; folder. I chose 960&#215;550. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-3.jpg" alt="screenshot" width="510"/></div>
<h2>Meet Rome: The Interface</h2>
<p>When you first get a look at the Rome interface, it looks like an extremely simplified version of Photoshop. Rather than an endless sea of palettes, there&#8217;s only a couple. In fact, there might seem to be far too few. This is because Adobe seems to be experimenting with some new ideas that only show you what you need to see when you need to see it, rather than giving you the whole enchilada all at once. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-4.jpg" alt="screenshot" width="510"/></div>
<p>The image above shows just how bare the screen is compared to what we&#8217;re used to in the Creative Suite. We&#8217;ll take a closer look at each section below as we dive into our simple project.</p>
<h2>Sheets</h2>
<p>The site we&#8217;re going to build will have several pages. Rome refers to these as &#8220;Sheets&#8221; and displays them in the upper left with thumbnail previews.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-5.jpg" alt="screenshot" width="510"/></div>
<p>The first thing we want to do is create a &#8220;Master Sheet.&#8221; This will allow us to set up a few basic items that will appear on every page. Rather than placing items manually on every sheet, items in the master sheet will automatically be carried over to your other sheets. This can be confusing at first because you&#8217;ll often see an element on a sheet that you can&#8217;t seem to edit. This is because, though the item may appear on that sheet, it&#8217;s a master element and therefore requires you to select the master sheet before editing. </p>
<p>To create a master sheet, click on &#8220;Show Master Sheets&#8221; in the &#8220;View&#8221; menu. This should separate your sheets menu into two sections: Sheets and Master Sheets. Click the little plus button to add in a few extra regular sheets. Next to the thumbnail of a sheet is a little Rome icon, you&#8217;ll see these scattered throughout the interface indicating that there&#8217;s a hidden, context-sensitive menu here. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-6.jpg" alt="screenshot" width="510"/></div>
<p>Use this little flyout menu to name your sheets Home, About, Portfolio and Contact. </p>
<h2>Navigation Menu</h2>
<p>Since we&#8217;re keeping this as a simple introduction to the app, we can show off many of the basic features by building a navigation menu. To start, grab the text tool and draw a box. Then type &#8220;Home&#8221; and use the menu shown below to select a font that you like. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-7.jpg" alt="screenshot" width="510"/></div>
<p>Here you really see that menu magic in action. There&#8217;s a ton of menu options here, each with a set of submenus. What you get is a lot of functionality without all the clutter. It definitely takes some getting used to, and can be time consuming, but once you figure it out it&#8217;s not so bad. I do really like the little sliders that can be used to adjust various properties like font size.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-8.jpg" alt="screenshot" width="510"/></div>
<p>Once you&#8217;ve got the size and font figured out, go down to the &#8220;Link&#8221; menu and set the link to the &#8220;Home&#8221; sheet. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-9.jpg" alt="screenshot" width="510"/></div>
<p>This will automatically change the appearance of the link to blue with an underline. Since we don&#8217;t want either of these, we&#8217;ll have to fix it. Changing the color back to black is easy enough but the underline was harder to find. This option is found under the &#8220;More Character Options&#8221; menu shown below.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-10.jpg" alt="screenshot" width="510"/></div>
<h3>Hover Effect</h3>
<p>Next we want to change the appearance of the link when the user is hovering over it with the cursor. This isn&#8217;t exactly an intuitive process and took me a few minutes to figure out.</p>
<p>With your text box selected, go to &#8220;Event Settings&#8221; in the &#8220;Advanced&#8221; menu and activate &#8220;Standard Events.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-11.jpg" alt="screenshot" width="510"/></div>
<p>You should now have an &#8220;Events&#8221; option in the main menu. From here, go to &#8220;Mouse Enter&#8221; and &#8220;Set Property.&#8221; Next, select your text object and set the property to Opacity. Finally set the value to 50%. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-12.jpg" alt="screenshot" width="510"/></div>
<p>This will dim the text to 50% of its original opacity when someone hovers over it. I would&#8217;ve like to have simply set the color, but that option doesn&#8217;t seem to appear in the events menu.</p>
<p>The problem that we now run into is that the text will change color on Mouse Enter but will stay that way permanently. To solve this, we need to add another event on Mouse Exit that sets the opacity back to 100%. See the image below for a reference.  </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-13.jpg" alt="screenshot" width="510"/></div>
<h3>Duplicating the Home Link</h3>
<p>Now that we&#8217;ve got our first link set up just the way we want, copy and paste it three times to create the About, Portfolio and Contact links. Remember that you&#8217;ll have to select the text for each, then go in and change the links to point to the appropriate sheets. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-14.jpg" alt="screenshot" width="510"/></div>
<p>You&#8217;ll also want to distribute the objects vertically to make sure they&#8217;re spaced evenly. To do this, select all of the text boxes and go to the Align menu. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-15.jpg" alt="screenshot" width="510"/></div>
<h2>Previewing Your Work</h2>
<p>To see if your navigation menu is functioning properly, click the little monitor button with a play button near the top of the screen. This should give you a live preview of your site in action. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-16.jpg" alt="screenshot" width="510"/></div>
<p>Hover over the links to make sure they&#8217;re working and click around to see if the sheet is changing. </p>
<h2>The Objects Palette</h2>
<p>Now that you&#8217;ve got a few elements on the page, let&#8217;s take a look at the Objects palette. This is equivalent to the Layers palette you&#8217;re used to seeing in other apps and is essentially just an interactive list of all the elements on the page. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-17.jpg" alt="screenshot" width="510"/></div>
<p>Note that it&#8217;s much simpler than the Photoshop layers palette. There is no masking, layer effects, etc.</p>
<h2>Finishing the Master Sheet</h2>
<p>Since every good minimalist site has a cliche circle logo, ours simply cannot remain without one. Mocking up one quickly will give you a feel for the shape tool. Notice that the shapes are completely resizable with no image degradation. Rome is perfectly suited to work with both vector and raster objects.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-18.jpg" alt="screenshot" width="510"/></div>
<p>And with that, we&#8217;re finished with our Master Sheet. These elements will appear on every page without any additional effort.</p>
<h2>Finishing Up The Site and Exporting</h2>
<p>As I mentioned before, the navigation allowed us to cover most of the features that I wanted to show off. We set up links, positioned and distributed objects and created hover effects.</p>
<p>From here you should play around on your own and finish up the other pages. Try pasting in an image, working with paragraphs of text and maybe even building a grid. Be sure to select the appropriate sheet before adding content so that you don&#8217;t keep adding to the Master Sheet. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-19.jpg" alt="screenshot" width="510"/></div>
<p>When you&#8217;re finished with the site, you have two basic options for exporting it. The first is as a Rome site. This uploads your site to an Adobe hosted server using your Adobe ID (free for now). However, you can&#8217;t do anything with it this way so I prefer exporting it to an SWF and selection the option to build an HTML file.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/adoberome-20.jpg" alt="screenshot" width="510"/></div>
<p>This will give you a live, functioning website built all by yourself without an ounce of code!</p>
<h2>My Thoughts on Rome</h2>
<p>Now comes the part that you&#8217;re really interested in, can you use Rome for actual projects? In order to answer this question, let&#8217;s look at the pros and cons.</p>
<p>First, let&#8217;s look at the positive side. Rome is an innovative WYSIWYG that is by no means perfect but feels quite polished and powerful. The learning curve is much smaller than the CS apps and should definitely appeal to anyone intimidated by that suite. Further, it achieves the ever illusive goal of allowing non-developers to actually build a functioning website without a single line of code.</p>
<p>However, despite these benefits, I don&#8217;t see myself ever using Rome in a professional context for web projects. The biggest hurdle for me is that it is so dang dependent on Flash. I&#8217;m not going to launch into a Flash-bashing rant, but this is simply an impractical use of the technology whether you love or hate it. The site we just built featured only a few links and images. There&#8217;s absolutely no reason the resulting files should be anything but pure HTML and CSS. I can understand Adobe wanting to build in Flash support, but don&#8217;t claim that I can build websites with this tool if you don&#8217;t even have an option for a basic web output. </p>
<p>Keep in mind that this article only looked at Rome from a web point of view. It might still be great for developing print materials and interactive PDFs. In fact, it&#8217;s actually a really awesome tool for the latter.</p>
<h2>Conclusion</h2>
<p>To sum up, if you are a complete stranger to web development and need to build a quick site yourself without hiring anyone or reading 15 books, check out Rome. It&#8217;s fairly easy to pick up and run with no matter what your level of expertise. </p>
<p>However, if you&#8217;re in the market for a robust and user friendly WYSIWYG that actually creates professional level websites, check out our tutorial on <a href="http://designshack.net/articles/html/how-to-build-a-website-with-flux-3-a-coders-wysiwyg">Flux 3</a>. If you understand CSS, Flux is a killer application and I have found no worthy rival. </p>
<p>Leave a comment below and let us know what you think of Project Rome. What did Adobe do right in this experiment? What did they do wrong? We want to hear from you!</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/how-to-build-a-website-with-adobe-project-rome/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>How to Build a Website With Flux 3: A Coder&#8217;s WYSIWYG</title>
		<link>http://designshack.net/articles/html/how-to-build-a-website-with-flux-3-a-coders-wysiwyg/</link>
		<comments>http://designshack.net/articles/html/how-to-build-a-website-with-flux-3-a-coders-wysiwyg/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 19:31:05 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[flux]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=13207</guid>
		<description><![CDATA[Flux is a WYSIWYG website editor for Macs. Now, before you curse under your breath about how much you hate WYSIWYGs, you should know that Flux is different and is both powerful and flexible enough to be used by professional web developers. Today I&#8217;ll introduce you to Flux by creating a super simple web page [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><a href="http://www.theescapers.com/flux/index.html"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-0.jpg" alt="screenshot" width="510"/></a></div>
<p><a href="http://www.theescapers.com/flux/index.html">Flux</a> is a WYSIWYG website editor for Macs. Now, before you curse under your breath about how much you hate WYSIWYGs, you should know that Flux is different and is both powerful and flexible enough to be used by professional web developers. </p>
<p>Today I&#8217;ll introduce you to Flux by creating a super simple web page from scratch (no annoyingly rigid templates). Along the way we&#8217;ll see what a typical workflow looks like and why it just might be the best visual web editor I&#8217;ve ever used. </p>
<p><span id="more-13207"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Why Is Flux Different?</h2>
<p>When I think of a WYSIWYG website editor, two popular applications come to mind. The first is Dreamweaver. Dreamweaver is a ridiculously powerful application, but has a learning curve that&#8217;s quite high. It&#8217;s simply a huge application that may not be worth the trouble for many designers who are already comfortable coding by hand.</p>
<p>The second application that comes to mind is iWeb. iWeb is fun for a few hours, but once you realize how strict the template system is, the idea of using it for professional web design goes out the window. Even its much far superior rival RapidWeaver still seems to push you more towards preset designs and seems like its targeted towards web development novices.</p>
<p>So Dreamweaver is for professionals but has a steep learning curve and iWeb is for laymen and has almost zero learning curve (and consequently zero flexibility), where is the happy medium? Enter Flux.</p>
<p>Flux is a visual web design application for people that hate visual web design applications. The workflow has been carefully crafted to mirror the way you code sites by hand. The best part: it&#8217;s completely flexible. There are some included templates but I&#8217;ve never even really bothered with them because Flux makes it easy to design from the ground up, just like I would if I were writing out the code manually.</p>
<p>Enough talk, let&#8217;s see Flux in action.</p>
<h2>What We&#8217;re Building</h2>
<p>Because I want this to be a really basic introduction, we&#8217;ll keep the design super simple. If I get enough requests in the comments, I can write another more involved and advanced tutorial but for now we&#8217;ll stick with a basic one-page site with very little on it. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-1.jpg" alt="screenshot" width="510"/></div>
<p>Pretty simple right? It almost looks like one of the cheesy templates that come with these types of apps but as I said above, we&#8217;ll be building this from the ground up.</p>
<h2>Step 1: Creating a New Project</h2>
<p>Creating a new project in Flux is a painless procedure. All you do is go to File>New and you&#8217;re on your way. It will ask you where you want to place the files and whether you want Flux to automatically create a basic site structure for you. This includes the following: index.html, main.css and an images folder. In this case that&#8217;s exactly the format that I want to use so I chose to let it set it up for me. If you have a different system that you like better, you can do this manually. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-2.jpg" alt="screenshot" width="510"/></div>
<p>When you double click on the HTML file, you&#8217;ll be taken into the main Flux interface. As you can see, there&#8217;s a lot going on here. In fact, we could spend the entire tutorial just discussing each button and feature. However, to make things less boring, we&#8217;ll go straight to the building and introduce features as they come up. I definitely recommend that you download the demo and poke around the interface to familiarize yourself with it. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-3.jpg" alt="screenshot" width="510"/></div>
<h2>Step 1: Styling The Body</h2>
<p>If you click on the big empty canvas area, you should see a box that becomes highlighted with the word &#8220;body&#8221; in the upper left. This is the empty body structure of your HTML. The first thing we&#8217;ll want to do for our site is add a background to this element. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-4.jpg" alt="screenshot" width="510"/></div>
<p>To do this, click on the Inspector button at the top (looks like a pair of binoculars). This will bring up what is in my opinion, the heart of the app. Here you&#8217;ll create styles and define the look for every element that you create inside of Flux. The output of the Inspector is CSS and all of the controls inside are labeled with the CSS properties you&#8217;re used to working with. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-5.jpg" alt="screenshot" width="510"/></div>
<h3>Adding A Background Color</h3>
<p>If we were coding this site by hand, the first step might be to designate a background color for the body. We&#8217;ll actually be using a repeating image in the next step, but we&#8217;ll want to make sure the background looks right even if the image doesn&#8217;t load. </p>
<p>With the body selected, we&#8217;ll go to the &#8220;Fill&#8221; section on the left of the Inspector. From here, applying a background color is as simple as clicking on the appropriate CSS property and typing in our color; in this case #1f1f21. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-6.jpg" alt="screenshot" width="510"/></div>
<h3>Adding A Background Image</h3>
<p>To add a background image, we basically take the same exact steps and simply navigate to the proper file in the images folder. I used an awesome free background from <a href="http://www.premiumpixels.com/carbon-fibre-photoshop-patterns/">Premium Pixels</a>.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-7.jpg" alt="screenshot" width="510"/></div>
<h2>Step 2: Adding a Container</h2>
<p>To add a container to a site, you would normally just throw in a div, and that&#8217;s exactly how things work in Flux. Click the &#8220;Container&#8221; button at the top and go down to &#8220;Quick Div.&#8221; Make sure that when you do this step, you have the body element selected. In Flux, you always want to select your desired parent object when creating a new element. This ensures that it is inserted into the correct portion of your HTML. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-8.jpg" alt="screenshot" width="510"/></div>
<p>This should create a little empty box with guides on your canvas. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-9.jpg" alt="screenshot" width="510"/></div>
<p>Just as we did before, select the element and open the inspector. Under &#8220;Position &#038; Size&#8221;, set the width to 700px and the height to 810px. Make sure to clear out the default values for &#8220;top&#8221; and &#8220;left&#8221; while you&#8217;re at it. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-10.jpg" alt="screenshot" width="510"/></div>
<h3>Auto-Centering An Element</h3>
<p>Now, if you&#8217;re a web developer you already know exactly how to center this div: set the margins to auto. You can go in and do this manually or simply click on the little gear at the top right of the Inspector and go down to &#8220;Auto Center.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-11.jpg" alt="screenshot" width="510"/></div>
<h3>Adding a Shadow</h3>
<p>At this point you should have the basic frame for the site. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-12.jpg" alt="screenshot" width="510"/></div>
<p>Just for fun, I want to show off some of the Webkit CSS3 features built into Flex. If you click on &#8220;Webkit&#8221; in the inspector, you&#8217;ll see a handful of fun CSS properties: box-shadow, box-reflect, webkit transitions, etc. Unfortunately, there aren&#8217;t any Mozilla equivalents, but you can always drop those into the code manually.</p>
<p>To add a shadow to our container, just click on the property and adjust the settings. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-13.jpg" alt="screenshot" width="510"/></div>
<h2>Inline Styles?</h2>
<p>Keen observers have probably noticed by now that the styles we&#8217;ve been creating are set to &#8220;inline.&#8221; This is one of the quirks of the Flux workflow. For some strange and unknown reason, all of your styles are set to inline by default. It&#8217;s actually a bit easier to setup elements in Flux when they are set to inline so the Flux website recommends that you first set up an element the way you want it in the manner that we have above, then convert the styles into something that will appear in the external stylesheet. </p>
<p>Fear not, this is a quick and pain-free process. Select the object you want to convert, right-click on it and select the &#8220;Create Style with&#8230;&#8221; option. This will bring up the following dialog that will allow you to assign an ID or Class to the object.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-14.jpg" alt="screenshot" width="510"/></div>
<p>Doing this will create a little icon on the left with the ID we just applied. This area is basically an outline of our CSS file. Now when you want to change the properties of that container, you&#8217;ll double click on the icon here to launch the inspector.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-15.jpg" alt="screenshot" width="510"/></div>
<h2>Step 3: The Header</h2>
<p>The steps we just learned lay out the workflow for creating all the content on our page. To add the name of the company to our header, we create another Quick Div, but this time double click inside of it to type inside of it (this essentially creates a &#8220;p&#8221; tag). Once you type out what you want, you can style the text however you like. As you can see below, I&#8217;ve added settings for color, font-family, text-transform, text-align and font-size.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-16.jpg" alt="screenshot" width="510"/></div>
<p>Next, do the same thing for the text below the headline.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-17.jpg" alt="screenshot" width="510"/></div>
<p>That should give you a nice typographical header for your page. Remember to convert both of these elements to external styles just like we did before.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-18.jpg" alt="screenshot" width="510"/></div>
<h2>Step 4: The Image</h2>
<p>Now we&#8217;re ready to throw in our big image. I&#8217;ll use a photo that I shot myself but you can anything you like. </p>
<p>To begin, select the container and create a div that&#8217;s 700px wide and as tall as you need it. Then set the background of the div to your image and the background to no-repeat. With the image div selected, you can use the arrow keys to shuffle it up or down to move it into position, after all this is a WYSIWYG!</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-19.jpg" alt="screenshot" width="510"/></div>
<h2>Step 5: Finishing Off The Text</h2>
<p>At this point the tutorial would be quite redundant if we went into too much detail. There&#8217;s really not much left to do beyond creating a few more divs, filling them with text and styling them like we did above. I stayed with the Georgia font theme I had been using and just made my headline larger than the paragraph copy. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-20.jpg" alt="screenshot" width="510"/></div>
<p>One thing to note is that to create a link, you simply select an element or block of text and go to Edit>QuickLink. With that, the page should be all finished!</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-1.jpg" alt="screenshot" width="510"/></div>
<h2>What About The Code?</h2>
<p>If we want to look at and edit the code at any point, just hit Command-3 to bring up the code viewer.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fluxsite-21.jpg" alt="screenshot" width="510"/></div>
<p>Flux spits out nice clean code that fully integrates with the development process. You can do as much or as little as you want with the WYSIWYG interface and do the rest by hand. Since Flux uses only plain old HTML and CSS files, you can even work on the site in your favorite code editor as you build in Flux. The workflow is completely open so that if at any point you just want to do something the way you always have, you&#8217;re free to do so!</p>
<h2>What Else Does Flux Do?</h2>
<p>This tutorial hasn&#8217;t scratched the surface of what Flux can do. Here&#8217;s a few other features to get excited about:</p>
<ul>
<li>Built-in layout modules for fast prototyping</li>
<li>Live Browser View</li>
<li>JavaScript, PHP, and all that jazz</li>
<li>WordPress Theme Support</li>
<li>Reusable Code Snippets</li>
<li>History Palette</li>
<li>Widget palette &#8211; Create easy galleries and jQuery effects</li>
<li>HTML5 Support</li>
<li>Google Font API Support</li>
<li>Tons more that I don&#8217;t even know about yet!</li>
</ul>
<h2>Closing Thoughts</h2>
<p>I first used Flux a couple of versions ago (Flux is now in its third iteration), and loved the idea but wasn&#8217;t crazy about the execution. It felt a little buggy (all that is fixed now) and really didn&#8217;t seem that easy to just pick up and run with.</p>
<p>However, that encounter was quite brief and I&#8217;ve always wanted to go back and really give it a proper run through. I&#8217;ve played with Flux for the past two days and have to say that, once I took the time to figure out the proper workflow, working with Flux was a dream. It definitely takes a little while to figure out all the quirks but once you do they don&#8217;t eat up any time at all and feel quite natural.</p>
<p>At the very least, Flux is awesome for prototyping. Fans of designing in the browser instead of Photoshop will see most of their concerns addressed here as you are forced to design using actual CSS properties and positioning rather than Photoshop effects. My favorite part about the app is that it doesn&#8217;t corner you into using it through the whole process. There aren&#8217;t any Flux project files to worry about, only the files you would normally use to build a site. This means you can switch to a different app or even pass the project off to a colleague or client who neither needs Flux or need ever know you used it. </p>
<p>If you&#8217;re a developer who codes by hand that often dreams of a WYSIWYG that doesn&#8217;t suck and can actually plug into the way you currently work, I highly recommend that you give Flux a shot. It can be a little frustrating at first, but take the time to push through that and figure out how to really use the app properly and I&#8217;ll wager that you might just think it&#8217;s the best WYSIWYG you&#8217;ve ever used. </p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/html/how-to-build-a-website-with-flux-3-a-coders-wysiwyg/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>27 Utilities for Saving and Sharing Code Snippets</title>
		<link>http://designshack.net/articles/css/27-utilities-for-saving-and-sharing-code-snippets/</link>
		<comments>http://designshack.net/articles/css/27-utilities-for-saving-and-sharing-code-snippets/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:11:37 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=10877</guid>
		<description><![CDATA[You&#8217;ve got countless bits of HTML5, CSS3, JavaScript, and PHP rolling around in your head and on your hard drive that you are forced to try to recall each time you start a project. It&#8217;s time to get organized. This post will briefly point you to 27 great utilities that not only help you store [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve got countless bits of HTML5, CSS3, JavaScript, and PHP rolling around in your head and on your hard drive that you are forced to try to recall each time you start a project. It&#8217;s time to get organized.</p>
<p>This post will briefly point you to 27 great utilities that not only help you store your favorite snippets both locally and in the cloud, but also make sharing with others a breeze. Enjoy!</p>
<p><span id="more-10877"></span></p>
<h2>Full-Scale Storing and Sharing</h2>
<p>The sites below are a great way to build a personal code repository that you can access from anywhere and easily share with others. They&#8217;re also great sites to find helpful snippets in a number of languages.</p>
<p>I haven&#8217;t used them all in-depth but my preferred site is <a href="http://www.snipplr.com/">Snipplr</a>. I really like the interface, the huge library of snippets, the versioning options, etc. They&#8217;re definitely all worth checking out though.</p>
<h3><a href="http://www.snipplr.com/">Snipplr</a></h3>
<p>&#8220;With Snipplr you can keep all of your frequently used code snippets in one place that&#8217;s accessible from any computer. You can share your code with other visitors and use what they post, too. Did we mention that Snipplr works with TextMate? Yeah, we rock.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-2.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://codesnippets.joyent.com/">CodeSnippets</a></h3>
<p>&#8220;Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-5.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.bytemycode.com/">Home | byteMyCode</a></h3>
<p>&#8220;byteMyCode is a project designed to make the task of sharing source code easier. We have modeled a community around making it easy to find, share, revise, comment on, and rate code snippets.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-6.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://snippetsmania.com/">SnippetsMania</a></h3>
<p>&#8220;Organize and share your code snippets. Snippetsmania is a free accessible collection of code snippets. It currently supports 34 different programming languages. The database holds a total count of 99 code and programming snippets and examples.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-7.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://codesnipp.it/">codesnipp.it</a></h3>
<p>&#8220;codesnipp.it is a social site for developers to post their snippets, follow and share code with other devs and get coding help. &#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-8.jpg" alt="screenshot" width="510"/></div>
<h2>Paste and Share Quickly</h2>
<p>The apps below are similar to those we just looked at but place much more emphasis on fast code sharing as opposed to organized code storage. Most just require a copy and paste and you&#8217;re ready to go!</p>
<h3><a href="http://snipt.org/">Snipt.org</a></h3>
<p>Share source code on Twitter and the Web.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-1.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://pastie.org/">New &#8211; Pastie</a></h3>
<p>&#8220;Clean user interface with sensible defaults. Need to nickname, describe, set tab settings and more? You&#8217;ll have to look elsewhere. One text box, paste, done. Simple.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-3.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.smipple.net/">Smipple &#8211; Social Code Snippets</a></h3>
<p>&#8220;Smipple is a social service for saving, storing, organizing, and sharing snippets of code with your friends and coworkers. Make friends. Improve your coding skills. Earn bragging rights.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-4.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://gist.github.com/">Gist &#8211; GitHub</a></h3>
<p>&#8220;Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-9.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.copypastecode.com/">Copy Paste Code</a></h3>
<p>&#8220;Copy Paste Code allows you to publish your code with colored syntax for most popular programming languages out there. After publishing you can share your code to colleagues and friends, and they can debug and use your code snippets.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-10.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://codetidy.com/">CodeTidy</a></h3>
<p>A quick and easy, no-frills code sharing utility. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-11.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://ideone.com/">Ideone</a></h3>
<p>&#8220;Ideone is something more than a pastebin; it&#8217;s an online compiler and debugging tool which allows<br />
to compile and run code online in more than 40 programming languages.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-12.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://pastebin.com/">Pastebin</a></h3>
<p>One of the most popular tools of this kind, Pastebin supports a huge list of languages.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-13.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://mysticpaste.com/new">Mystic Paste</a></h3>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-14.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://pastesite.com/">PasteSite.Com &#8211; Easy Usable Pastebin</a></h3>
<p>&#8220;PasteSite.Com is a tool which allows you to submit a sample of code which can then be viewed with syntax highlighting from the website.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-15.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://slexy.org/">Slexy 2.0</a></h3>
<p>&#8220;Slexy.org is a powerful, slick, and sexy pastebin designed with the user in mind. Use Slexy.org to paste errors for debugging, show off your code or your tech specs, or share anything else with other Internet users worldwide.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-16.jpg" alt="screenshot" width="510"/></div>
<h2>Mac Applications</h2>
<p>In my search for online snippet sharing tools I came across a number of Mac applications that are great for building code libraries so I figured I&#8217;d toss them in as well. Check out jCodeCollector and Snippely first if you&#8217;re looking for a solid free option.</p>
<h3><a href="http://fuelcollective.com/snippet/">Snippet: $12.95</a></h3>
<p>&#8220;Easily create Snippets from selected text anywhere.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-17.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.snippetsapp.com/">Snippets: $39.95</a></h3>
<p>&#8220;Snippets is a powerful application for Mac OS X that stores the most valuable pieces of code you can reuse in different projects many times.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-18.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://code.google.com/p/snippely/">Snippely: Free</a></h3>
<p>&#8220;Snippely is a basic text and code organizational tool. Instead of storing bits of code, quick notes, and memos in text files all over your hard drive, this application will let you save and organize &#8220;snippets&#8221; in one convenient location. A snippet is a collection of one or more pieces of code and notes. Snippets are stored in groups for organization and quick retrieval.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-19.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.macupdate.com/info.php/id/27798/jcodecollector">jCodeCollector: Free</a></h3>
<p>&#8220;jCodeCollector is an application that helps you to manage your code snippets. Using jCodeCollector you can: store, tag and comment your snippets, find quickly the code you need.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-20.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.mcubedsw.com/software/codecollectorpro">Code Collector Pro:  €20</a></h3>
<p>&#8220;When you spend all day writing code, it is only natural to start having feelings of déjà vu. Didn&#8217;t you write that same few lines of code a few days ago, and again a few days before that? Why are you wasting time re-writing that code again and again? Code Collector Pro is the answer, giving you the ability to store snippets of code and retrieve them with a few keystrokes&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-21.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://myownapp.com/applications/mysnippets/mysnippets.html">MySnippets: $14.95</a></h3>
<p>&#8220;All of your snippets, the files you need, drafts, parts of a text, CSS templates and anything else you still need in order to deliver outstanding results: All of that is now just one single click, one single keystroke away. &#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-22.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://droplr.com/hello">Droplr: Free</a></h3>
<p>Unlike the apps above, Droplr is not the ideal place to store code snippets. However, among other things, it is a super easy way to share snippets of code. Just select some text and drag it to your menu bar. A URL will automatically be placed in your clipboard for you to paste in anywhere you want.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-23.jpg" alt="screenshot" width="510"/></div>
<h2>Text Expanders</h2>
<p>One special breed of snippet applications is those that allow you to type a few characters which then automatically expand into a larger chunk of text. I&#8217;ve recently started using TextEpander and it has completely revolutionized the way I work. Now I can&#8217;t imagine trying to code without it!</p>
<p>I&#8217;ve searched for hours in vain in an attempt to find a free text expanding utility, leave a comment if you know of one.</p>
<h3><a href="http://www.smileonmymac.com/TextExpander/">TextExpander: $34.95 (Mac)</a></h3>
<p>&#8220;TextExpander saves you countless keystrokes with customized abbreviations for your frequently-used text strings and images.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-24.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.ergonis.com/products/typinator/">Typinator: €19.99 (Mac)</a></h3>
<p>&#8220;Typinator boosts your productivity and eliminates errors by automating the process of inserting frequently used text and graphics and auto-correcting typing errors.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-25.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.nch.com.au/fastfox/index.html">FastFox: $34.99 (Windows &#038; Mac)</a></h3>
<p>&#8220;FastFox is an easy to use text expander that can create and store keyboard shortcuts that expand to an entire phrase, paragraph or document.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-26.jpg" alt="screenshot" width="510"/></div>
<h3><a href="http://www.gideonsoftworks.com/snippetmonkey.html">SnippetMonkey</a></h3>
<p>&#8220;Snippet Monkey saves you countless hours monkeying around by allowing you to create shortcuts for phrases you frequently type. We call the phrases snippets and Snippet Monkey allows you to create new snippets from the clipboard or via our easy to use snippet editor.&#8221;</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ds-snippets-27.jpg" alt="screenshot" width="510"/></div>
<h2>What Are Your Favorites?</h2>
<p>There are a lot of utilities here to choose from and I would love to hear your feedback on those that you&#8217;ve tried. For my own purposes I use TextExpander to quickly insert code, Snipplr to store random bits long-term, and Droplr to quickly share snippets. What combination will fits your workflow best?</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/css/27-utilities-for-saving-and-sharing-code-snippets/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Rapid Blueprint CSS Layout With Boks</title>
		<link>http://designshack.net/articles/css/rapid-blueprint-css-layout-with-boks/</link>
		<comments>http://designshack.net/articles/css/rapid-blueprint-css-layout-with-boks/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 23:50:36 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Layouts]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=10332</guid>
		<description><![CDATA[Today we&#8217;ll take a look at Boks, an awesome little tool that will help you spec out a basic site layout in no time flat. We&#8217;ll go through what it is and how you can use it to speed up your development as well as what the limitations and downsides are that you&#8217;ll want to [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><a href="http://www.blueprintcss.org/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-14.jpg" alt="screenshot" width="510"/></a></div>
<p>Today we&#8217;ll take a look at Boks, an awesome little tool that will help you spec out a basic site layout in no time flat. </p>
<p>We&#8217;ll go through what it is and how you can use it to speed up your development as well as what the limitations and downsides are that you&#8217;ll want to be aware of before you download the app.</p>
<p><span id="more-10332"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Introduction</h2>
<p>Grid systems are an interesting beast: you either love &#8216;em or hate &#8216;em. Personally, I can see both sides of the argument but in the end I don&#8217;t have too much against them granted that you customize them to your own purposes rather than leaving tons of untouched and/or non-semnatic code. </p>
<p>The real problem with grid systems is how complex they tend to be. I just finished up a tutorial over at <a href="http://sixrevisions.com/web_design/the-960-grid-system-made-easy/">Six Revisions</a> on using the 960 Grid System and the comments seemed to be unanimous in that most people just needed someone to explain how to use the system in plain, easy to understand terms. If you find yourself confused by grid systems, be sure to check out <a href="http://sixrevisions.com/web_design/the-960-grid-system-made-easy/">that article</a>.</p>
<p>As a follow up, I wanted to show you how to use a GUI to create to create really complex CSS and HTML code structures, based on the Blueprint CSS Framework, incredibly quickly. We&#8217;ll do this with an AIR application called <a href="http://toki-woki.net/p/Boks/">Boks</a>.</p>
<h2><a href="http://www.blueprintcss.org/">Blueprint</a></h2>
<div class="tutorialimage"><a href="http://www.blueprintcss.org/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-2.jpg" alt="screenshot" width="510"/></a></div>
<p>Just to brief you, <a href="http://www.blueprintcss.org/">Blueprint</a> is a free framework with tons of great features. These include: </p>
<ul>
<li>A CSS reset that eliminates the discrepancies across browsers.</li>
<li>A solid grid that can support the most complex of layouts.</li>
<li>Typography based on expert principles that predate the web.</li>
<li>Form styles for great looking user interfaces.</li>
<li>Print styles for making any webpage ready for paper.</li>
<li>Plugins for buttons, tabs and sprites.</li>
<li>Tools, editors, and templates for every step in your workflow.</li>
</ul>
<p>For my own use, Blueprint is a little too massive, which we&#8217;ll see later. However, tons of developers use it religiously and find it to be among the best frameworks out there. </p>
<p>Like it or not, this it what Boks uses to create code. If the Boks developers are reading this, I&#8217;d love to see an option to use the <a href="http://www.1kbgrid.com/">1KB CSS Grid</a> instead.</p>
<h2>What Is Boks?</h2>
<p>Enough introduction already, what the heck is this Boks thing? I honestly can&#8217;t remember how I found it originally but it was one of those situations where you download something, throw it into your applications folder and forget that it exists. I was recently purging my hard drive of such nonsense when I opened Boks for the first time and thought &#8220;Hey this is really neat!&#8221; </p>
<div class="tutorialimage"><a href="http://toki-woki.net/p/Boks/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-1.jpg" alt="screenshot" width="510"/></a></div>
<p>As I said before, <a href="http://toki-woki.net/p/Boks/">Boks</a> is an AIR application so it should function just fine using either Mac or PC. </p>
<p>What Boks does is provide an innovative visual way to create the basic structural markup for your site. I&#8217;ll stop right there to tell any WYSIWYG haters that I&#8217;m with you. <strong>If coding a site from scratch is like approaching an empty canvas, WYSISYGs always feel to me a bit like Paint By Number.<br />
</strong><br />
What I mean by this is that they&#8217;re generally far too structured and add all kinds of unnecessary confinement and complication. <strong>Boks is not one of these applications</strong>. In fact, it&#8217;s not even something that you would use to build an entire site. It merely helps you create the skeleton that you build your site upon.</p>
<h2>Getting Started</h2>
<p>After you grab the free download, open up Boks and you should see the interface shown below. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-3.jpg" alt="screenshot" width="510"/></div>
<p>This is where you will visually lay out your website&#8217;s structure. Doing this will be as easy as clicking and dragging where you want your columns to go. However, before you do anything else, click on the <strong>&#8220;Grid Settings&#8221;</strong> button. Here you&#8217;ll find lots of customization options for how Boks will build your page. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-4.jpg" alt="screenshot" width="510"/></div>
<p>Under the grid options seen above, you can set your <strong>page width</strong> along with the<strong> number of columns</strong> and how you want to divide up the gutters and columns. Already we see that Boks makes using a grid framework really flexible and much easier to customize than tearing apart the code piece by piece.  </p>
<p>In the image above you can see that I&#8217;ve set everything up to essentially work like the 12 column version of the 960 Grid System. This will give me 12 columns that are each 60 pixels wide with a gutter of 20 pixels. If you don&#8217;t agree, simply <strong>enter your own</strong> preferred configuration here. </p>
<h3>Other Settings</h3>
<p>Moving along to the next tab in the settings window, here you can set a custom baseline for the font-size as well as spec out any header items you need.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-5.jpg" alt="screenshot" width="510"/></div>
<p>The CSS and JavaScript tabs allow you to attach custom resources. These will be placed in their own folders or appended to the existing code. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-6.jpg" alt="screenshot" width="510"/></div>
<p>Finally, if you change anything at all in the preferences, <strong>be sure to make it the export settings</strong>. There are a number of important things here to hit on. First, set your page title and language. Then make sure you&#8217;re using the right DOCTYPE. The default is XHTML but as you can see in the screen below, HTML5 is supported so you&#8217;ll be able to use Boks for some time to come. </p>
<p>I highly recommend <strong>turning off</strong> the &#8220;Compress CSS&#8221; option. It&#8217;ll be much easier to sort through and customize your code if you do this. Otherwise everything will be all smashed together. This is great for file size but incredibly annoying to try to read. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-8.jpg" alt="screenshot" width="510"/></div>
<p>Finally, if it&#8217;s your first time using Boks, you might want to turn on the option to show the grid so you can see what&#8217;s going on. Obviously, when you start using this to create real sites, you&#8217;ll want to turn that option off.</p>
<h2>Creating the Page Layout</h2>
<p>Now that we&#8217;ve got all our settings squared away, it&#8217;s time to create the layout. To do this, simply <strong>click and drag on the grid preview</strong> to create a div. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-9.jpg" alt="screenshot" width="510"/></div>
<p>A rectangle will appear that automatically snaps to the grid structure you&#8217;ve created. You can<strong> create as many divs as you like</strong> by clicking and dragging to add more. To reposition a div, click on it once and use the arrow keys. Hold shift while using the arrow keys to resize a div. </p>
<h3>Adding Markup</h3>
<p>Boks contains plenty of features that allows you to really customize your layout just like you would if you were manually coding. You can ame the div, add a border, and preview and add any CSS classes.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-10.jpg" alt="screenshot" width="510"/></div>
<p>If you want to go that far, you can even start piling HTML content into a div. As you can see below, you simply type it in like you would in a code editor. </p>
<p>Don&#8217;t know what you want to stuff the layout with at this point? No problem, you can either leave it blank or use Bok&#8217;s built-in Lorem Ipsum generator to conger up some dummy text.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-11.jpg" alt="screenshot" width="510"/></div>
<h2>Go Nuts</h2>
<p>As you can see in the image below, Boks allows you to create layouts that are <strong>as complex as you need them to be</strong>. The layout below has a navigation area, a sidebar, a content area and a footer. The content area has multiple other divs nested inside and split up into separate columns.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-12.jpg" alt="screenshot" width="510"/></div>
<p>This literally took about thirty seconds and can therefore save you tons of upfront coding time in the initial phase of site construction. </p>
<h3>No Height?</h3>
<p>As I said before, Boks isn&#8217;t meant to create entire websites. The horizontal bars you see in the images above represent <strong>only the resulting width and hierarchy</strong> of the created divs. The height of each will expand dynamically as you add content, but any specific heights must be dealt with when you actually progress to coding the site. </p>
<h2>Exporting</h2>
<p>When you&#8217;re all finished dividing up your layout, hit the export button and choose a location for the files. The result will be an HTML file along with the CSS, JavaScript and other resources you opted to include. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/boks-13.jpg" alt="screenshot" width="510"/></div>
<p>The final product doesn&#8217;t look like much at this point, but considering it took only seconds and will solve many of your CSS layout headaches, that&#8217;s no small feat!</p>
<h2>The Downside</h2>
<p>The unfortunate part is of course the <strong>huge</strong> CSS file that results. If you&#8217;re used to using Blueprint, this won&#8217;t bother you in the least but it might drive everyone else nuts. </p>
<p>As I said before, it would be great to see a 1KB implementation of Boks that stripped out all this extra code. In the mean time, the CSS file is really clear and contains lots of comments. This makes it easy to go in and quickly delete any code that you don&#8217;t need. </p>
<p>If you&#8217;d like to continually use Boks to create your layouts but don&#8217;t want all this extra CSS, I recommend taking a few minutes to create your own custom CSS file that you can reuse again and again. To do this, simply look at the default CSS file and eliminate anything that doesn&#8217;t affect the grid layout. This includes text styles, field styles, reset code, etc. After doing this once, you can always drop this in as a replacement for the CSS file created by Boks.</p>
<p>In fact, if you&#8217;re clever enough, you might be able to right-click on the application and go to &#8220;Show Package Contents&#8221; to poke around at the default files used here and customize them to your liking (Mac only). </p>
<h2>Conclusion</h2>
<p>Boks is a neat little tool that helps you create the basic markup for your site utilizing a fully customizable version of the Blueprint framework&#8217;s column system. It is not meant to create full websites but rather save you time on the front end of your project that is taken up by creating various divs and applying the appropriate classes. </p>
<p>Unfortunately, since you&#8217;re pretty much stuck with using the Blueprint framework, Boks isn&#8217;t for everyone. Leave a comment below and let us know what you think of Blueprint and whether or not you&#8217;ll be using Boks on your next project. </p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/css/rapid-blueprint-css-layout-with-boks/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>52 Framework: The First Ever HTML5 and CSS3 Framework</title>
		<link>http://designshack.net/articles/css/52-framework-the-first-ever-html5-and-css3-framework/</link>
		<comments>http://designshack.net/articles/css/52-framework-the-first-ever-html5-and-css3-framework/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 18:53:08 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=9983</guid>
		<description><![CDATA[Today we&#8217;re going to look at a new project from the Enavu Network called 52 Framework. It claims to be the first framework built specifically for HTML5 and CSS3. Below we&#8217;ll look at some of the basic features and dig into the code to see what we can find. Like the article? Be sure to [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><a href="http://www.52framework.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/52framework-5.jpg" alt="screenshot" width="510"/></a></div>
<p class="lead">Today we&#8217;re going to look at a new project from the <a href="http://www.enavu.com/">Enavu Network</a> called 52 Framework. </p>
<p>It claims to be the first framework built specifically for HTML5 and CSS3. Below we&#8217;ll look at some of the basic features and dig into the code to see what we can find. </p>
<p><span id="more-9983"></span></p>
<p><em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Regarding Frameworks</h2>
<p>Frameworks are an interesting topic. Some developers absolutely swear by them and even go so far as to say that no web page should ever be started without one, other developers see them as unnecessary complications that add a lot of superfluous weight to what would otherwise be fairly simple code. </p>
<p>I&#8217;m personally somewhere in between. I definitely agree that many frameworks, if unaltered, contain a lot of fluff that could be trashed. However, I also find them to be quite useful and timesaving. </p>
<p>The key is customization. Every framework you&#8217;ll find online was created by someone with a different workflow than your own and even a different way of thinking about websites and their structure. This is one of the primary reasons frameworks are so loaded: so they can cater to everyone&#8217;s needs. Every little file and piece of code included in the download is not meant for every person, it all merely serves as a starting point for your own personal framework.</p>
<p>When you borrow someone else&#8217;s car, you don&#8217;t just hop in and drive. You adjust the driver&#8217;s seat and the mirrors to fit your specifications. In the same way, don&#8217;t expect to just grab a pre-fab framework and run with it. Step one should be to go through and filter out anything you&#8217;ll never need. Step two should be to add in missing elements that you&#8217;ll always need. And step three should be to tweak the things that you want but need to alter slightly for your own use. </p>
<p>As we tear in to the framework below, think about each part and how you would customize it to fit your own specific needs. </p>
<h2>The 52 Framework</h2>
<div class="tutorialimage"><a href="http://www.52framework.com/"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/52framework-1.jpg" alt="screenshot" width="510"/></a></div>
<p><a href="http://www.52framework.com/">The 52 Framework</a> is a new, and very much under construction, framework built specifically for utilizing HTML5 and CSS3 in a cross-browser, standards-compliant manner. </p>
<h3>Too Soon?</h3>
<p>HTML5 and CSS3 are still new technologies, isn&#8217;t it a little too soon to start creating frameworks for them? Absolutely not. Support for both of these new standards is increasing rapidly and being fueled by a huge number of developers that simply couldn&#8217;t wait to implement them. </p>
<p>Whether or not it&#8217;s time to start using HTML5 and CSS3 is another debate entirely, the idea here is that it&#8217;s the perfect time to begin building systems to facilitate their use in the near future. There will never be a time when web standards cease evolving and therefore create the perfect climate for creating frameworks. Instead of falling behind, tools like these should keep up with new technology and evolve with them. That way as developers decide that it is in fact time to begin implementing HTML5 and CSS3, the tools will already be in place for them to do so. </p>
<h2>The Download</h2>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/52framework-2.jpg" alt="screenshot" width="510"/></div>
<p>As you can see, the framework is quite small in file size, even with the included PSDs, which can obviously be removed on a per site basis. </p>
<p>The download consists of three CSS files, two HTML files, one JS file,  a JPG and two PSDs. We&#8217;ll take a look at the role each of these plays in the explanation below. </p>
<h2>The Demo File</h2>
<p>Once you download the framework, open up index.html. This is the heart of the entire framework and what I want to spend most of our time discussing. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/52framework-3.jpg" alt="screenshot" width="510"/></div>
<p>As you can see, the framework helps you out by setting up a number of the most common elements. Your header tags (h1, h2 and h3) are styled along with basic page typography, form elements are ready to go and have a bonus  custom button design, there&#8217;s a method in place for displaying code, and even a bunch of additional styles in place for different elements like strong, bold, italic, inserted text, big text, etc. </p>
<h2>The Code</h2>
<p>To get a much better look at what&#8217;s in the demo file, peer under the hood to see the code. We&#8217;ll analyze this piece by piece below. </p>
<h3>DOCTYPE</h3>
<p>The first thing you&#8217;ll see in the .html file is the new, beautifully simple HTML5 DocType.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span></pre></div></div>

<p>This is a must-have statement that tells browsers how to interpret your code. It&#8217;s nice and succinct and I greatly prefer it to previous, more complicated versions.</p>
<h3>JavaScript</h3>
<p>The next notable thing you&#8217;ll see is a link to an external JavaScript file.</p>

<div class="wp_syntax"><div 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;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;html5.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Don&#8217;t worry, you don&#8217;t need to understand a single line of JavaScript to use this framework. The included JS simply uses a couple of lines of code to create support for new elements in older browsers. It&#8217;s a neat trick that allows you to use a lot of the goodness of HTML5 without worrying about who you&#8217;re leaving behind. </p>
<h3>Semantics</h3>
<p>The next thing you should notice about this document is how the HTML is constructed. It uses the new semantic markup that you should already be learning to follow. Here&#8217;s an extremely simplified, stripped down version of the structure.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;header&gt;</span>
		<span style="color: #009900;">&lt;nav&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>nav&gt;</span> 
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span>      
&nbsp;
	<span style="color: #009900;">&lt;aside&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>aside&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;section&gt;</span>
		<span style="color: #009900;">&lt;article&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span>  
&nbsp;
		<span style="color: #009900;">&lt;article&gt;</span> 
&nbsp;
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">code</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">code</span>&gt;</span>
&nbsp;
			<span style="color: #009900;">&lt;article&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;footer&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></div></div>

<p>As you can see, a number of new HTML5 elements are being used here. The page is divided into header, nav, aside, section, article, code and footer areas. Using the framework, these elements will provide the basic structure for everything you create. Notice that a lot of the pieces that you would normally create divs for have native support in HTML5. </p>
<p>Using the 52 Framework will force you to create your pages using these new elements and is therefore a great way to jump into HTML5 when the time comes. </p>
<h3>Reset and Grid System</h3>
<p>There are three CSS files included in the framework: general, grid and reset. The reset file is pretty basic and is essentially a modified version of the popular Eric Meyer CSS reset. This version was created by <a href="http://richclarkdesign.com">Richard Clark</a>.</p>
<p>The grid CSS is there because, like any good framework, this one uses grids heavily.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/52framework-4.jpg" alt="screenshot" width="510"/></div>
<p> There&#8217;s definitely nothing groundbreaking here, it&#8217;s basically a 16 column 960 grid system exactly like you&#8217;re used to using in other frameworks. The available columns vary in width from 40px all the way up to 940px and each contain a left and right margin of 10px.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.col_1</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_2</span> <span style="color: #00AA00;">&#123;</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: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_3</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">160px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_4</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">220px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_5</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">280px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_6</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">340px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_7</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_8</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">460px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_9</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">520px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_10</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">580px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_11</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">640px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_12</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">700px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_13</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">760px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_14</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">820px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_15</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">880px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.col_16</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">940px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>General CSS</h3>
<p>The primary CSS contains a number of helpful styles to get you started. Everything in the HTML mentioned above has specific styles in place along with a number of other basic items like float clearing classes and block quotes. </p>
<p>One neat feature here is that you can set the selection color of a web page to override the browser default. This means that when you select a line of text, the highlight will be the color that you define.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:selection </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#525252</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Safari */</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">:</span><span style="color: #3333ff;">:-moz-selection </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#525252</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Firefox */</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>In the fieldset styles you&#8217;ll find some styles for creating those ever popular CSS3 rounded corners.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">&#123;</span> -moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
-webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Finally, in the embedded CSS contained in the HTML file, you&#8217;ll see some more CSS3 being applied to create shadows.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">header <span style="color: #6666ff;">.logo</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2.5em</span><span style="color: #00AA00;">;</span> 
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">52px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">28px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">700</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
filter<span style="color: #00AA00;">:</span> Shadow<span style="color: #00AA00;">&#40;</span>Color<span style="color: #00AA00;">=</span><span style="color: #cc00cc;">#666666</span><span style="color: #00AA00;">,</span> Direction<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">135</span><span style="color: #00AA00;">,</span> Strength<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>More to Come</h2>
<p>As I said above, the 52 Framework is definitely still in the early stages and will continue to grow and improve. For instance, the newest beta release has added support for canvas and video elements.  </p>
<p>I&#8217;d like to see the CSS for rounded corners and shadows pulled out of specific elements into general classes or more noticeable sample elements so you don&#8217;t have to go hunting for them in the code if you want to use them as a starter for your own styles. </p>
<p>Other than that, I think the framework is off to a strong start and I can really see myself building on it to create something that&#8217;s perfect for my own use. </p>
<h2>What Would You Change?</h2>
<p>Leave a comment below and tell us what you think of the 52 Framework. What do you like about it? What do you hate? The developers are looking for suggestions for features to add so be sure to list any that come to mind!</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/css/52-framework-the-first-ever-html5-and-css3-framework/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 847/1016 objects using disk: basic

Served from: designshack.net @ 2012-02-10 04:20:52 -->
