<?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>Web Design Talk &#187; xhtml</title>
	<atom:link href="http://www.web-design-talk.co.uk/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-design-talk.co.uk</link>
	<description>Web Design &#38; Development Blog</description>
	<lastBuildDate>Wed, 28 Jul 2010 21:50:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CSS Sprities and Website Optimization</title>
		<link>http://www.web-design-talk.co.uk/88/css-sprities-and-website-optimization/</link>
		<comments>http://www.web-design-talk.co.uk/88/css-sprities-and-website-optimization/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:10:19 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[sprities]]></category>
		<category><![CDATA[website optimisation]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.web-design-talk.co.uk/?p=88</guid>
		<description><![CDATA[One of the latest and most well established design practices are CSS sprites. This is the practice of combing multiple images into a larger and single, composite image. By using the CSS background-position property selected portions of that master image (or sprite) are displayed. The main issue here is how can a larger image witha [...]]]></description>
			<content:encoded><![CDATA[<p>One of the latest and most well established design practices are CSS sprites. This is the practice of combing multiple images into a larger and single, composite image. By using the <a href="http://www.w3schools.com/css/pr_background-position.asp">CSS background-position property</a> selected portions of that master image (or sprite) are displayed. The main issue here is how can a larger image witha larger file size be beneficial, especially when compared to several smaller images? The answer lies in HTTP requests and <a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/">Yahoo&#8217;s 80/20 rule</a> explains this much better than I could! To summarise, the numbers of HTTP requests to the websites is drastically cut, thus loading the page much faster in  single request. Another major beenfit is that not Javascript is required for mouseover code, so you can make image rollovers easily. I have used this technque in the past, but like a lot of people never knew it was called sprites.</p>
<p>In fact, using sprites are so effective many of the internets biggest site&#8217;s are using them, all in slightly different ways. On such sites a truely huge number of requests are saved every day. For example, Youtube, Google, AOL,  Amazon and Apple all use CSS sprites. Take the mimilist example of Google (left):</p>
<div class="wp-caption alignleft" style="width: 160px"><img title="Google CSS Sprite" src="http://www.google.ca/images/nav_logo3.png" alt="Google CSS Sprite" width="150" height="105" /><p class="wp-caption-text">Google CSS Sprite</p></div>
<p>Youtube, does things slightly different and uses a absolutely <a href="http://s.ytimg.com/yt/img/master-vfl89407.png">massive sprite 2800px in height</a>! You&#8217;ll notice that some sprites are tightly packed together and other have spacing around each image. This is to allow for browser based text sizing, that would otherwise display multiple background images. A good example of planning for such an occurance is <a href="http://digg.com//img/menu-current.gif">Digg&#8217;s sprite</a>, where each image is highly spaced out.</p>
<p>The CSS is relatively simple. Take the example of a simple unordered list with a different image for each item. I made a <a href="http://web-design-talk.co.uk/examples/3/yada.png">very simple sprite </a>and applied the background-position property to each link class. Here&#8217;s the simple HTML used for the list:<span id="more-88"></span></p>
<pre class="brush: xml;">
&lt;ul id=&quot;sprites&quot;&gt;
	&lt;li&gt;&lt;a class=&quot;exclamation&quot; href=&quot;#&quot;&gt;Top Product&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;hot&quot; href=&quot;#&quot;&gt;Sizzlin Offers&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;offer&quot; href=&quot;#&quot;&gt;Special Deals&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>..and the CSS:</p>
<pre class="brush: css;">#sprites li {
 	list-style-type:none;
	font-size:1.1em;
	display: inline;
}
#sprites li a {
	background-image:url('yada.png');
	background-repeat:no-repeat;
	padding:5px 35px;
	line-height:35px;
	text-decoration: none;
	color: #333;
}
#sprites li a:hover {
text-decoration: underline
}
#sprites li a.hot {background-position:0px -165px}
#sprites li a.exclamation { background-position: 0px 0px; }
#sprites li a.offer { background-position: 0 -82px; }</pre>
<p>The <a href="http://web-design-talk.co.uk/examples/3/">final result</a> is a horizontal list, using a single image for the icons &#8211; no CSS hacks required for correct display in all the latest browsers! I won&#8217;t bother explaing the HTML or CSS as is self explanatory and very simple.</p>
<p>I personally find CSS sprites most useful for application icons as I can easily add a new icon class and set the background position accordingly. For instance, I&#8217;m currently working on a project that uses a lot of the fabulous <a href="http://www.famfamfam.com/lab/icons/silk/">famfamfam silk icons</a> and have used a <a href="http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png">sprite similar to that on their site</a>. While this is a lot of work initially, my recent discovery the <a href="http://spritegen.website-performance.org/">sprite generator</a> has limited this work load.</p>
<p>Sprites can be used a for avriety of things, including simple image rollovers &#8211; see a quick example I put together using a simple hyperlink and a single background image (image from <a href="http://michaelmknight.deviantart.com/art/Virus-Shield-59357349">devianrt</a>). When I hover on the logo the background-position property simply shifts the spirite to right. You can view the <a href="http://web-design-talk.co.uk/examples/3/css-sprite-single-image.php">result right here</a>!</p>
<p>As with everything, you can take this idea a stage further and apply some JQuery to the mix to <a href="http://www.alistapart.com/articles/sprites2">create an amazing Flash like menu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-design-talk.co.uk/88/css-sprities-and-website-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Common W3C Validation Errors and SEO</title>
		<link>http://www.web-design-talk.co.uk/79/fixing-common-w3c-validation-errors-for-seo/</link>
		<comments>http://www.web-design-talk.co.uk/79/fixing-common-w3c-validation-errors-for-seo/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 18:21:00 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[xHTML Validation]]></category>
		<category><![CDATA[semantic code]]></category>
		<category><![CDATA[w3c validation]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.web-design-talk.co.uk/?p=79</guid>
		<description><![CDATA[Yet another thing to check when doing SEO is that your site validates via the w3c validation checker. A site that is xHTML valid will recieve more frequent search engine crawls and more importantly, longer crawl times. I won&#8217;t bore you with further details about why validation is a good thing (it&#8217;s a huge subject), [...]]]></description>
			<content:encoded><![CDATA[<p>Yet another thing to check when doing SEO is that your site validates via the <a title="w3c validator" href="http://validator.w3.org/" target="_blank">w3c validation checker</a>. A site that is xHTML valid will recieve more frequent search engine crawls and more importantly, longer crawl times. I won&#8217;t bore you with further details about why validation is a good thing (it&#8217;s a huge subject), but if you must there is a great article about the <a href="http://validator.w3.org/docs/why.html">subject right here</a>. Creating a site to an xHTML valid standard encourages better coding practice and more <a href="http://www.seoblogger.co.uk/serps/the-benefits-of-using-semantic-code.html">semantic coding</a> &#8211; making your site easier to crawl. You are also giving your site a betttr chance of displaying the same across multiple and future browsers.</p>
<p>Another less known theory is that spiders get full when crawling a page, semantic coding practice will allow for cleaner and more lightweight code. For instance, when crawling a badly coded page with lots of line styles and JavaScript (E.g. content not useful to a spider) the spider may become full too quickly and leave &#8211; missing you important content contained further on within the page.</p>
<p>Validating your site to at least xHTML Transaitional 1.0 (the test strict version, compared to xHTMl 1.0 Strict) is highly encouraged and is an area often ignored by developers. Below, I&#8217;ll quickly outline some of the common validation errors and how to easily fix them:</p>
<p><strong>cannot generate system identifier for general entity X </strong>- 99% of the time this relates to errors with entity references such as ampersands in URLs. E.g. having an url like product.php?id=2&amp;mode=view would result in this error as the &#8216;&amp;&#8217; wasn;t used within the url.</p>
<p><strong>required attribute “alt” not specified</strong> –  simply find the line number and add an alt tag for the image. The presence of an alt tag is required for both transitional and strict doc types.</p>
<p><strong>XML Parsing Error: Opening and ending tag mismatch</strong> &#8211; Depending on how organised you are when coding this fix can take a matter of seconds or a lot longer. It relates to unclosed block level tags, such as a table or div. One plus point is that fixing such an error often results in several validation errors being fixed at once.</p>
<p><span id="more-79"></span></p>
<p><strong>required attribute “TYPE” not specified</strong> &#8211; This relates to no type attribute being specified for things like script and style tags. Solution &#8211; use the type tag like this: <span lang="EN-GB">&lt;script type=”text/javascript” language=”javascript” src=”scripts.js”&gt;</span></p>
<p><strong>There is no attribute “HEIGHT” </strong>- xHTML does not allow for the presence of the height attributer. To resolve, add an inline style or better, specify the height within the css rule for that element.</p>
<p><strong>NET-enabling start-tag requires SHORTTAG YES </strong>or <strong>document type does not allow element “META” here &#8211; </strong>caused by incorrect use of short tags for the page&#8217;s doctype. For example if you have specified an HTML doctype then you use use &lt;br&gt; instead of &lt;br /&gt;.</p>
<p><strong>ID &#8216;someDivname&#8217; already defined &#8211; </strong>caused when you have used two dividers on the same page, with the same id. Solution, uses div class instead of div id if you need multiple dividers on one page.</p>
<p><strong>Missing a required sub element of HEAD </strong>- almost definately caused by missing xHTML required tags from the head section. E.g. have you included a title tag (required in <em>all </em>HTML documents.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-design-talk.co.uk/79/fixing-common-w3c-validation-errors-for-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
