<?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>everything about web</title>
	<atom:link href="http://www.everythingaboutweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.everythingaboutweb.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 03:06:06 +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>Intro to HTML 5</title>
		<link>http://www.everythingaboutweb.com/build/intro-to-html-5/</link>
		<comments>http://www.everythingaboutweb.com/build/intro-to-html-5/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 03:06:06 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[build]]></category>
		<category><![CDATA[intermediate]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=425</guid>
		<description><![CDATA[HTML 5 Introduction Most of the web standards curriculum is based on the last stable version of HTML — HTML 4.01. The HTML 4.01 spec was completed in 1999, over 10 years ago as of the time of this writing! But unless you&#8217;ve been hiding under a rock for the [...]]]></description>
			<content:encoded><![CDATA[<h1>HTML 5</h1>
<h6>Introduction</h6>
<p>Most of the web standards curriculum is based on the last stable version of HTML — HTML 4.01. The HTML 4.01 spec was completed in 1999, over 10 years ago as of the time of this writing! But unless you&#8217;ve been hiding under a rock for the last year or so, you&#8217;ll be well aware that there is a new version of HTML in production — HTML5!</p>
<p>So why have we been teaching you HTML 4.01 in spite of this?</p>
<p>HTML5 is a really good thing for web developers and designers, because it:</p>
<ul>
<li>Is mostly backwards compatible with what&#8217;s already there —<strong> you don&#8217;t need to learn completely new languages to use HTML5</strong>. The new markup features work in the same way as the old ones (although the semantics of some elements have been changed and the new APIs are based on mostly the same JavaScript/DOM that developers have been programming in for years.</li>
<li><strong>Adds powerful new features to HTML</strong> that were previously only available on the Web using plugin technologies like Flash, or with complex JavaScript and hacks. Form validation and video are prime examples.</li>
<li><strong>Is better suited to writing dynamic applications</strong> than previous HTML versions (HTML was originally designed for creating static documents).</li>
</ul>
<h6>What does HTML5 mean to me?</h6>
<p>To start with, let&#8217;s answer that question you&#8217;ve had circling round your head since you started reading this article — why did we teach you most of the web standards curriculum using HTML 4.01, if HTML5 is on the horizon?</p>
<p>First of all, when the WSC was first published in 2008, HTML5 was a lot more in flux than it is now, and we didn&#8217;t want to teach you something that would likely be changed at a later date.</p>
<p>Second, and more importantly, HTML5 is backwards compatible — in practical terms, this means that all the stuff inside HTML 4.01 is also in HTML5. So by learning HTML 4.01, you are also learning a large chunk of HTML5.</p>
<p>Some parts of HTML5 are implemented in a stable enough fashion across browsers to be used safely even on a production site (as always, you will have to make a judgement call depending on your site&#8217;s target audience and features). Plus if a feature is not supported in certain browsers, you can work around this.</p>
<p>To give you a short concluding answer, <strong>HTML5 is the future of the Web</strong>, and a large part of your future as a web designer or developer. I&#8217;d recommend that you start learning HTML5 as soon as you are ready — many of the new features will make your existing work a lot easier, and it will future proof your knowledge.</p>
<h5>HTML5 features</h5>
<p>HTML5 contains many new features to make HTML much more powerful and suitable for building Web applications. In the list below I&#8217;ve summarized the main ones you really should know about.</p>
<p>Some of the features listed below are NOT actually part of the HTML5 spec itself, but are defined in closely related specs, therefore they are still valid parts of the new movement towards modern web applications, and useful for you to know about.</p>
<p><strong>New semantic elements</strong>: As you will already know, semantics are very important in HTML — we should always use the appropriate element for the job. In HTML 4.01 we have a problem — yes, there are many elements for defining specific means such as tables, lists, headings, etc., but there are also many common web page features that have no element to define them. Think of site headers, footers, navigation menus, etc. — up until now we have defined these using &lt;div id=&#8221;xxx&#8221;&gt;&lt;/div&gt;, which we can understand, but machines can&#8217;t, plus different web developers will use different IDs and classes. Fortunately, HTML5 comes with new semantic elements such as &lt;nav&gt;, &lt;header&gt;, &lt;footer&gt; and &lt;article&gt;.</p>
<p><strong>New form features</strong>: HTML 4.01 already allows us to create usable, accessible web forms, but some common form features are more fiddly than they should be, and require hacking to implement. HTML5 provides a standardized, simple way to implement features such as date pickers, sliders and client-side validation.</p>
<p><strong>Native video and audio:</strong> For years, video and audio on the Web has been done using Flash, generally speaking. In fact, the reason Flash became so popular around the dawn of the 21st century is because open standards failed to provide a cross-browser compatible mechanism for implementing such things, with different browsers implementing different competing ways of doing the same thing (eg &lt;object&gt; and &lt;embed&gt;) and thereby making the whole process really complicated. Flash provided a high quality, easy way of making video work cross-browser.</p>
<p>HTML5 includes &lt;video&gt; and &lt;audio&gt; elements for implementing native video and audio players really easily with nothing but open standards, and it also includes an API to allow you to easily implement custom player controls.</p>
<p><strong>Canvas drawing API:</strong> The &lt;canvas&gt; element and associated API allows you to define an area of the page to draw on, and use JavaScript commands to draw lines, shapes and text, import and manipulate graphics and video, export in different image formats, and a whole lot more.</p>
<p><strong>Geolocation:</strong> The Geolocation spec (again, not a part of the HTML5 spec) defines an API that allows a web application to easily access any location data that has been made available, for example by a device&#8217;s GPS capabilities. This allows you to add all kinds of useful location-aware features to your applications, for example highlighting content that is more relevant to your location.</p>
<h5>Introducing HTML5 structural elements</h5>
<p>HTML4 already has a lot of semantic elements to allow you to clearly define the different features of a web page, like forms, lists, paragraphs, tables, etc. However, it does have its shortcomings. We still rely heavily on &lt;div&gt; and &lt;span&gt; elements with different id and class attributes to define various other features, such as navigation menus, headers, footers, main content, alert boxes, sidebars, etc. Something like &lt;div id=&#8221;header&#8221;&gt; works in terms of developers and designers knowing what it is for, and being able to use CSS and JavaScript to apply custom styles and behaviour to make it understandable to end users.</p>
<p>But it could be so much better. There are still problems with this kind of set up:</p>
<ul>
<li>Humans can tell the different content apart, but machines can&#8217;t — the browser doesn&#8217;t see the different divs as header, footer, etc. It sees them as different divs. Wouldn&#8217;t it be more useful if browsers and screen readers were able to explicitly identify say, the navigation menu so a visually impaired user could find it more easily, or the different news items on a bunch of blogs so they could be easily syndicated in an RSS feed without any extra programming?</li>
<li>Even if you do use extra code to solve some of these problems, you can still only do it reliably for your web sites, as different web developers will use different class and ID names, especially when you consider the international audience — different web developers in different countries will use different languages to write their class and id names.</li>
</ul>
<p>It therefore makes a lot of sense to define a consistent set of elements for everyone to use for these common structural blocks that appear on so many web sites. The new HTML5 elements we will cover are:</p>
<ul>
<li>&lt;header&gt;: Used to contain the header of a site.</li>
<li>&lt;footer&gt;: Contains the footer of a site.</li>
<li>&lt;nav&gt;: Contains the navigation functionality for the page.</li>
<li>&lt;article&gt;: Contains a standalone piece of content that would make sense if syndicated as an RSS item, for example a news item.</li>
<li>&lt;section&gt;: Used to either group different articles into different purposes or subjects, or to define the different sections of a single article.</li>
<li>&lt;time&gt;: Used for for marking up times and dates.</li>
<li>&lt;aside&gt;: Defines a block of content that is related to the main content around it, but not central to the flow of it.</li>
<li>&lt;hgroup&gt;: Used to wrap more than one heading if you only want it to count as a single heading in the page&#8217;s heading structure.</li>
<li>&lt;figure&gt; and &lt;figcaption&gt;: Used to encapsulate a figure as a single item, and contain a caption for the figure, respectively.</li>
</ul>
<h6>Why isn&#8217;t there a &lt;content&gt; element?</h6>
<p>While this may seem like a glaring omission, it really isn&#8217;t. The main content will be the top level block of content that isn&#8217;t the &lt;header&gt;, &lt;nav&gt; or &lt;footer&gt;, and depending on your particular circumstance, it might make more sense to mark the content up using an &lt;article&gt;, a &lt;section&gt;, or even a &lt;div&gt;.</p>
<h6>Presenting an example HTML5 page</h6>
<p>Some meta-differences<br />
The first thing is that the doctype is much simpler than in older versions of HTML:</p>
<pre>&lt;!DOCTYPE html&gt;</pre>
<p>the creators of HTML5 chose the shortest possible doctype string for this purpose — after all, why should you, the developer, be expected to remember a huge great long string containing multiple URLs, when in reality the doctype is only there to put the browser into standards mode (as opposed to quirks mode)?</p>
<p><strong>&lt;header&gt;</strong><br />
The document&#8217;s header looks like this:</p>
<pre>&lt;header&gt;
&lt;hgroup&gt;
&lt;h1&gt;A History of the World&lt;/h1&gt;
&lt;h2&gt;Introducing the Big Bang Theory&lt;/h2&gt;
&lt;/hgroup&gt;
&lt;/header&gt;</pre>
<p>The purpose of the &lt;header&gt; element is to wrap the section of content that forms the header of the page, usually containing a company logo/graphic, main page title, etc.</p>
<p><strong>&lt;hgroup&gt;</strong><br />
You&#8217;ll notice that in the above code, the only contents of my header are an &lt;hgroup&gt; element, wrapping two headings. What I want to do here is specify the document&#8217;s top level heading, plus a subtitle/tag line. I only want the top level heading to count in the document heading hierarchy, and that&#8217;s exactly what &lt;hgroup&gt; does — it causes a group of headings to only count as a single heading for the purposes of the document structure. you&#8217;ll find more out about how heading hierarchies work in HTML5, in the HTML5 outlines, and the HTML5 heading algorithm section, below.</p>
<p><strong>&lt;footer&gt;</strong><br />
You&#8217;ll see this code:</p>
<pre>&lt;footer&gt;
&lt;h3 id="copyright"&gt;Copyright and attribution&lt;/h3&gt;
&lt;/footer&gt;</pre>
<p>&lt;footer&gt; should be used to contain your site&#8217;s footer content — if you look at the bottom of a number of your favourite sites, you&#8217;ll see that footers are used to contain a variety of things, from copyright notices and contact details, to accessibility statements, licensing information and various other secondary links.<br />
Note: You are not restricted to one header and footer per page — you could have a page containing multiple articles, and have a header and footer per article.</p>
<p><strong>&lt;nav&gt;</strong><br />
You&#8217;ll come across this structure:</p>
<pre>&lt;nav&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Intro"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#History"&gt;History&lt;/a&gt;</pre>
<pre>&lt;!-- other navigation links... --&gt;
&lt;/ul&gt;
&lt;/nav&gt;</pre>
<p>The &lt;nav&gt; element is for marking up the navigation links or other constructs (eg a search form) that will take you to different pages of the current site, or different areas of the current page. Other links, such as sponsored links, do not count. You can of course include headings and other structuring elements inside the &lt;nav&gt;, but it&#8217;s not compulsory.</p>
<p><strong>&lt;aside&gt;</strong><br />
We have the following:</p>
<p>&lt;aside&gt;<br />
&lt;table&gt;</p>
<p>&lt;!&#8211; lots of quick facts inside here &#8211;&gt;</p>
<p>&lt;/table&gt;<br />
&lt;/aside&gt;</p>
<p>The &lt;aside&gt; element is for marking up pieces of content that are related to the main content, but don&#8217;t fit directly into the main flow. For example we can have a bunch of quick fire facts and statistics about the company, which wouldn&#8217;t work so well shoehorned into the main content. Other suitable condidates for &lt;aside&gt; elements include lists of links to external related content, background information, pull quotes, and sidebars.</p>
<p><strong>&lt;figure&gt; and &lt;figcaption&gt;</strong><br />
The dynamic duo of &lt;figure&gt; and &lt;figcaption&gt; have been created to solve a very specific set of problems. For a start, doesn&#8217;t it always feel a bit semantically dubious and unclean to mark up an image and its caption as two paragraphs, or a definition list pair, or something else? And second, what do you do when you want a figure to consist of an image, or two images, or two images and some text? &lt;figure&gt; is on hand to wrap around all the content you want to comprise a single figure, whether it is text, images, SVG, videos, or whatever. &lt;figcaption&gt; is then nested inside the &lt;figure&gt; element, and contains the descriptive caption for that figure.</p>
<pre>&lt;figure&gt;
&lt;img src="pwei.png" alt="Old poppies logo" /&gt;
&lt;figcaption&gt;
The old poppies logo, circa 1987.&lt;br /&gt; &lt;a href="http://www.flickr.com/photos/bobcatrock/317261648/"&gt;
Original picture on Flickr&lt;/a&gt;, taken by bobcatrock.
&lt;/figcaption&gt;

&lt;/figure&gt;</pre>
<p><strong>&lt;time&gt;</strong><br />
The &lt;time&gt; element allows you to define an unambiguous date and time value that is both human and machine readable. For example:</p>
<pre>&lt;time datetime="1989-03-13"&gt;1989&lt;/time&gt;</pre>
<p>The text in between the opening and closing tags can be anything you want, as appropriate for the people reading your site. If you wanted, you could also put it like this:</p>
<pre>&lt;time datetime="1989-03-13"&gt;13th March 1989&lt;/time&gt;
&lt;time datetime="1989-03-13"&gt;March 13 1989&lt;/time&gt;
&lt;time datetime="1989-03-13"&gt;My nineteenth birthday&lt;/time&gt;</pre>
<p>Conversely, the date inside the datetime attribute is an ISO standard (see W3C Tip: Use international date format (ISO) for more information) machine readable date, so you get the best of both worlds. You can also add a time onto the end of the ISO standard, like so:<br />
&lt;time datetime=&#8221;1989-03-13T13:00&#8243;&gt;One o&#8217;clock in the afternoon, on the 13th of March 1989&lt;/time&gt;<br />
You can also add a timezone adjustment, so for example to make the last example pacific standard time, you would do this:</p>
<pre>&lt;time datetime="1989-03-13T13:00Z-08:00"&gt;One o'clock in the afternoon, on the 13th of March 1989&lt;/time&gt;</pre>
<p><strong>&lt;article&gt; and &lt;section&gt;</strong><br />
Now we turn our attentions to probably the two most misunderstood elements in HTML5 — &lt;article&gt; and &lt;section&gt;. When you first meet them, the difference might appear unclear, but it really isn&#8217;t so bad.</p>
<p>Basically, the &lt;article&gt; element is for standalone pieces of content that would make sense outside the context of the current page, and could be syndicated nicely. Such pieces of content include blog posts, a video and it&#8217;s transcript, a news story, or a single part of a serial story.</p>
<p>The &lt;section&gt; element, on the other hand is for breaking the content of a page into different functions or subjects areas, or breaking an article or story up into different sections. So for example:</p>
<pre>&lt;article&gt;
&lt;section id="Intro"&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;/section&gt;</pre>
<pre>&lt;section id="History"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;/section&gt;</pre>
<pre>&lt;section id="Discography"&gt;
&lt;h2&gt;Discography&lt;/h2&gt;
&lt;/section&gt;
&lt;/article&gt;</pre>
<p>But you could also have a structure like this:</p>
<pre>&lt;section id="rock"&gt;
&lt;h2&gt;Rock bands&lt;/h2&gt;
&lt;!-- multiple article elements could go in here --&gt;
&lt;/section&gt;</pre>
<pre>&lt;section id="jazz"&gt;
&lt;h2&gt;Jazz bands&lt;/h2&gt;
&lt;!-- multiple article elements could go in here --&gt;
&lt;/section&gt;</pre>
<pre>&lt;section id="hip-hop"&gt;
&lt;h2&gt;Hip hop bands&lt;/h2&gt;
&lt;!-- multiple article elements could go in here --&gt;
&lt;/section&gt;</pre>
<h6>Where does that leave &lt;div&gt;?</h6>
<p>So, with all these great new elements to use on our pages, the days of the humble &lt;div&gt; are numbered, surely? NO. In fact, the &lt;div&gt; still has a perfectly valid use. You should use it when there is no other more suitable element available for grouping an area of content, which will often be when you are purely using an element to group content together for styling/visual purposes. For example:</p>
<pre>#wrapper {
background-color: #ffffff;
width: 800px;
margin: 0 auto;
}</pre>
<p><strong>&lt;mark&gt;</strong><br />
The &lt;mark&gt; element is for highlighting terms of current relevance, or highlighting parts of content that you just want to draw attention to, but not change the semantic meaning of. It&#8217;s like when you are going through a printed article and highlighting lines important to you with a highlighter pen. So for example, you might want to use this element to markup lines in a wiki that need to be given editorial attention, or to highlight instances of a search term that the user has just searched for on a page, and then give them appropriate styling in your CSS.</p>
<h6>How to get it working in older browsers</h6>
<p>Older browsers: always the bane of our very existence when trying to get to grips with using shiny new toys on the Web! In fact, the problem here is all browsers &#8211; no browsers currently recognise and support these new HTML5 structural elements, as such. But never fear, you can still get them working across browsers today with the minimum of effort.</p>
<p>First of all, if you put an unknown element into a web page, by default the browser will just treat it like a &lt;span&gt;, ie, an anonymous inline element. Most of the HTML5 elements we have looked at in this article are supposed to behave like block elements, therefore the easiest way to make them behave properly in older browsers is by setting them to display:block; in your CSS:</p>
<pre>article, section, aside, hgroup, nav, header, footer, figure, figcaption {
display: block;
}</pre>
<p>This solves all your problems for all browsers except one. Have a guess which one? &#8230; Yup, amazing isn&#8217;t it, that IE should prove to be trickier than the other browsers, and refuse to style elements it doesn&#8217;t recognise? The fix for IE is illogical, but fortunately pretty simple. For each HTML5 element you are using, you need to insert a line of JavaScript into the head of your document, like so:</p>
<pre>&lt;script&gt;
document.createElement('article');
document.createElement('section');
document.createElement('aside');
document.createElement('hgroup');
document.createElement('nav');
document.createElement('header');
document.createElement('footer');
document.createElement('figure');
document.createElement('figcaption');
&lt;/script&gt;</pre>
<p>IE will now magically apply styles to those elements. It is a pain having to use JavaScript to make your CSS work, but hey, at least we have a way forward? Why does this work exactly? no-one I&#8217;ve talked to actually knows. There is also a problem with these styles STILL not being carried through to the printer when you try to print HTML5 documents from IE.</p>
<p><code><sup>Above material from Dev.Opera. <a href="http://dev.opera.com/articles/view/get-familiar-with-html5/" target="_blank">Get familiar with HTML5!</a> and <a href="http://dev.opera.com/articles/view/new-structural-elements-in-html5/" target="_blank">New structural elements in HTML5</a> By Chris Mills</sup></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/build/intro-to-html-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Optimization</title>
		<link>http://www.everythingaboutweb.com/beginner/image-optimization/</link>
		<comments>http://www.everythingaboutweb.com/beginner/image-optimization/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 02:22:45 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=414</guid>
		<description><![CDATA[Image Optimization GIF format A compressed file format for indexed images. It uses run-length encoding, which compresses a series of pixels of the same value (in the horizontal direction) as a single entry (e.g. 30 pixels of red), which saves space over specifying each pixel. This means that large blocks of [...]]]></description>
			<content:encoded><![CDATA[<h5>Image Optimization</h5>
<h5><strong>GIF format</strong></h5>
<p>A compressed file format for indexed images. It uses <strong>run-length encoding</strong>, which compresses a series of pixels of the same value (in the horizontal direction) as a single entry (e.g. 30 pixels of red), which saves space over specifying each pixel. This means that large blocks of a single color compress very well. It also means that dithering (which reduces the runs of the same pixels) usually makes the image compress poorly.</p>
<ul>
<li><strong>Best for -</strong><strong> Graphic images</strong> with large areas of a single color, images with transparency, images with sharp edges, images with few colors.</li>
<li>Transparency &#8211; Defines one color to be transparent</li>
<li>Animations &#8211; Format supports multi-frame animations</li>
<li>Interlacing &#8211; A way to encode the image so that when a small amount of the image has been downloaded, it can be displayed in rough form. The image becomes progressively more clear until the whole image is downloaded.</li>
</ul>
<h6><strong>JPEG format</strong></h6>
<p>A &#8220;lossy&#8221; compressed file format for RGB images. Among other things, it eliminates hard edges to achieve compression. The loss of quality in the image is controlled by the quality setting when you save a JPEG image. The lower the number, the worse the quality.</p>
<ul>
<li><strong>Best for &#8211; Photographic images</strong>, complex images, images with soft edges</li>
<li>No transparency or animation</li>
<li>Progressive &#8211; A format similar to interlacing for GIFs that displays the image with increasing quality as it downloads. The progressive format is not supported by some older browsers.</li>
</ul>
<h6><strong>PNG format</strong></h6>
<p>A relatively new format that combines the best of GIF and JPEG. It supports both Indexed images and RGB images. It also supports a 256 color alpha channel for transparency. Not fully supported by older browsers.</p>
<p><strong>About the PNG‑8 format</strong></p>
<div>
<p>The PNG‑8 format uses 8‑bit color. Like the GIF format, PNG‑8 efficiently compresses areas of solid color while preserving sharp detail like those in line art, logos, or type.</p>
<p>The PNG‑8 format uses more advanced compression schemes than GIF does, and a PNG‑8 file can be 10% to 30% smaller than a GIF file of the same image, depending on the image’s color patterns. Although PNG‑8 compression is lossless, optimizing an original 24‑bit image as an 8‑bit PNG file can subtract colors from the image.</p>
<p>Note: With certain images, especially those with simple patterns and few colors, GIF compression can create a smaller file than PNG‑8 compression. View optimized images in GIF and PNG‑8 format to compare file size.</p>
<p>As with the GIF format, you can choose the number of colors in an image and control how colors dither in a browser. The PNG‑8 format supports background transparency and background matting, by which you blend the edges of the image with a web page background color.</p>
<p><img src="http://help.adobe.com/en_US/PhotoshopElements/7.0_Win/images/we_04.png" alt="" /><br />
PNG‑8 with 256 colors and no dither (left), and PNG‑8 with 16 colors and dithering (right)</p>
<p><strong>About the PNG‑24 format. </strong>The PNG‑24 format supports 24‑bit color. Like the JPEG format, PNG‑24 preserves the subtle variations in brightness and hue found in photographs. Like the GIF and PNG‑8 formats, PNG‑24 preserves sharp details like those in line art, logos, or type.</p>
<p>The PNG‑24 format uses the same lossless compression method as the PNG‑8 format. For that reason, PNG‑24 files are usually larger than JPEG files of the same image. You may want to avoid PNG‑24 format when you are distributing your image to a wide audience.</p>
<p>In addition to supporting background transparency and background matting, the PNG‑24 format supports multilevel transparency. You can have up to 256 degrees of transparency from opaque to completely transparent, so you can blend the edges of an image smoothly with any background color. However, not all browsers support multilevel transparency.</p>
</div>
<p><a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics" target="_blank">More information about the PNG format can be found here.</a></p>
<h5><strong>Image optimization using Photoshop<br />
</strong></h5>
<p>Download and extract <a href="http://www.everythingaboutweb.com/classes/downloads/compression_test.zip" target="_blank">compression_test.zip</a>.</p>
<p>The primary goal in creating graphics for the web is to maintain high image quality, while creating files that are as small as possible. This is always a compromise, and requires a subjective judgement by the designer. The best approach is to experiment with different image settings to discover a good compromise appropriate for the image and web page.</p>
<h5><strong>GIFs</strong></h5>
<p>To make a GIF, do the following to an RGB image in Photoshop:</p>
<ul>
<li><img src="http://www.jamiecavanaugh.com/classes/images/photoshop_web_dialog_gif.gif" alt="web settings - gif" align="right" border="0" />Show and hide any layers to get the image you need</li>
<li>Determine the color of the web page background that the image will be displayed against</li>
<li>Select FILE&gt;SAVE FOR WEB&#8230;</li>
<li>Notice that the image is displayed in its compressed format. And at the bottom left of the screen, the size of the compressed image is shown. Keep track of both of these as you adjust the various settings. <strong>Keep in mind that, in general, the total size of a web page including all of its images should be less than 100K</strong>.</li>
<li>Select GIF 32 No Dither from the Settings pull down. This will provide a good starting point for your settings.</li>
<li>Select PERCEPTUAL, SELECTIVE, ADAPTIVE, OR WEB for the palette selection method. <strong>SELECTIVE is the default and will usually provide good results</strong>. Following are Photoshop&#8217;s definition of these methods, quoted from Adobe Photoshop Help:<br />
<strong>Perceptual </strong>- Creates a custom color table by giving priority to colors for which the human eye has greater sensitivity.<br />
<strong>Selective </strong>- Creates a color table similar to the Perceptual color table, but favoring broad areas of color and the preservation of Web colors. This color table usually produces images with the greatest color integrity. Selective is the default option.<br />
<strong>Adaptive</strong> - Creates a custom color table by sampling colors from the spectrum appearing most commonly in the image. For example, an image with only the colors green and blue produces a color table made primarily of greens and blues. Most images concentrate colors in particular areas of the spectrum.<br />
<strong>Web</strong> - Uses the standard 216-color color table common to the Windows and Mac OS 8-bit (256-color) palettes. This option ensures that no browser dither is applied to colors when the image is displayed using 8-bit color. (This palette is also called the Web-safe palette.) Using the Web palette can create larger files, and is recommended only when avoiding browser dither is a high priority.</li>
<li>Select NO DITHER. This will produce the smallest files, while the other Dither options may improve the image quality. If Dither is needed, you may want to consider JPEG for the image format.</li>
<li>Select the smallest number of colors that produces an acceptable looking image. You can reduce the color information if necessary by selecting the &#8220;color&#8221; pull down menu and with the right arrow reducing the color to 16, 8, 4 or perhaps even 2.</li>
<li>If you want the image to display while downloading,select the INTERLACED checkbox.</li>
</ul>
<p>Transparency in GIFs allows you to see through parts of the image to the background of the web page. Photoshop creates transparency in GIFs by using the mask transparency in the Photoshop file.</p>
<ul>
<li>Create the transparency in your photoshop file, and set your layers so that you can see the checkerboard transparency in the file before you select SAVE FOR WEB</li>
<li>If you have created a mask for transparency, and want the background of the web page to show through the mask area, checkthe TRANSPARENCY box in the SAVE FOR WEB palette on the right side of the screen.</li>
<li>Select a MATTE color. This color selection affects the color of the anti-aliasing fringe used at the boundary between the image and the transparent areas. E.g. if your image will be displayed on a white web page, select white as the MATTE color to make a clean, anti-aliased edge for the image.</li>
</ul>
<h5><strong>JPEGs</strong></h5>
<p>To make a JPEG, do the following to an RGB image in Photoshop:</p>
<ul>
<li><img src="http://www.jamiecavanaugh.com/classes/images/photoshop_web_dialog_jpeg.gif" alt="web settings - jpeg" align="right" border="0" />Show and hide any layers to get the image you need</li>
<li>Select FILE&gt;SAVE FOR WEB&#8230;</li>
<li>Notice that the image is displayed in its compressed format. And at the bottom left of the screen, the size of the compressed image is shown. Keep track of both of these as you adjust the various settings. Keep in mind that the total size of a web page including all of its images should be less than 100K.</li>
<li>Select JPEG Medium from the Settings pull down. This will provide a good starting point for your settings.</li>
<li>Check the OPTIMIZED checkbox. This makes the file size smaller, and is compatible with almost all browsers.</li>
<li>Experiment with the QUALITY setting while checking the Optimized image for JPEG artifacts and looking at the resulting file size. Usually a setting between 40 &#8211; 60 works well. Choose the lowest quality setting acceptable so the file is the smallest.</li>
<li>If you want the image to display while downloading, select the PROGRESSIVE checkbox.</li>
</ul>
<p><strong>Transparency is not available in JPEG images</strong>. But the MATTE feature described for GIFs can be used in JPEGS. If the photoshop image has transparency, the matte color you choose in SAVE FOR WEB will change the transparent areas of the image to that color. This is useful if you need to put an image against a particular color on a web page.</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/image-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Basic Tags</title>
		<link>http://www.everythingaboutweb.com/beginner/html-basic-tags/</link>
		<comments>http://www.everythingaboutweb.com/beginner/html-basic-tags/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:46:37 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=411</guid>
		<description><![CDATA[HTML  – Basic Tags For the HTML tags below, please be sure you understand all tags outlined in the notes below.  Remember, if you have any questions on how to use the tag, please take a look at the example located here: HTML Example directory Also, note the name of each [...]]]></description>
			<content:encoded><![CDATA[<h5>HTML  – Basic Tags</h5>
<p>For the HTML tags below, please be sure you understand all tags outlined in the notes below.  Remember, if you have any questions on how to use the tag, please take a look at the example located here:<strong> </strong><strong><a href="http://www.jamiecavanaugh.com/classes/html_examples/" target="_blank"><strong>HTML Example directory</strong></a></strong></p>
<p><strong>Also, note the name of each tag is hyperlinked and links to an example page. </strong>(Click on “background color” below to see example). If you view the source of the example page, you can see exactly how the page is coded.<strong> </strong></p>
<p><strong>1. </strong><strong><a href="http://www.jamiecavanaugh.com/classes/html_examples/02_bodybgcolor.htm" target="_blank">background color</a></strong></p>
<pre>body { background-color: #000000;}</pre>
<p><strong><strong>2, <a href="http://www.jamiecavanaugh.com/classes/html_examples/03_bodybackground.htm" target="_blank">background image</a></strong></strong><em><br />
</em></p>
<pre>body { background-image:url("images/an_image.gif"); }</pre>
<p><strong>3. <a href="http://www.jamiecavanaugh.com/classes/html_examples/04_heading.htm" target="_blank">Heading styles</a></strong></p>
<pre> &lt;h1&gt;The biggest heading&lt;/h1&gt;
&lt;h2&gt;The second biggest heading&lt;/h2&gt;
&lt;h3&gt;The third biggest heading&lt;/h3&gt;
&lt;h4&gt;The fourth biggest heading&lt;/h4&gt;
&lt;h5&gt;The fifth biggest heading&lt;/h5&gt;
&lt;h6&gt;The sixth biggest heading&lt;/h6&gt;</pre>
<p><strong>4. <a href="http://www.jamiecavanaugh.com/classes/html_examples/05_br_vs_p.htm" target="_blank">Line break</a><br />
</strong></p>
<pre>some text using a br with a line break at the end&lt;br /&gt;</pre>
<p><strong>5. <a href="http://www.jamiecavanaugh.com/classes/html_examples/05_br_vs_p.htm" target="_blank">Paragraph</a></strong></p>
<pre> &lt;p&gt;some text in a paragraph, always has a blank line after it&lt;/p&gt;</pre>
<p><strong>6. <a href="http://www.jamiecavanaugh.com/classes/html_examples/06_bold_italic.htm" target="_blank">Bold and italic</a></strong></p>
<pre>&lt;strong&gt;Some Bold Text&lt;/strong&gt; OR &lt;em&gt;Some Italic Text&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Some Bold Text AND &lt;em&gt;some bold and Italic text&lt;/em&gt;&lt;/strong&gt;</pre>
<p>How would you use html markup to produce this sentence (bold &amp; italic, then italic)?</p>
<p><strong>7. <a href="http://www.jamiecavanaugh.com/classes/html_examples/07_hr.htm" target="_blank">Horizontal rule</a><br />
</strong></p>
<pre>&lt;hr /&gt;

&lt;hr size=”20″ /&gt;
&lt;hr width=”100″ align=”left” /&gt;
&lt;hr width=”50%” /&gt;</pre>
<p><strong>8. <a href="http://www.jamiecavanaugh.com/classes/html_examples/08_image.htm" target="_blank">Image</a></strong></p>
<pre>&lt;img src=”images/an_image.gif” width=”200″ height=”100″ alt=”An image to be displayed” /&gt;</pre>
<p><strong>9. <a href="http://www.jamiecavanaugh.com/classes/html_examples/09_links.htm" target="_blank">Links</a></strong><br />
A link to another web site</p>
<pre>&lt;a href=”http://www.nytimes.com/”&gt;Link to the New York Times&lt;/a&gt;</pre>
<p>A link to a page within the website</p>
<pre>&lt;a href=”about.html”&gt;About &lt;/a&gt;</pre>
<p>A link that sends an email. </p>
<pre>&lt;a href=”mailto:jane@jane.com”&gt;Email Jane&lt;/a&gt;</pre>
<p>The next two tags enable you to create a link to a different location on the current web page. When the user clicks on the link, the browser will scroll to the new position – assuming that the link is far enough away to need a scroll. The “href” version is the link and must include the “#”, the “name” version is the location on the page to scroll to and must NOT include the “#”. NOTE: You must have some text between the &lt;a name&gt; tag and the &lt;/a&gt; tag, or the link won’t work in Explorer. If you don’t want anything to so in the name tag, use the non-breaking space HTML code:</p>
<pre>&lt;a href=”#lowerpoint”&gt;Link to a location lower on this page&lt;/a&gt;
&lt;a name=”lowerpoint”&gt;Some text lower on the same page&lt;/a&gt;</pre>
<p><strong>10. <a href="http://www.jamiecavanaugh.com/classes/html_examples/11_font.htm" target="_blank">Font<br />
</a></strong></p>
<pre>body { font-family: Arial, Verdana, sans-serif; }</pre>
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><strong>PC</strong></td>
<td width="100"><strong>Mac</strong></td>
</tr>
<tr>
<td width="100">Arial</td>
<td width="100">Helvetica</td>
</tr>
<tr>
<td width="100">Times New Roman</td>
<td width="100">Times</td>
</tr>
<tr>
<td width="100">Courier New</td>
<td width="100">Courier</td>
</tr>
<tr>
<td width="100">Verdana</td>
<td width="100">Verdana</td>
</tr>
<tr>
<td width="100">Trebuchet</td>
<td width="100">Trebuchet</td>
</tr>
<tr>
<td width="100">Symbol</td>
<td width="100">Symbol</td>
</tr>
</table>
<p><strong>11. <a href="http://www.jamiecavanaugh.com/classes/html_examples/12_center_blockquote.htm" target="_blank">Indenting a paragraph</a></strong>, creates a paragraph and adds margin on left and right</p>
<pre>&lt;blockquote&gt;some indented text&lt;/blockquote&gt;</pre>
<p><strong>12. <a href="http://www.jamiecavanaugh.com/classes/html_examples/13_lists_htm.htm" target="_blank">Bulleted list</a></strong></p>
<pre>&lt;ul&gt;
&lt;li&gt;this is item 1 in an un-ordered list&lt;/li&gt;
&lt;li&gt;this is item 2&lt;/li&gt;
&lt;li&gt;this is item 3&lt;/li&gt;
&lt;li&gt;this is item 4&lt;/li&gt;
&lt;/ul&gt;</pre>
<p><strong>13. <a href="http://www.jamiecavanaugh.com/classes/html_examples/13_lists_htm.htm" target="_blank">Numbered list</a></strong>, types: numbered=no type, upper letters=”A”, lower letters=”a”, upper roman=”I”, lower roman=”i”</p>
<pre>&lt;ol type=”i”&gt;
&lt;li&gt;this is item 1 in an ordered list&lt;/li&gt;
&lt;li&gt;this is item 2 in an ordered list&lt;/li&gt;
&lt;li&gt;this is item 3 in an ordered list&lt;/li&gt;
&lt;li&gt;this is item 4 in an ordered list&lt;/li&gt;
&lt;/ol&gt;</pre>
<p><strong>14.</strong> <strong>Navigation</strong> using the list tag</p>
<pre>&lt;ul&gt;
&lt;li&gt;&lt;a href=”http://www.website.com/about.html/”&gt;About&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=”http://www.website.com/portfolio.html/”&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=”http://www.website.com/services.html/”&gt;Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=”http://www.website.com/contact.html/”&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p><strong>15.</strong> <strong><a href="http://www.jamiecavanaugh.com/classes/html_examples/14_pre.htm" target="_blank">Preformated text</a></strong> allows use of extra spaces and line breaks to format your text</p>
<pre>&lt;/pre&gt; 

alskf asldk
     aslfk asldkf asdlk

         als faslfk alskfa sldk

            aksdf alsfk laskf alsdkf

     alskf asldk aslkf
als kfasdlk

&lt;/pre&gt;</pre>
<p><strong>16.</strong> <strong><a href="http://www.jamiecavanaugh.com/classes/html_examples/15_flowing_text_images.htm" target="_blank">Flowing text</a></strong> around an image align=”left”, align=”right”, vspace=”pixels” margin above and below image, hspace=”pixels” margin left and right of image</p>
<pre>&lt;img src=”images/an_image.gif” width=”200″ height=”100″ align=”left” hspace=”10″ vspace=”10″&gt;</pre>
<p><strong>17. <a href="http://www.jamiecavanaugh.com/classes/html_examples/16_textcolors.htm" target="_blank">Text colors</a></strong> text=basic text color, link=links color, vlink=visited links, alink=link when mouse down</p>
<pre>body {color:#ff0000;}
a:link {color: #003300; text-decoration: underline; }
a:visited {color: #000066; text-decoration: underline; }
a:hover {color: #000099; text-decoration: none; }
a:active {color: #000000; text-decoration: underline; }</pre>
<p><strong>18. <a href="http://www.jamiecavanaugh.com/classes/html_examples/17_meta.htm" target="_blank">Meta tags</a></strong> refresh=go to a new page after N seconds, description=used by search engines, keywords=used by search engines</p>
<pre>&lt;meta http-equiv=”Refresh” content=”15; URL=http://academy.smc.edu”&gt;
&lt;meta name=”description” content=”The New York Times on the Web”&gt;
&lt;meta name=”keywords” content=”New York Times, newspaper, international, news, business”&gt;</pre>
<p><strong>19. Comments</strong>, </strong>used for identifying different parts of the code, or explaining how the code works. Comments are not displayed in the page, and are ignored by the browser. The format for a comments is: Begin a comment with “&lt;!–”, end it with “–&gt;”, and do not use “–” within the comment.</p>
<pre>&lt;!– this is a comment –&gt;</pre>
<p><strong>20. Linking CSS file</strong> to your HTML page</p>
<pre>&lt;link href=”styles.css” rel=”stylesheet” type=”text/css” /&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/html-basic-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Basics</title>
		<link>http://www.everythingaboutweb.com/beginner/html-basics/</link>
		<comments>http://www.everythingaboutweb.com/beginner/html-basics/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:21:39 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=407</guid>
		<description><![CDATA[HTML Basics Markup, the basis of every page HTML is a markup languages composed of elements, which contain attributes (some optional and some mandatory.) These elements are used to markup the various different types of content in documents, specifying what each bit of content is supposed to be rendered as [...]]]></description>
			<content:encoded><![CDATA[<h5 id="markup">HTML Basics</h5>
<h6>Markup, the basis of every page</h6>
<p>HTML is a markup languages composed of elements, which contain attributes (some optional and some mandatory.) <strong>These elements are used to markup the various different types of content in documents, specifying what each bit of content is supposed to be rendered as in web browsers (for example headings, paragraphs, tables, bulleted lists etc.)</strong> As you’d expect, elements define the actual content type, while attributes define extra information about those elements, such as an ID to identify that element, or a location for a link to point to. You should bear in mind that markup is supposed to be as semantic as possible, i.e.– <strong>it is supposed to describe the function of the content as accurately as possible.<br />
</strong><br />
Figure 1 shows the anatomy of a typical HTML element.</p>
<p><img src="http://dev.opera.com/articles/view/4-the-web-standards-model-html-css-a/article4_1.gif" alt="A typical HTML element" width="480" height="153" /></p>
<p>Figure 1: Anatomy of an HTML element.Read Figure 1 description</p>
<h6>Tags</h6>
<p>An HTML tag is always contained between a left angle bracket “&lt;” and a right angle bracket “&gt;”. These tags are special instructions designed to mark or “tag” a particular section of the web page, for example to identify a set of text as bold. The tags do not appear in the visual display of the web page. In general, HTML tags have a starting tag “&lt;tag&gt;” and an ending tag that has the same name as the starting tag but with a forward slash at the beginning “&lt;/tag&gt;”. The text in between the starting and ending tags is the only text affected by the tags.For example, to make some text bold, the HTML would be written as follows:Here is some text, and &lt;b&gt;this text will show bold&lt;/b&gt; when displayed in a browser.</p>
<h6>HEAD &amp; BODY Sections</h6>
<p>An HTML web page is divided into to two major sections, the head and body. The head section is a description of the page, with its title, any meta tags, JavaScript, and other special information about the page. The head section does not contain any displayed content. The body section contains a description of how the page should look and work, including the text, text markup, links for in-line images, form descriptions, links to other pages, and page enhancements such as Flash, JavaScript, etc.</p>
<h5>Basic HTML</h5>
<p>A simple example of a web page</p>
<pre>&lt;html&gt;
&lt;head&gt;
   &lt;title&gt;Basic HTML&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
   Some text for a web page that demonstrates the basic form of HTML in a web page.
&lt;/body&gt;
&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/html-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Learn HTML?</title>
		<link>http://www.everythingaboutweb.com/beginner/why-learn-html/</link>
		<comments>http://www.everythingaboutweb.com/beginner/why-learn-html/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:20:14 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=405</guid>
		<description><![CDATA[Why learn HTML? Given that tools such as Dreamweaver exist, and allow you to create web pages without knowing HTML, you might ask &#8220;why learn HTML?&#8221; There are several reasons: Dreamweaver does not always do what you want. To get the page to look right, you often need to hand [...]]]></description>
			<content:encoded><![CDATA[<h5>Why learn HTML?</h5>
<p style="text-align: left;">Given that tools such as Dreamweaver exist, and allow you to create web pages without knowing HTML, you might ask &#8220;why learn HTML?&#8221; There are several reasons:</p>
<ul style="text-align: left;">
<li class="main"><strong>Dreamweaver does not always do what you want</strong>. To get the page to look right, you often need to hand code some HTML.</li>
<li class="main"><strong>You will become a better web designer</strong>. Learning HTML and how a web site is built will give you the advantage of understanding how to design a better site for your client.</li>
<li class="main"><strong>You will get paid more if you know HTML</strong>. It is a simple fact. Web design companies want people who can hand code HTML. This is because you will be a more flexible employee if you can do lots of things. In addition, larger web site projects often require that the pages have special HTML codes inserted into the web page, and tools like Dreamweaver won&#8217;t be able to do this.</li>
<li class="main"><strong>If you want to use JavaScript, you need to know HTML</strong>. The most interesting web pages often use JavaScript to make them interactive. Before you can learn JavaScript, you need to understand HTML and be comfortable coding.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/why-learn-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How the Internet Works</title>
		<link>http://www.everythingaboutweb.com/beginner/how-the-internet-works/</link>
		<comments>http://www.everythingaboutweb.com/beginner/how-the-internet-works/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:15:05 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=402</guid>
		<description><![CDATA[How the Internet Works Take a look at the diagram below and read through the notes so you understand how the internet works. (Note that &#8220;Client&#8221; refers to the computer where the web page is viewed&#8230;) Servers The Server is where the web site files live. The web server software [...]]]></description>
			<content:encoded><![CDATA[<h5>How the Internet Works</h5>
<p style="text-align: left;">Take a look at the diagram below and read through the notes so you understand how the internet works. (Note that &#8220;Client&#8221; refers to the computer where the web page is viewed&#8230;)<strong><br />
</strong></p>
<p style="text-align: left;"><img src="http://www.everythingaboutweb.com/classes/images/clientserver.gif" alt="" width="464" height="203" align="middle" border="0" /><strong> </strong></p>
<h6>Servers</h6>
<p style="text-align: left;">The Server is where the web site files live. The web server software runs on the server machine, responding to client requests by sending files back to the client. The server also processes CGI (Common Gateway Interface) requests, runs programs, and accesses databases.</p>
<ul>
<li>Server software runs on the server machine</li>
<li>The web site files are on a hard disk attached to the server</li>
<li>The server software formats and delivers each web page element based on HTTP requests</li>
<li>Elements are delivered to many clients at the same time</li>
<li>A &#8220;hit&#8221; indicates that one element (not a page!) was delivered (e.g. an image)</li>
<li>A web page is composed of many elements, therefore each page accessed generates many hits</li>
<li>Hits vs. page visits vs. site visit</li>
</ul>
<h6>Clients</h6>
<p style="text-align: left;"><strong> </strong>The client is the computer where the web page is viewed. The browser software runs on the Client computer and sends requests to the Server computer. When the client receives files from the server, the Client assembles the web page and displays it.</p>
<ul>
<li>The web browser runs on the client</li>
<li>The client requests elements from the server</li>
<li>It receives and &#8220;parses&#8221; the elements delivered by the server</li>
<li>First reads the HTML</li>
<li>Formats the page, and displays the text</li>
<li>Gets additional elements (images, audio, etc.) specified in the HTML</li>
<li>Displays additional elements</li>
<li>Manages the interactions with the user (e.g. forms, scrolling, image maps, etc.), minimizing the amount of work the server has to do</li>
<li>Runs client-side software (JavaScript, Java, plug-ins)</li>
</ul>
<h6>Composition of a web page</h6>
<p style="text-align: left;">A web page is composed of the following elements:</p>
<ul>
<li>The HTML file, which describes the page layout, defines links to other web pages, and contains the text for the page</li>
<li>Elements that come from the same server where the HTML files is, or from a different server</li>
<li>Image files (.gif, .jpg, .png)</li>
<li>Audio files (.mp3, .au, .ram, .mov)</li>
<li>Other multimedia objects (QuickTime movies, Flash, Real, etc.)</li>
<li>JavaScript</li>
</ul>
<p style="text-align: left;">See the links to the directories below for examples. Take a look and note the various elements that comprise the web pages. Notice all the HTML files. (.htm and .shtml files are also HTML files).</p>
<ul style="text-align: left;">
<li>Can you find the .jpg and .gifs images? Where are they located?</li>
<li>What about the Flash files&#8230; they end in .swf and only one of the directories below contain Flash files. Do you know which one?</li>
<li>Do you know what a .css file is? A CSS file stands for&#8221;Cascading Style Sheet&#8221; and we will talk about these later in the semester.</li>
</ul>
<p style="text-align: left;"><a href="http://www.everythingaboutweb.com/classes/sample_project/monterey_pop_web/" target="_blank"> Monterey Pop Web Site</a><br />
<a href="http://www.everythingaboutweb.com/classes/sample_project/nike_ar_2001_web/" target="_blank"> Nike Annual Report Web Site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/how-the-internet-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Typography</title>
		<link>http://www.everythingaboutweb.com/beginner/web-typography/</link>
		<comments>http://www.everythingaboutweb.com/beginner/web-typography/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 17:56:37 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[intermediate]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=395</guid>
		<description><![CDATA[Web typography Traditional print designers have a huge amount of options available to them when it comes to typography, including the sheer numbers of fonts available, and options for positioning text. Typography on the web is a lot more limited, because we must design using fonts and positioning, etc that [...]]]></description>
			<content:encoded><![CDATA[<h5>Web typography</h5>
<p>Traditional print designers have a huge amount of options available to them when it comes to typography, including the sheer numbers of fonts available, and options for positioning text. <strong>Typography on the web is a lot more limited</strong>, because we must design using fonts and positioning, etc that we know will be available on the computers of the users that will look at their web sites—it is no use just designing for yourself on the web!</p>
<h6><strong>Limitations of web typography include</strong>:</h6>
<ul>
<li>A reduced selection of fonts</li>
<li>No hyphenation, making full justification look ugly when a column of text gets narrow</li>
<li>Poor control over kerning (ie, the spacing between the letters)</li>
<li>A lack of control over how the work is viewed—designers must account for a wide variety of screen sizes, resolutions and environments</li>
</ul>
<p>Let’s look at these points in a bit more depth.</p>
<h6><strong>Reduced selection of fonts</strong></h6>
<p>The reduced selection of fonts is often the first thing you will run up against when styling your text. Although you can specify any font you like in your CSS, visitors to your sites will only see your text displayed in that font if they happen to have it installed on their own computer—if they don’t, their browser will either use an alternative font that you’ve specified in your CSS, or resort to the browser default (usually Times New Roman). So, you may like to see all your body text displayed with special fonts like Trump Medieval or Avant Garde, but unless your target audience is heavily biased towards designers your viewers likely aren’t going to get the benefit. For this reason, <strong>most web designers limit themselves to the most commonly-available fonts across all systems, which are usually limited to the following</strong>:</p>
<p>Andale Mono<br />
Times New Roman<br />
Georgia<br />
Verdana<br />
Arial/Arial Black<br />
Courier/Courier New<br />
Trebuchet MS<br />
Comic Sans (this is an unprofessional, many would say ugly font—don’t use this, except perhaps sparingly on sites aimed at children)<br />
Impact</p>
<p>These look like Figure 1:</p>
<p><img title="fontfaces" src="http://devfiles.myopera.com/articles/359/01-fonts.gif" alt="" width="331" height="596" /></p>
<p><strong>Figure 1</strong>: The most commonly available fonts across all systems are limited to the above.</p>
<p>Specifying any of the above fonts means you’re reasonably likely to be picking a font that most of your visitors will also have. Microsoft also introduced six new fonts designed for screen use in Windows Vista and XP, and, oddly, chose to begin all their names with the letter C. If you want to use them, they are Cambria, Calibri, Candara, Consolas, Constantia and Corbel. I’d advise against using these, however, because they are not likely to be available on the Mac or Linux platforms.</p>
<p><strong>So, compared to the thousands of typefaces available to print designers, web designers can reliably choose from just over a dozen</strong>. But is this a serious limitation? Typography is about far more than simply selecting an attractive font, it’s about line lengths and kerning and white space as well—remember that typographers pre-dating electronic fonts would have faced similar limitations.</p>
<h6><strong>Hyphenation</strong></h6>
<p>When it comes to aligning your text within its container, there are four options: left-aligned, right-aligned, centre-aligned and fully-justified. Fully-justified text, where both the left and right edges of the block are aligned to the vertical sides of their container, can look more attractive than text with a “ragged” edge, and you’ll see it a lot in magazines and books. On the web, however, it’s problematic due to the lack of automatic hyphenation, which breaks words at appropriate points to better fit them in the line. To fully justify the block of text, all the browser can do is adjust the spacing between the words, which can lead to “rivers of white space” running vertically through the block—this usually happens when the line length within the block is too short and there aren’t enough spaces to adjust subtly, as shown in Figure 2.</p>
<p><img title="hypenation" src="http://devfiles.myopera.com/articles/359/02-rivers.gif" alt="" width="214" height="349" /></p>
<p><strong>Figure 2</strong>: Rivers of whitespace can spoil justified text blocks.</p>
<p>As you can see in this screenshot, the lack of hyphenation to break words at natural points has caused the spacing between certain words to grow to unacceptable sizes. <strong>To avoid this, you should use left-aligned text for the most part on the Web</strong>.</p>
<h6><strong>Kerning</strong></h6>
<p>Kerning is the process of adjusting the spacing between particular pairs of letters when the font in use is a proportional one (such as Times New Roman, where the space between each character varies from character to character) rather than a monospaced one (such as Courier, where the space between each character is the same each time). It’s used in print to tighten up the space between letters that align naturally, such as a W followed by an A, and can give a more professional look and feel to the text. Most professional fonts come with kerning instructions built in, to provide spacing information to the type renderer. See Figure 3 for an illustration of the difference kerning makes.</p>
<p><img title="kerning" src="http://devfiles.myopera.com/articles/359/03-kerning.gif" alt="" width="276" height="200" /></p>
<p><strong>Figure 3</strong>: Kerning can certainly improve the look of text.</p>
<p>In the above screenshot, the first word has not been kerned. The second word, though, has had the spacing between the W and the A reduced, whilst the space between the A and the S has been increased a touch.</p>
<p>On the web, <strong>kerning with this level of precision is effectively unavailable. The only thing we have that comes close to it is the ability to use tracking, which in the print world means adjusting the space between characters throughout the copy</strong>, no matter what those characters are—so, you could decrease the space between your W and your A, but you’ll also be affecting the space between every other letter. On the web, tracking is better known as letter spacing, and is controlled with CSS—this is illustrated in Figure 4.</p>
<p><a href="http://devfiles.myopera.com/articles/359/04-tracking.gif"><img title="tracking" src="http://devfiles.myopera.com/articles/359/04-tracking.gif" alt="" width="267" height="100" /></a></p>
<p><strong>Figure 4</strong>: Proper kerning is not available on the Web; the closest we have available is more general letter spacing.</p>
<p>In the above screenshot, the spacing between each character has been increased by the same amount. Whilst this has helped separate the A and the S, the space between the W and A is now too much. Letter spacing with CSS is a difficult property to use effectively due to this all-or-nothing nature, and for this reason it is best used sparingly.</p>
<h6><strong>A lack of control</strong></h6>
<p>With all this talk of the print world, there’s something very important worth bearing in mind, and that is that <strong>the web is not print</strong>. So where the print designer doesn’t have to worry about the end viewer resizing the text, or not having the desired set of fonts, or not having aliasing enabled, we do, and there’s often a temptation to try and force a particular design upon the viewer—fixing a rigid text size for instance, or placing text in fixed-width and fixed-height containers, or even replacing whole chunks of text with images.</p>
<p><strong>This lack of control needn’t be a problem however—you just have to get used to the idea that people will want to read your content on a variety of devices in a variety of environments in a variety of ways</strong>. You shouldn’t try to stop them, or make it difficult for them—if they want to read your content then it should be as easy to do so as possible. They may wish to read it on their mobile device during their commute home; they may prefer to print everything out and read it on paper instead of a screen; they may be visually impaired and need to increase the font size somewhat. This is why, when you style your text on the web, what you’re really doing is providing a guide to all the different browsing devices as to how you’d prefer that text be seen. Devices are free to ignore everything you say, of course, but that’s ok—what matters is that you’re not trying to force your design decisions on your entire audience.</p>
<h6><strong>How is typography done on the web?</strong></h6>
<p>Typography on the web is controlled entirely with CSS, and by using CSS you gain a lot of control: not just over the size, colour and typeface selection but also over the line height, the letter spacing, the level of capitalisation (all caps, initial caps, small-caps or no capitalisation at all) and even control over how the first letter or first line of your text is styled.</p>
<p>By styling the text’s containing block, you also have control over the level of justification of the text and the line length. Not only that, you also only have to create your style rules in one location—your stylesheet—to have those rules apply to all of your text, across your whole website (or you can be specific and target particular paragraphs, or areas on the page). Furthermore, if you ever find yourself needing to increase your website text size, or change the body font, you only have to change the value in your stylesheet.</p>
<h5><strong>Quick tips</strong></h5>
<p>Here are some quick tips to help you out with typography on the Web.</p>
<h6><strong>Select a range of fonts</strong></h6>
<p>It’s good practice to include back-up selections when specifying your preferred display font. So, rather than simply specifying “Georgia”, you could specify <em>“Georgia, Cambria, &#8220;Times New Roman&#8221;, Times, serif”</em>. So, first the browser will attempt to use a font named Georgia, but if this font isn’t installed it will try for Cambria, then Times New Roman, followed by Times, followed by whatever the operating system has assigned to the “serif” keyword.</p>
<h6><strong>Line length</strong></h6>
<p>To aid readability, the average length of a line of text within your containing block should be around 40–60 characters per line, though this should vary depending on your audience (children prefer shorter line lengths, adults prefer longer). An ideal line length is shown in Figure 5:</p>
<p><a href="http://devfiles.myopera.com/articles/359/05-line-length.gif"><img title="line_length" src="http://devfiles.myopera.com/articles/359/05-line-length.gif" alt="" width="413" height="149" /></a></p>
<p><strong>Figure 5</strong>: 60 characters per line—the ideal line length.</p>
<p>The text in the screenshot is about 60 characters per line. Any more than this and the reader may have to start moving their eyes—or even their head—in order to follow the text, which can increase eye-strain and makes the text harder to take in.</p>
<h6><strong>Line height</strong></h6>
<p>Line height refers to the vertical space between your lines, and you can make your type more readable by increasing it a little above the browser default (which also allows more space for subscript and superscript characters)—see the difference between the two paragraphs in Figure 6:</p>
<p><a href="http://devfiles.myopera.com/articles/359/06-line-height.gif"><img title="line_height" src="http://devfiles.myopera.com/articles/359/06-line-height.gif" alt="" width="417" height="253" /></a></p>
<p><strong>Figure 6</strong>: Line height can make a big difference to the look and feel of text.</p>
<p>The first paragraph in the above screenshot has a default line height, and can feel a little cramped. The second paragraph has had its line height increased, and the text has a bit more room to breathe, making it a bit more readable. Too much line height, though, and you make the text harder to read again, so be careful.</p>
<h6><strong>Drop caps</strong></h6>
<p>By targeting the <em>first-letter</em> pseudo-element with something like <em>p:first-letter { }</em>, you can style the first letter of a line differently from the rest—such styling is usually known as a drop cap, where the first letter takes up about 3–4 lines of text—see Figure 7.</p>
<p><a href="http://devfiles.myopera.com/articles/359/07-drop-cap.gif"><img title="drop_cap" src="http://devfiles.myopera.com/articles/359/07-drop-cap.gif" alt="" width="370" height="140" /></a></p>
<p><strong>Figure 7</strong>: A typical drop cap.</p>
<h6><strong>Small caps</strong></h6>
<p>Often, fonts come with a small-caps variation—a set of capitalised letters that are uppercased but approximately the size of the lowercase variant. This is useful for when you want to capitalise something but don’t want to draw too much attention to it, so it can be used for abbreviations, for example. Even if the system doesn’t have a small-cap variant of the specified font, that’s ok—the browser will generate its own version by using full capitalisation and then shrinking the characters to around 70% of their normal size. Figure 8 shows small caps in action.</p>
<p><a href="http://devfiles.myopera.com/articles/359/08-small-caps.gif"><img title="small_caps" src="http://devfiles.myopera.com/articles/359/08-small-caps.gif" alt="" width="443" height="145" /></a></p>
<p><strong>Figure 8</strong>: Small caps in action.</p>
<h6>Hanging punctuation</h6>
<p>A good typographical effect can be used if your sentence starts with quote marks. Using the <em>text-indent</em> CSS property combined with a negative value—either a value in ems (-10em), points (-10pt), pixels (-10px) or percent (-10%)—allows you to shunt the quote mark out into the left, maintaining the left vertical line of your block of text, as shown in Figure 9:</p>
<p><a href="http://devfiles.myopera.com/articles/359/09-hanging.gif"><img title="hanging" src="http://devfiles.myopera.com/articles/359/09-hanging.gif" alt="" width="417" height="253" /></a></p>
<p><strong>Figure 9</strong>: Hanging punctuation.</p>
<h6>Typographically-correct punctuation and other entities</h6>
<p>You can make your text look more professional and elegant by using the wide variety of typographic HTML entities that are available such as “smart” or “curly” quotes and en– and em—dashes. A lot of blogging and word processing software will automatically do this for you as you type, turning your regular straight quotes into the typographically-correct curly variety, and turning strings of dashes into en and em dashes. See Figure 10 for examples of typographically-correct punctuation.</p>
<p><a href="http://devfiles.myopera.com/articles/359/10-curly-quotes.gif"><img title="curly_quotes" src="http://devfiles.myopera.com/articles/359/10-curly-quotes.gif" alt="" width="347" height="319" /></a></p>
<p><strong>Figure 10</strong>: Typographically-correct punctuation</p>
<p>Once you start peppering your copy with smart punctuation, your text can look far more elegant and professional—more like something from a magazine or a book than from online. Bear in mind though that this sort of punctuation can look a little pixellated for people with older screens or with aliasing disabled, so use with caution.</p>
<p><strong>Then there’s entities—bits of special HTML</strong> that you can insert into your copy to generate special characters not easily available from your keyboard. Figure 11 contains a number of entities:</p>
<p><a href="http://devfiles.myopera.com/articles/359/11-entities.gif"><img title="entities" src="http://devfiles.myopera.com/articles/359/11-entities.gif" alt="" width="344" height="394" /></a></p>
<p><strong>Figure 11</strong>: HTML entities</p>
<p>These can be typed in by hand, but a lot of content management software can convert or insert these for you with ease.</p>
<h6><strong>Pull-quotes</strong></h6>
<p>A pull-quote is a short extract from your text that appears elsewhere on your page with a larger text size, and sometimes a different font, to draw attention to it. You’ll have seen them in almost every magazine you’ve ever read, and they’re an effective way of breaking up your text and highlighting key quotes or phrases—and they’re also easy to do on the web with some simple markup and styling. Just make the text larger, perhaps set it in a different font, position it so that the regular text wraps around it and you’re done. There are also some more advanced solutions that involve JavaScript picking out selected text and automatically populating a pull quote from it, which can save you having to write the same text twice in your markup.</p>
<h5><strong>Summary</strong></h5>
<p>So that’s typography, and typography on the web; hopefully you can see that text online needn’t be limited to <em>Verdana, small, #333333</em>—there is a wide range of typographic tricks and tips that can help make your text stand out from the rest of the crowd. For most websites, the reason people will be visiting is to read what you or your authors have written; it makes sense, then, to make that reading as pleasurable as possible.<br />
&nbsp;<br />
&nbsp;<br />
<code><sup>This information about <a href="http://dev.opera.com/articles/view/11-typography-on-the-web/" target="_blank">Typography on the web</a> is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">Creative Commons Attribution, Non Commercial - Share Alike 2.5 license</a>.</sup></code><strong> </strong></p>
<h5>CSS Properties for Typography</h5>
<p><strong>font-family</strong> value: one or more quotation mark-enclosed font names followed by an optional generic font name<br />
<strong>font-style</strong> values: Italic, normal<br />
<strong>font-variant</strong> values: normal, small-caps<br />
<strong>font-weight</strong> values: bold, normal, lighter, bolder, integer (100-900)<br />
<strong>font-size</strong> values: an absolute size, a relative size, a length, a percentage<br />
<strong>letter-spacing</strong> value: either normal or a length<br />
<strong>line-height </strong>value: either normal, a number, a length, a percentage<br />
<strong>text-align</strong> value: one of left, right, center, justify<br />
<strong>text-decoration </strong>values:blink, line-through, none, overline, underline<br />
<strong>text-indent</strong> values: either a length or percentage<br />
<strong>text-transform</strong> values:capitalize, lowercase, uppercase<br />
<strong>vertical-align</strong> values: either baseline, sub, super, top, text-top, middle, bottom, text-bottom, a percentage, a length<br />
<strong>word-spacing </strong>values: either normal or a length</p>
<h6>Examples of Good Typography in Websites</h6>
<p><a href="http://www.alistapart.com" target="_blank">A List Apart</a><br />
<a title="http://www.jasonsantamaria.com" href="Jason Santa Maria" target="_blank">Jason Santa Maria</a><br />
<a href="http://analog.coop/" target="_blank">Analog</a><br />
<a href="http://www.karijobe.com/" target="_blank">Kari Jobe</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/web-typography/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Contact Form</title>
		<link>http://www.everythingaboutweb.com/beginner/creating-a-contact-form/</link>
		<comments>http://www.everythingaboutweb.com/beginner/creating-a-contact-form/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 18:26:30 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[intermediate]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=389</guid>
		<description><![CDATA[Creating a Contact Form Creating a simple contact form can be easy once you know the steps involved in creating one. Below is a how-to on creating the HTML/CSS for a contact form. Making the form active will require a script and is beyond the scope of the tutorial below. [...]]]></description>
			<content:encoded><![CDATA[<h5><strong>Creating a Contact Form</strong></h5>
<p>Creating a simple contact form can be easy once you know the steps involved in creating one. Below is a how-to on creating the HTML/CSS for a contact form. Making the form active will require a script and is beyond the scope of the tutorial below.</p>
<h6>Introduction</h6>
<p>A form online is any area where you can input information into a web page, for example entering text or numbers into a text box, checking a tick box, causing a radio button to “fill in”, or selecting an option from a list. The form is then submitted to the web site when you push the submit button.</p>
<p>You’ll see forms used on the Web everywhere, for entering user names and passwords on login screens, commenting on blogs, filling your profile in on a social networking site, or specifying billing information on a shopping site.</p>
<p>So, let’s start with the most basic and simple form that one could possibly want to use and build our way up in complexity after that—in this article I’ll cover all the basics you need to know to create elegant, accessible form structures with HTML. The article structure is as follows:</p>
<ul>
<li>Step one: The basic code</li>
<li>Step two: Adding structure and behaviour</li>
<li>Step three: Adding semantics, style and a bit more structure</li>
<li>Summary</li>
<li>Further reading</li>
</ul>
<p><strong>Step one: The basic code</strong></p>
<p>Let’s start off with a really basic comment form, the sort of form you would use on a web site to allow people to give you feedback on something such as an article you’ve written, or allow someone to contact you without knowing your e-mail address. The code looks like this:</p>
<pre>&lt;form&gt;
Name: &lt;input type="text" name="name" id="name" value="" /&gt;
Email: &lt;input type="text" name="email" id="email" value="" /&gt;
Comments: &lt;textarea name="comments" id="comments" cols="25" rows="3"&gt;&lt;/textarea&gt;
&lt;input type="submit" value="submit" /&gt;
&lt;/form&gt;</pre>
<p>If you enter this into an HTML document and then open that document in a browser, the code is rendered as shown in Figure 1.</p>
<p><img src="http://dev.opera.com/articles/view/20-html-forms-the-basics/figure1.png" alt="the first form example" /></p>
<p>Figure 1: The first, basic form example.</p>
<p>Try it for yourself—enter the above code into your own sample HTML document and load it in a browser, or <a title="The first form example" href="http://dev.opera.com/articles/view/20-html-forms-the-basics/step-1-form.html">click here to navigate to the form in a separate page</a>. Try playing around with the different form controls to see what you can do with them.</p>
<p>As you read the code, you’ll see an opening &lt;form&gt; tag, a &lt;/form&gt; closing tag, and some bits in between the two. The element contains two text inputs in which the page’s reader can enter their name and email address, and a textarea that can be filled with a comment to submit to the site owner.</p>
<p>What have we got here?</p>
<ul>
<li><strong>&lt;form&gt;&lt;/form&gt;</strong>: These two tags are essential to start and end a form—without them you don’t have a web form. Every form must start and end with &lt;form&gt; and &lt;/form&gt; tags.The &lt;form&gt; tag can have a few attributes, which will be explained in Step Two, but please do note that you can’t nest forms inside each other.</li>
<li><strong>&lt;input&gt;</strong>: This tag defines the area where you can insert information. In our case above, input tags define text boxes where site visitors can type in their name and email.Every input tag must have a type attribute to define what it will receive: the possible attribute values are text, button, checkbox, file, hidden, image, password, radio, reset or submit.Every &lt;input&gt; tag must also have a name (except in special cases where the value attribute is always set to the same value as the type attribute, eg type=”submit” or “reset”), which you the coder can decide on. The name attribute informs the thing the data is sent to when the form is submitted (be it a database, or an email sent to the site’s administrator via a server-side script) what the name of the information in the input box is. When the form is submitted, most scripts use the name attribute to place the form data into a database or into an email that can be read by a person.Thus, if the &lt;input&gt; element is for the site visitor to enter their name into, then the name attribute would be name=”name” or name = “first name”, etc. If the &lt;input&gt; tag is for an email address, then the name attribute would be name=”email”. To make it easier on yourself, and the person who will use the form, it is recommended that you name the &lt;input&gt; element in a semantic fashion.By semantically, I mean naming it according to what its function is, as detailed above. If the input is to receive an email address, then name it name=”email”. If it is to be the street address of the site visitor, then name it name=”street-address”. The more accurate the word usage the easier it is not only for you to code the form and then perform maintenance tasks on later, but also for the person or database receiving the form to understand it. Think lean and mean with accurate meaning.</li>
<li>Every &lt;input&gt; tag should also have a value attribute. The value can be set to blank—value=”&#8221;—which will tell the processing script to just insert whatever the site visitor types into the box. In the case of a checkbox, radio button, hidden, submit, or other type attributes you can set the value to equal what you want the default to be. In other cases, such as submit or hidden, you set the value to equal the final input. Examples: value=”yes” for yes, value=”submit” for a submit button, value=”reset” for a reset button, value=”http://www.opera.com” for a hidden redirect, etc.Examples of how to use the value attribute:A blank value attribute, which the user input determines the value of:</li>
</ul>
<p>The code says: &lt;input type=”text” name=”first-name” id=”first-name” value=”&#8221; /&gt;<br />
The user inputs: Jenifer<br />
The value of first-name is sent as “Jenifer” when the form is submitted.</p>
<p>A predetermined value:<br />
The code says: &lt;input type=”checkbox” name=”mailing-list” id=”mailing-list” value=”no” /&gt;<br />
The user checks the box as they wish to join the website’s mailing list.<br />
The value of mailing-list is sent as “yes” when the form is submitted.</p>
<ul>
<li>After the two &lt;input&gt; elements, you can see something a bit different—the textarea element.The folks at textarea bring you a nice, new, improved space to input text into. Not your ordinary, plain old one line text box that our friend &lt;input&gt; provides, the textarea element provides multiple lines of input, and you can even define how many lines are available to enter text into. Note the cols and rows attributes—these are required for every textarea element, and specify how many columns and rows big to make the text area. The values are measured in characters.</li>
<li>Last but not least, you have a special &lt;input&gt; element with the attribute value=”submit”. Instead of rendering a one line text box for input, the submit input will render a submit button that, when clicked, submits the form to whichever target the form has specified to send its data to (currently this isn’t defined at all, so submitting the form will do nothing.)</li>
</ul>
<p><strong>Step two: Adding structure and behaviour</strong></p>
<p>So, you clicked on the form #1 link above, filled it out and clicked Submit—why didn’t it do anything, and why does it look so bad and all in one line? The answer is that you haven’t structured it yet, or defined a place for the data the form is collecting to be submitted to.</p>
<p>Let’s go back to the drawing board, with a new form:</p>
<pre>&lt;form id="contact-form" action="script.php" method="post"&gt;
    &lt;input type="hidden" name="redirect" value="http://www.opera.com" /&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;label for="name"&gt;Name:&lt;/label&gt;
            &lt;input type="text" name="name" id="name" value="" /&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;label for="email"&gt;Email:&lt;/label&gt;
            &lt;input type="text" name="email" id="email" value="" /&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;label for="comments"&gt;Comments:&lt;/label&gt;
            &lt;textarea name="comments" id="comments" cols="25" rows="3"&gt;&lt;/textarea&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;input type="submit" value="submit" /&gt;
            &lt;input type="reset" value="reset" /&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/form&gt;</pre>
<p>This form looks like Figure 2 when rendered in a browser:</p>
<p><img src="http://dev.opera.com/articles/view/20-html-forms-the-basics/figure2.png" alt="the second form example" /></p>
<p>Figure 2: The second form example—looking better, but still not perfect.</p>
<p>You can <a title="Our second form example" href="http://dev.opera.com/articles/view/20-html-forms-the-basics/step-2-form.html">play with the improved form on a separate page by clicking here</a>.</p>
<p>Here I have made a few additions to the basic, simple form. Let’s break it down so you know what I did:</p>
<ul>
<li>There are some new attributes inside the &lt;form&gt; tag. I added an id attribute to not only semantically name what this form is called, but also to provide a unique ID to identify the form so it can be more easily styled using CSS or manipulated using JavaScript if required. You can only have one of each id per page; in this case I called it contact-form.</li>
<li>Lights, camera, action! When you pressed the submit button in the first form and it did not do anything, this was because it had no action or method. The method attribute specifies how the data is sent to the script that will process it. The two most common methods are “GET” &amp; “POST”. The “GET” method will send the data in the page’s URL (you will sometimes see URLs along the lines of http://www.example.com/page.php?data1=value1&amp;data2=value2…; these are bits of data being transported using the “GET” method). Unless you have a specific reason to use “GET”, it is probably best to not use it if you are trying to send secure information as anyone can see the information as it is transmitted via the URL. “POST” sends the data via the script that powers the form, either to an email that is sent to the site’s administrator, or a database to be stored and accessed later, rather than in the “GET” URL. <a href="http://www.w3.org/2001/tag/doc/whenToUseGet.html" target="_blank">“POST” is the more secure and usually the better option</a>.If you are very concerned about the security of the data in the form, for example if you are submitting a credit card number to a shopping site, then you should use the https protocol with a secure socket layer (SSL). Basically, this means that data will be sent over the https protocol, not the http protocol. Have a look at the URLs next time you are paying for something on a shopping site, or using online banking—you’ll probably see https:// in your address bar, not http://. The difference is that an https connection is a bit slower to transmit than http, but the data is encrypted, so anyone hacking into the data connection can’t make any sense out of it while it is in transit. Talk to your web host for information on how they can provide you with https and SSL.</li>
<li>The action attribute specifies what script file the form data should be sent to for processing. Many web hosts will have a generic send mail script or other form scripts available for use (see your host’s documentation for information) that they have customized to their servers. On the other hand, you could use a server-side script that you or someone else has created to power your form. Most of the time, folks use languages such as PHP, Perl or Ruby to create a script that will process the form—you could for example send an email containing the form information, or input the form information into a database to be stored for later use.It is outside of the scope of this course to write up a server-side script for you, or teach you how to write server-side code yourself—please inquire with your host to find out what they offer, or find a nice programmer to befriend.Here are a few resources to get you started if you would like to investigate server-side scripting:</li>
</ul>
<p>Perl: <a href="http://www.perl.com/">http://www.perl.com/</a><br />
PHP: <a href="http://www.php.net/">http://www.php.net</a><br />
PHP documentation on Forms: <a href="http://uk3.php.net/manual/en/tutorial.forms.php">http://uk3.php.net/manual/en/tutorial.forms.php</a><br />
Python: <a href="http://python.org/">http://python.org/</a><br />
Ruby: <a href="http://www.ruby-lang.org/">http://www.ruby-lang.org</a><br />
Sendmail: <a href="http://www.sendmail.org/">http://www.sendmail.org/</a><br />
ASP.NET: <a href="http://www.asp.net/">http://www.asp.net/</a></p>
<ul>
<li>The second line that’s been added to our Step Two form is the “hidden” input field—this is a redirect. What?Under the goal of separating markup structure from presentation and behaviour, it is ideal to use the script that will power the form to also redirect the user once the form is submitted. You don’t want your users to be left sitting there looking at the form page, wondering what the heck to do next after they’ve submitted the form; I’m sure you’ll agree that it is a much better user experience to instead redirect your users to a thank you page featuring “what to do next” links, after a successful form submission. This line in particular specifies that after this form is submitted, the user will be redirected to the Opera homepage.</li>
<li>To improve the look of the form, I have put all the form elements into an unordered list so that I can use the markup to line them up cleanly and then use CSS to polish the look.Some folk would argue that you should not use an unordered list to markup a form, but use a definition list instead. Others would argue that one should not use a list at all but use CSS to style the &lt;label&gt; and &lt;input&gt; tags. I will let you research this debate and make up your own mind on which is more semantically correct. For our simple exercise I will use the unordered list.</li>
<li>Last but not least in step two, I’ve labeled the form elements. Both in terms of meaning and making the form accessible to a wide range of internet enabled devices, it is best to give all the form elements labels—check out the contents of the label elements – these labels are tied to their respective form elements by giving the input and textarea elements ids that have the same value as the labels’ for attributes. This is great because it not only gives a visual indicator of the purpose of each form field on the screen, but it also gives the form fields more meaning semantically. For example, a visually impaired person using the page with a screenreader can now see which label goes with which form element. The ids can also be used to style individual form fields using CSS.By now you are probably wondering why id attributes are included as identifiers in form elements as well as name attributes. The answer is that input elements without name attributes are not submitted to the server, so those are definitely needed. id attributes are needed to associate form elements with their corresponding label elements. You should therefore use both.</li>
</ul>
<p>The 2nd form displays a bit better, but it has been beaten with the default ugly stick. Time to add a few more bits and bobs before applying some style.</p>
<p><strong><a href="http://www.everythingaboutweb.com/classes/downloads/contact_form.zip" target="_blank">Download the files for the Contact Form outlined in Step three here.</a></strong></p>
<p><strong>Step three: Adding semantics, style and a bit more structure</strong></p>
<p>Now I’ll finish off what I started at the beginning of the article, with the following final version of my example form:</p>
<pre>&lt;form id="contact-form" action="script.php" method="post"&gt;
  &lt;fieldset&gt;
    &lt;legend&gt;Contact Us:&lt;/legend&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;label for="name"&gt;Name:&lt;/label&gt;
        &lt;input type="text" name="name" id="name" value="" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;label for="email"&gt;Email:&lt;/label&gt;
        &lt;input type="text" name="email" id="email" value="" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;label for="comments"&gt;Comments:&lt;/label&gt;
        &lt;textarea name="comments" id="comments" cols="25" rows="3"&gt;&lt;/textarea&gt;
      &lt;/li&gt;
      &lt;li&gt;
       &lt;label for="mailing-list"&gt;Would you like to sign up for our mailing list?&lt;/label&gt;
       &lt;input type="checkbox" checked="checked" name="mailing-list" value="Yes, sign me up!" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;input type="submit" value="submit" /&gt;
        &lt;input type="reset" value="reset" /&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p>When rendered in a browser, this form looks as shown in Figure 3.</p>
<p><img src="http://dev.opera.com/articles/view/20-html-forms-the-basics/figure3.png" alt="the third and final form example" /></p>
<p>Figure 3: The final form example in all its glory.</p>
<p>To see this form live in a browser and play with it, <a href="http://dev.opera.com/articles/view/20-html-forms-the-basics/step-3-form.html" target="_blank">following this link</a> to the form on a separate page.</p>
<p>The last two major elements I have added to this form are fieldset and legend. Both of these elements are not mandatory, but are very useful for more complex forms and for presentation.</p>
<p>The fieldset element allows you to organize the form into semantic modules. In a more complex form, you could for example use different fieldsets to contain address information, billing information, customer preference information, and so on. The legend element allows you to name each fieldset section.</p>
<p>I’ve also applied a little bit of CSS to this form, to style the structural markup. This is applied to the third form example using an external stylesheet—<a href="http://dev.opera.com/articles/view/20-html-forms-the-basics/form.css" target="_blank">click on this link to see the styles</a>. The two most important tasks I wanted the basic CSS to do is add margins to line up the labels and input boxes, and get rid of the unordered list’s bullet points. Here is the CSS that resides in the external stylesheet:</p>
<p>#contact-form fieldset {width:40%;}<br />
#contact-form li {margin:10px; list-style: none;}<br />
#contact-form input {margin-left:45px; text-align: left;}<br />
#contact-form textarea {margin-left:10px; text-align: left;}</p>
<p>What does it do? The first line styles the fieldset border to not take up the whole page; you could also set the border to none using {border: none;} if you didn’t want one. The second line puts a margin of 10 pixels on the li elements to help give a little visual room between each list item. The third and fourth lines set a left margin on the input and textarea elements so that they don’t crowd the labels and line up properly. If you would like more information on the styling of a form please consult <a href="http://dev.opera.com/articles/view/34-styling-forms/">this article on Styling Forms in this Web Standards Curriculum</a> or <a href="http://alistapart.com/articles/prettyaccessibleforms" target="_blank">Nick Rigby’s A List Apart article on “Prettier Accessible Forms”</a>.</p>
<p><strong>Summary</strong></p>
<p>In this article, I have covered the most basic three steps to a web standards compliant form. There is much more in form world I did not cover here and that is left for you to explore for now. There are access keys, checkboxes and radio buttons, custom submit and reset buttons, and select boxes.</p>
<p>In the above Step three Form, I added a checkbox to show how you can use the additional attributes in the input element to collect information that is beyond the single line text input or the multiple line text area input. The checkbox and radio button attribute values could be used to add the ability to ask short questions and give the reader a list of options to choose from (checkboxes allow you to select multiple options, radio buttons only one). Radio buttons can be very useful in a survey form.</p>
<p>The select element, also not featured in this article, can be used for a drop down menu of choices (for example a list of countries, or states/provinces).</p>
<p><strong>Further reading</strong></p>
<ul>
<li>Cameron Adams, “Accessible, stylish form layout”: <a href="http://www.themaninblue.com/writing/perspective/2004/03/24/">http://www.themaninblue.com/writing/perspective/2004/03/24/</a>.</li>
<li>Brian Crescimanno, “Sensible Forms: A Form Usability Checklist”: <a href="http://www.alistapart.com/articles/sensibleforms/">http://www.alistapart.com/articles/sensibleforms/</a>.</li>
<li>Simon Willison, “Easier form validation with PHP”, <a href="http://simonwillison.net/2003/Jun/17/theHolyGrail/">http://simonwillison.net/2003/Jun/17/theHolyGrail/</a>.</li>
<li>The Spec. Not any old specification, but THE W3C SPEC—<a href="http://www.w3.org/TR/html401/interact/forms.html">http://www.w3.org/TR/html401/interact/forms.html</a>. If you ever have a bout of insomnia in which a warm glass of milk, counting sheep, and <a href="http://www.ambiencr.com/">Ambien</a> are not putting you to sleep, go read the whole spec for HTML 4.01 or XHTML 1.0 at the w3.org. It is cheaper and more effective than any remedy out there. [Insert name of deity here] bless the engineers of the world.</li>
<li>The nice folk over at the W3.org have defined the differences between “GET” &amp; “POST” and when to use them: <a href="http://www.w3.org/2001/tag/doc/whenToUseGet.html">http://www.w3.org/2001/tag/doc/whenToUseGet.html</a>.</li>
<li>Many blessings upon Mr. Rigby: <a href="http://alistapart.com/articles/prettyaccessibleforms">http://alistapart.com/articles/prettyaccessibleforms</a>.</li>
</ul>
<p><code><sup><br />
Above material from <a href="http://dev.opera.com/articles/view/1-introduction-to-the-web-standards-cur/" target="_blank">The Web Standards Curriculum</a>. This article is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">Creative Commons Attribution, Non Commercial - Share Alike 2.5 license</a>.</sup></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/creating-a-contact-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making WordPress more like a CMS</title>
		<link>http://www.everythingaboutweb.com/beginner/making-wordpress-more-like-a-cms/</link>
		<comments>http://www.everythingaboutweb.com/beginner/making-wordpress-more-like-a-cms/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 23:17:14 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[intermediate]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=385</guid>
		<description><![CDATA[Making WordPress more like a CMS (and less like a blog) . Install WordPress on your server Add a theme Set permalinks Use more pages and less posts. (Turn off comments) Add plugins Edit the CSS Edit the templates (php) Add social media icons Use widgets Customization 1. Installation on [...]]]></description>
			<content:encoded><![CDATA[<h6>Making WordPress more like a CMS (and less like a blog)<br />
.</h6>
<ol>
<li>Install WordPress on your server</li>
<li>Add a theme</li>
<li>Set permalinks</li>
<li>Use more pages and less posts. (Turn off comments)</li>
<li>Add plugins</li>
<li>Edit the CSS</li>
<li>Edit the templates (php)</li>
<li>Add social media icons</li>
<li>Use widgets</li>
<li>Customization</li>
</ol>
<h6>1. Installation on your own server</h6>
<p>Dreamhost</p>
<p><object width="600" height="336" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://s0.videopress.com/player.swf?v=1.02" /><param name="wmode" value="direct" /><param name="seamlesstabbing" value="true" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="overstretch" value="true" /><param name="flashvars" value="guid=bvoe2fSV" /><embed width="600" height="336" type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.02" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=bvoe2fSV" /></object></p>
<p><a href="http://wordpress.tv/2009/02/09/1-click-self-installation-of-wordpress-with-media-temple/" target="_blank">One-Click Self-Installation of WordPress with Media Temple</a><br />
<a href="http://wordpress.tv/2009/02/09/one-click-self-installation-of-wordpress-with-blue-host/" target="_blank">One-Click Self-Installation of WordPress with Blue Host</a></p>
<h6>2. Add a theme</h6>
<p>Finding the right theme for your project is critical. Here are some resources:</p>
<ul>
<li><a href="http://www.smashingmagazine.com/2011/01/27/free-minimal-swiss-design-wordpress-themes-4-themes/" target="_blank">Free Minimal, Swiss Design WordPress Themes (4 Themes)</a></li>
<li><a href="http://www.smashingmagazine.com" target="_blank">Smashing Magazine</a> frequently features good themes</li>
<li><a href="http://www.themeforest.com" target="_blank">Theme Forest</a></li>
<li><a href="http://graphpaperpress.com" target="_blank">Graph Paper Press</a></li>
<li><a href="http://www.plaintxt.org/" target="_blank">plaintxt.org</a> Themes: minimalist themes that allow you to customize</li>
</ul>
<p>The folder for the theme should be uploaded or &#8220;installed&#8221; to wp-content &gt; themes</p>
<h6>3. Set permalinks</h6>
<p>Settings &gt; Permalinks &gt; Custom structure<br />
/%postname%/</p>
<p>This will give the page names the name of your post.</p>
<h6>4. Use more pages and less posts. (Turn off comments)</h6>
<p>In settings you can also go to Reading &gt; front page displays and set this to a static page rather than a post.</p>
<h6>5. Add plugins</h6>
<p>Plugins can greatly improve the functionality of WordPress and are one of the primary reasons to use WordPress. Here are some to start with:</p>
<ul>
<li>Maintenance Mode</li>
<li>Google Analytics for WordPress</li>
<li>Akismet</li>
<li>All in One SEO Pack</li>
<li>YouTuber</li>
<li>iframe</li>
<li>Galleria WP</li>
<li>Easy Contact</li>
<li>Sociable</li>
<li>Database backup (choose from several)</li>
</ul>
<h6>6. Edit the CSS</h6>
<p>Appearance &gt; Editor &gt; style.css</p>
<p>Backup the original version of your style.css, just in case!</p>
<h6>7. Edit the templates (php)</h6>
<p>Appearance &gt; Editor &gt; see the right hand side for the list of templates. Some things you may need to handcode such as footer copyright information.</p>
<h6>8. Add social media icons and/or feeds</h6>
<p>Check out the plugins and widgets for adding social media to your site.</p>
<h6>9. Use widgets</h6>
<ul>
<li>Search</li>
<li>Pages</li>
<li>Links</li>
<li>Categories</li>
<li>Special Text</li>
<li>Certain themes have special widgets or widgets for footers and sidebars</li>
</ul>
<h6>10. Customization</h6>
<p>The more you use WordPress and build sites in it, the better you will get at customizing the website.</p>
<h5>Resources</h5>
<p><a href="http://wordpress.tv/" target="_blank">WordPress.tv: Your Visual Resource for All Things WordPress</a><br />
<a href="http://www.smashingmagazine.com/2009/04/29/ultimate-guide-to-using-wordpress-for-a-portfolio/" target="_blank">Ultimate Guide To Using WordPress For a Portfolio</a><br />
<a href="http://mogdesign.eu/blog/ultimate-wordpress-tutorial-collection/" target="_blank">WordPress Tutorial Collection</a><br />
<a href="http://www.1stwebdesigner.com/wordpress/110-massive-wordpress-video-tutorial-collection/">110+ Massive WordPress Video Tutorial Collection</a><br />
<a href="http://skyje.com/2010/04/wordpress-resources/" target="_blank">Top 60 WordPress Resources</a><br />
<a href="http://www.wpbeginner.com/" target="_blank">Beginners Guide for WordPress</a><br />
<a href="http://lorelle.wordpress.com/wordpress-resources/" target="_blank">WordPress Resources- Lorelle on WordPress</a><br />
<a href="http://css-tricks.com/video-screencasts/41-wordpress-as-a-cms/" target="_blank">WordPress as a CMS</a><br />
<a href="http://css-tricks.com/" target="_blank">CSS Tricks</a></p>
<p>WordPress Themes<br />
<a href="http://www.smashingmagazine.com/2011/01/27/free-minimal-swiss-design-wordpress-themes-4-themes/" target="_blank">Free Minimal, Swiss Design WordPress Themes (4 Themes)</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/making-wordpress-more-like-a-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code for 1, 2, and 3 CSS Column Layouts</title>
		<link>http://www.everythingaboutweb.com/beginner/code-for-1-2-and-3-css-column-layouts/</link>
		<comments>http://www.everythingaboutweb.com/beginner/code-for-1-2-and-3-css-column-layouts/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 22:02:20 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[intermediate]]></category>

		<guid isPermaLink="false">http://www.everythingaboutweb.com/?p=377</guid>
		<description><![CDATA[Strategize your plan for the layout Below is the HTML and CSS &#8220;starter&#8221; code for each of the major column layouts. Normally your design will fall into one of these 3 main structures: 1, 2, or 3 column layout. From there your design may get more complex then the illustrations [...]]]></description>
			<content:encoded><![CDATA[<h5><strong></strong>Strategize your plan for the layout</h5>
<p>Below is the HTML and CSS &#8220;starter&#8221; code for each of the major column layouts. Normally your design will fall into one of these 3 main structures: 1, 2, or 3 column layout. From there your design may get more complex then the illustrations below.</p>
<h5>Is it one-column?</h5>
<p>&nbsp;<br />
<img src="http://www.everythingaboutweb.com/classes/images/one_column.gif" alt="" /></p>
<h6>&#8220;Starter&#8221; HTML</h6>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Title of Website&lt;/title&gt;
&lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="wrapper"&gt;

&lt;div id="header"&gt; &lt;/div&gt;

&lt;div id="content"&gt; &lt;/div&gt;

&lt;div id="footer"&gt; &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<h6>&#8220;Starter&#8221; CSS</h6>
<pre>*{
    margin: 0px;
    padding: 0px;
}
body {
    margin-left: 0px;
    margin-top: 0px;
}
img {
    border: none;
}
#wrapper {
    width: 990px;
    margin-right: auto;
    margin-left: auto;
}
#header {
    height: 130px;
}
#content {
    width: 990px;
}
#footer {
    height: 50px;
    clear: both;
}</pre>
<p><strong>Resource: <a title="Permanent Link to VIDEO: One Column CSS Layout (Parts 1- 3)" href="http://www.everythingaboutweb.com/beginner/video-one-column-css-layout-part-1-3/" rel="bookmark">VIDEO: One Column CSS Layout (Parts 1- 3)</a></strong><br />
&nbsp;</p>
<hr />
&nbsp;</p>
<h5>Is it two-column?</h5>
<p>&nbsp;<br />
<img src="http://www.everythingaboutweb.com/classes/images/two_column.gif" alt="" /></p>
<h6>&#8220;Starter&#8221; HTML</h6>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Title of Website&lt;/title&gt;
&lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="wrapper"&gt;

&lt;div id="header"&gt; &lt;/div&gt;

&lt;div id="sidebar"&gt; &lt;/div&gt;
&lt;div id="content"&gt; &lt;/div&gt;

&lt;div id="footer"&gt; &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<h6>&#8220;Starter&#8221; CSS</h6>
<pre>*{
    margin: 0px;
    padding: 0px;
}
body {
    margin-left: 0px;
    margin-top: 0px;
}
img {
    border: none;
}
#wrapper {
    width: 990px;
    margin-right: auto;
    margin-left: auto;
}
#header {
    height: 130px;
}
#sidebar {
    width: 390px;
    float: left;
}
#content {
    width: 600px;
    float: left;
}
#footer {
    height: 50px;
    clear: both;
}</pre>
<p><strong>Resource: <a title="Permanent Link to VIDEO: Two Column CSS Layout (Parts 1- 2)" href="http://www.everythingaboutweb.com/beginner/video-two-column-css-layout-parts-1-2/" rel="bookmark">VIDEO: Two Column CSS Layout (Parts 1- 2) </a></strong><br />
&nbsp;</p>
<hr />
&nbsp;</p>
<h5>Is it three-column?</h5>
<p>&nbsp;<br />
<img src="http://www.everythingaboutweb.com/classes/images/three_column.gif" alt="" /></p>
<h6>&#8220;Starter&#8221; HTML</h6>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Title of Website&lt;/title&gt;
&lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="wrapper"&gt;

&lt;div id="header"&gt; &lt;/div&gt;

&lt;div id="leftsidebar"&gt; &lt;/div&gt;
&lt;div id="content"&gt; &lt;/div&gt;
&lt;div id="rightsidebar"&gt; &lt;/div&gt;

&lt;div id="footer"&gt; &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<h6>&#8220;Starter CSS</h6>
<pre>*{
    margin: 0px;
    padding: 0px;
}
body {
    margin-left: 0px;
    margin-top: 0px;
}
img {
    border: none;
}
#wrapper {
    width: 990px;
    margin-right: auto;
    margin-left: auto;
}
#header {
    height: 130px;
}
#leftsidebar {
    width: 245px;
    float: left;
}
#content {
    width: 500px;
    float: left;
}
#rightsidebar {
    width: 245px;
    float: left;
}
#footer {
    height: 50px;
    clear: both;
}</pre>
<p>&nbsp;</p>
<hr />
&nbsp;</p>
<h5>Other Resources (Sample Code)</h5>
<p>Two Column CSS Layout: <a href="http://www.everythingaboutweb.com/classes/examples/2-column/" target="_blank">http://www.everythingaboutweb.com/classes/examples/2-column/</a><br />
Two Column Faux CSS Layout: <a href="http://www.everythingaboutweb.com/classes/examples/2-column_faux/" target="_blank">http://www.everythingaboutweb.com/classes/examples/2-column_faux/</a><br />
Three Column CSS Layout: <a href="http://www.everythingaboutweb.com/classes/examples/3-column/" target="_blank">http://www.everythingaboutweb.com/classes/examples/3-column/</a><br />
<a href="http://www.vanseodesign.com/css/2-column-layout-code/" target="_blank"><br />
2 Column CSS Layout: Fixed Width And Centered</a><br />
<a href="http://www.vanseodesign.com/css/3-column-layout-code/" target="_blank">3 Column CSS Layout: Fixed Width And Centered</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.everythingaboutweb.com/beginner/code-for-1-2-and-3-css-column-layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

