<?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>Blue Anvil Journal &#187; html</title>
	<atom:link href="http://blue-anvil.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://blue-anvil.com</link>
	<description>The online blogfolio of Mike Jolley</description>
	<lastBuildDate>Sun, 05 Sep 2010 14:39:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating &#8216;Web 2.0&#8242; Layouts using strips</title>
		<link>http://blue-anvil.com/archives/creating-web-20-layouts-using-strips/</link>
		<comments>http://blue-anvil.com/archives/creating-web-20-layouts-using-strips/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 15:27:54 +0000</pubDate>
		<dc:creator>Mike Jolley</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blue-anvil.com/?p=247</guid>
		<description><![CDATA[I&#8217;ve seen the &#8216;web 2.0&#8242; layout (full width background, centred content) done in some pretty wacky and different ways, the worst being a background image and then fixed height sections laid on top (if the content wraps or the text is resized&#8230;bam..broken layout). Because of this I am going to demonstrate the method I use [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blue-anvil.com/wp-content/uploads/2008/11/post_strips.gif" alt="Creating Layouts using strips" title="post_strips" class="alignnone size-full wp-image-286" /></p>
<p>I&#8217;ve seen the &#8216;web 2.0&#8242; layout (full width background, centred content) done in some pretty wacky and different ways, the worst being a background image and then fixed height sections laid on top (if the content wraps or the text is resized&#8230;bam..broken layout). </p>
<p>Because of this I am going to demonstrate the method I use &#8211; content strips. Hopefully this will be useful to CSS beginners who want to code this type of layout.</p>
<p><span id="more-247"></span></p>
<p>Essentially, what you do is treat each section, or &#8216;strip&#8217;, separately and layer them like a cake. </p>
<p>Lets take a commonly used design and demonstrate what I mean.</p>
<p><img src="http://blue-anvil.com/wp-content/uploads/2008/11/layout.gif" alt="" title="layout" width="300" height="175" class="aligncenter size-full wp-image-256" /></p>
<p>In the above design as you can see we have a header, a content (with two sub sections), and a footer. The footer and header require a full width background. So, horizontally we can see 3 strips &#8211; header, content, footer.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;header&quot;&gt;&lt;p&gt;Header&lt;/p&gt;&lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;
    &lt;div class=&quot;mainContent&quot;&gt;&lt;p&gt;Main Content&lt;/p&gt;&lt;/div&gt;
    &lt;div class=&quot;subContent&quot;&gt;&lt;p&gt;Sub Content&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;&lt;p&gt;Footer&lt;/p&gt;&lt;/div&gt;</pre></td></tr></table></div>

<p>Using CSS we can style each strip, leaving them all as full width elements. Header and footer should get a tiled background image each, and the text should be aligned center (<code>text-align:center;</code>).<br />
<p style="text-align:center"><script type="text/javascript"><!--
google_ad_client = "pub-6928386133078955";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "444444";
google_color_text = "444444";
google_color_url = "444444";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p><br />
The content itself should be centred and is common in all strips &#8211; lets say 700px wide in each section. To keep the content this wide we create a <code>.inner</code> class in the css stylesheet:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.inner</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">700px</span><span style="color: #00AA00;">;</span>     <span style="color: #808080; font-style: italic;">/* Limits its width */</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>   <span style="color: #808080; font-style: italic;">/* Makes this inner div centered */</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>    <span style="color: #808080; font-style: italic;">/* Parent strips have center aligned text */</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* To clear floats */</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Our HTML now looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;header&quot;&gt;
    &lt;div class=&quot;inner&quot;&gt;
        &lt;p&gt;Header&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;
    &lt;div class=&quot;inner&quot;&gt;
        &lt;div class=&quot;mainContent&quot;&gt;&lt;p&gt;Main Content&lt;/p&gt;&lt;/div&gt;
        &lt;div class=&quot;subContent&quot;&gt;&lt;p&gt;Sub Content&lt;/p&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;
    &lt;div class=&quot;inner&quot;&gt;
        &lt;p&gt;Footer&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>See how it works? Each strip can have its own background this way, and can shrink and grow to fit it&#8217;s content without breaking the layout.</p>
<p>As I said before, this is my preferred method of coding these kind of layouts and it has not failed me yet. I hope you found this useful.</p>
<img src="http://blue-anvil.com/7dc46085/266bbf6b/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blue-anvil.com/archives/creating-web-20-layouts-using-strips/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Creating an accessible yet sexy search box with CSS</title>
		<link>http://blue-anvil.com/archives/creating-an-accessible-yet-sexy-search-box-with-css/</link>
		<comments>http://blue-anvil.com/archives/creating-an-accessible-yet-sexy-search-box-with-css/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 23:58:16 +0000</pubDate>
		<dc:creator>Mike Jolley</dc:creator>
				<category><![CDATA[Accessibility, Standards & SEO]]></category>
		<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://blue-anvil.com/?p=162</guid>
		<description><![CDATA[Search boxes: integral parts of many websites but often neglected in terms of markup and style. When considering both accessibility and semantics, marking up a a search box can be a little awkward depending on the look you are trying to achieve. In this post I will suggest some methods of marking up your search [...]]]></description>
			<content:encoded><![CDATA[<p><img class="floatleft" style="float: left; margin: 0 4px 2px 0;" src="http://blue-anvil.com/img/searchform.gif" alt="Create a Search Box" />Search boxes: integral parts of many websites but often neglected in terms of markup and style. When considering both accessibility and semantics, marking up a a search box can be a little awkward depending on the look you are trying to achieve.</p>
<p>In this post I will suggest some methods of marking up your search boxes, and show a neat way of styling it using css and a few images.</p>
<p><span id="more-162"></span></p>
<h2>First things first</h2>
<p>Lets think about what is needed. For a search box we need:</p>
<ol>
<li>A form element</li>
<li>A text input</li>
<li>A submit button</li>
</ol>
<p>Also, ideally we need a <code>label</code> element for accessibility reasons so that users know what purpose the input element has (you can r<a href="http://www.456bereastreet.com/archive/200711/use_the_label_element_to_make_your_html_forms_accessible/">ead more about labels and accessibility at 456 Berea St</a>).</p>
<p>Therefore, here is the markup we could use for our form:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form action=&quot;page.html&quot; method=&quot;post&quot;&gt;
      &lt;div&gt;
            &lt;label for=&quot;search&quot;&gt;Search:&lt;/label&gt;
            &lt;input id=&quot;search&quot; name=&quot;search&quot; type=&quot;text&quot; /&gt;
            &lt;input alt=&quot;Search&quot; src=&quot;img/search.gif&quot; type=&quot;image&quot; /&gt;
      &lt;/div&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p>This is pretty much the way most people would do it, but Im going to challenge this for the following reasons:</p>
<ol>
<li>We rarely want the label visible after styling</li>
<li>Hiding the label with <code>display:none</code> can cause accessibility issues (<a href="http://www.456bereastreet.com/archive/200711/screen_readers_sometimes_ignore_displaynone/">link</a>)</li>
<li>Other methods of hiding the label can also cause issues (l<a href="http://sonspring.com/journal/accessible-display-none">ink</a>)</li>
<li>I want a method that does not require hiding the label…</li>
</ol>
<p>Therefore I have come up with the following; this may have drawbacks which I’m hoping people will discuss in the article comments, any here goes:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form id=&quot;searchform&quot; action=&quot;page.html&quot; method=&quot;post&quot;&gt;
      &lt;div&gt;
            &lt;input id=&quot;search&quot; name=&quot;search&quot; type=&quot;text&quot; /&gt;
            &lt;label for=&quot;search&quot;&gt;&lt;input title=&quot;Search&quot; alt=&quot;Search&quot; src=&quot;img/search3.gif&quot; type=&quot;image&quot; /&gt;&lt;/label&gt;
      &lt;/div&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p>My reasoning behind this is, we still get the association between label and form element, the input has alt text of ‘Search’ which means this is what (in theory) the screen reader should pick up. Because this label doubles as the submit button we also don’t have to hide it. This method is also pretty easy to style. Lets get on to that now.</p>
<p><p style="text-align:center"><script type="text/javascript"><!--
google_ad_client = "pub-6928386133078955";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "444444";
google_color_text = "444444";
google_color_url = "444444";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p></p>
<h2>Styling the form</h2>
<p>To style my form I will use 3 images: left curve, a gradient and the submit button. I could use a 4th image and tile it for the top and bottom borders, but for this Im just going to use css borders on the input box.</p>
<p>Now for the css:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#searchform</span> div <span style="color: #00AA00;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/* This div will have the left image as a background */</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>search1.gif<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#searchform</span> <span style="color: #cc00cc;">#search</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/* Im going to apply a top and bottom border to this input so that it fits with my images and give it the gradient background */</span>
    <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>search2.gif<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#searchform</span> input <span style="color: #00AA00;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/* Some reset styles to make my form elements play nice */</span>
    <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Internet explorer plays up a bit regarding input positioning but this can be overcome with a conditional comment to add a pixel of padding to the input box:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if lte IE 7]&gt;
      &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;#searchform #search {     position:relative;     margin-top:-1px !important; }&lt;/style&gt;
&lt;![endif]--&gt;</pre></td></tr></table></div>

<p>Heres what it looks like:</p>
<pre>
<form id="demo_searchform" action="#" method="post">
<div style="background: url(http://blue-anvil.com/tuts/search1.gif) no-repeat left top; padding: 0 10px !important; margin: 0; line-height: 1;">
<input id="demo_search" style="outline: 0 !important; border-top: 2px solid #999; border-bottom: 2px solid #999; border-left: 0; border-right: 0; background: #fff url(http://blue-anvil.com/tuts/search2.gif) repeat-x top; padding: 3px 2px 2px 0; height: 15px; vertical-align: top; margin: 0; line-height: 1;" name="search" type="text" /><label for="demo_search">
<input style="outline: 0 !important; margin: 0 !important; line-height: 1; float: none; vertical-align: top;" title="Search" alt="Search" src="http://blue-anvil.com/tuts/search3.gif" type="image" /></label></div>
</form>
</pre>
<h2>Mission accomplished?</h2>
<p>It looks nice, but how accessible and semantic do you think the code is? I personally think its better than simply hiding the label but I could be wrong. Discuss below!</p>
<img src="http://blue-anvil.com/7dc46085/266bbf6b/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blue-anvil.com/archives/creating-an-accessible-yet-sexy-search-box-with-css/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Window Resize/Mobile Browser Background Bugs</title>
		<link>http://blue-anvil.com/archives/window-resizemobile-browser-background-bugs/</link>
		<comments>http://blue-anvil.com/archives/window-resizemobile-browser-background-bugs/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 11:25:52 +0000</pubDate>
		<dc:creator>Mike Jolley</dc:creator>
				<category><![CDATA[Browsers & Hacks]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://blue-anvil.com/?p=122</guid>
		<description><![CDATA[Last week I noticed something very odd on Blue Anvil when resizing the browser window; after some casual browsing I discovered it was not just my site with the problem and that it was quite widespread on many &#8216;web 2.0&#8242; style sites. The problem occurs when resizing the browser window; cutting off background images and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blue-anvil.com/img/bugs.gif" class="floatleft" style="float:left;margin:0 4px 2px 0;" alt="Background Bugs" /> Last week I noticed something very odd on Blue Anvil when resizing the browser window; after some casual browsing I discovered it was not just my site with the problem and that it was quite widespread on many &#8216;web 2.0&#8242; style sites.</p>
<p>The problem occurs when resizing the browser window; cutting off background images and potentially making text illegible. Worse still, the bug also seems to affect mobile browsers with a zoom function, such as opera mobile.</p>
<p>After some dabbling I found a solution, which I shall explain in this post.</p>
<p><span id="more-122"></span></p>
<p>The sites that are most affected are those that use &#8216;content strips&#8217; as I like to call them; that is a full width background with content centered down the middle. I tend to code a &#8216;strip&#8217; like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;header&quot;&gt;
     &lt;div class=&quot;inner&quot;&gt;
          ...Content goes here...
     &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>In this example #header is a block level element making it full width with a background image (usually tiled). .inner is my content div; it has a width set and auto-margins to make it centered on the page. The diagram below shows the structure of the layout on blue anvil:</p>
<p><img src="http://blue-anvil.com/wp-content/uploads/2008/07/diagram.jpg" alt="Layout Diagram" title="diagram" width="280" height="200" class="aligncenter size-full wp-image-125" /></p>
<p>If you make the window smaller and then use the horizontal scrollbar in the browser window you will notice the background gets &#8216;cut-off&#8217;. This seems to affect all modern browsers. From what I can gather, it seems the divs with the background image resize with the browser window, meaning any fixed width content will spill out and be shown on the page background; <a href="http://blue-anvil.com/tuts/bgbugdemo.html">this demo page has the bug for you to see</a>.</p>
<p><!--adsense--></p>
<p>The problem itself is not major for most people, since (I assume) resizing the window and scrolling is quite rare. However I have noticed it happening before on the Nintendo Wii browser, and some mobile browsers (opera mobile for instance) where the problem can be more severe; its more of a problem on these devices because It can prevent the user from being able to read content. For example, when opera mobile cut the background off of the footer on Blue Anvil the white text was not legible, as this screenshot shows (taken from my HTC Diamond using Opera Mobile before I fixed the layout):</p>
<p><img src="http://blue-anvil.com/wp-content/uploads/2008/07/bug_mobile.jpg" alt="Bug on Opera Mobile" title="bug_mobile" width="150" height="200" class="aligncenter size-full wp-image-123" /></p>
<p>I experimented with all sorts of attempted fixes; wrappers, 100% widths, clearing&#8230;nothing seemed to work at first. In the end I found a workable solution which was actually quite simple: <strong><code>min-width</code></strong>. Using min-width on the div with the background prevented the browser from shrinking it too much hence eliminating the problem.</p>
<p><img src="http://blue-anvil.com/wp-content/uploads/2008/07/fixed.jpg" alt="Fixed Bug" title="fixed" width="150" height="200" class="aligncenter size-full wp-image-124" /></p>
<p>This fix is quite simple and does not seem to affect anything else on the page or cause any issues of its own, so it is something which can be added easily to any layout suffering from this problem.</p>
<p>Enjoy.</p>
<img src="http://blue-anvil.com/7dc46085/266bbf6b/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blue-anvil.com/archives/window-resizemobile-browser-background-bugs/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Using Image replacement techniques</title>
		<link>http://blue-anvil.com/archives/using-image-replacement-techniques/</link>
		<comments>http://blue-anvil.com/archives/using-image-replacement-techniques/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 15:02:55 +0000</pubDate>
		<dc:creator>Mike Jolley</dc:creator>
				<category><![CDATA[Accessibility, Standards & SEO]]></category>
		<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image replacement]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://82.110.105.91/blue-anvil.co.uk/?p=29</guid>
		<description><![CDATA[This week Ive been trying out a lot of image replacement techniques in main headings, and their are quite a few available. If you have a graphical header logo on a website, with the sites name, often you wont want to have another heading as plain text. Yet, you should want to have the heading [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blue-anvil.com/img/imgrep.gif" class="floatleft" style="float:left; margin:4px 4px 4px 0"alt="Image Replacement" />This week Ive been trying out a lot of image replacement techniques in main headings, and their are quite a few available. If you have a graphical header logo on a website, with the sites name, often you wont want to have another heading as plain text. Yet, you should want to have the heading readable by screen-readers, and you also want the SEO benefits of the heading.</p>
<p>Ive rounded up my favorite methods, and this entry will show you how to use them, and when to use them.</p>
<p><span id="more-29"></span><br />
<!--adsense--></p>
<h2>Method 1 &#8211; Stick the image in the Heading tag</h2>
<p>This method simple involves putting your logo in a heading tag, and giving it relevant alt and title attributes. It works well with simple logos, but if you want cool rollovers etc, you will need a different method.</p>
<h3>(X)HTML</h3>
<pre><code>&lt;h1&gt;
   &lt;a href="home.htm" title="homepage"&gt;
      &lt;img src="logo.gif" alt="Site name" /&gt;
   &lt;/a&gt;
&lt;/h1&gt;</code></pre>
<p>Suits &#8211; Simple logo&#8217;s with an alt tag, and possibly a link</p>
<p>Pro&#8217;s &#8211; Alt text should remain visible with images off, logo visible when CSS disabled</p>
<p>Con&#8217;s &#8211; No css rollovers, you must resort to Javascript</p>
<h2>Method 2 &#8211; Phark Method &#8211; modified</h2>
<p><!--adsense#postad-->
<p>This method involved using a CSS background image to show the logo. If CSS is disabled you still see the heading text, however with images off and CSS on the logo is hidden, which is a shame.</p>
<p>It works by indenting the text out of sight, and showing the background image. I use this one when I have a transparent logo, e.g. A transparent png, since other methods (like Gilder/Levin below) show the heading text underneath the image.</p>
<p>My modded code below also allows pretty rollovers, a nice addition.</p>
<h3>(X)HTML</h3>
<pre><code>&lt;h1&gt;
    &lt;a title="Homepage" href="home.htm"&gt;
    &lt;span&gt;
        Site name
    &lt;/span&gt;&lt;/a&gt;
&lt;/h1&gt;</code></pre>
<h3>CSS</h3>
<pre><code>h1 a span
{
    	height:164px;
    	width:219px;
    	background: url('logo.png') no-repeat;
    	text-indent: -5000px;
}
h1 a:hover span, div#header h1 a:focus span
{
    	height:164px;
    	width:219px;
    	background: url('logoHover.png') no-repeat;
    	text-indent: -5000px;
}</code></pre>
<p>Suits &#8211; Headings when you want a link, and your logo is transparent.</p>
<p>Pro&#8217;s &#8211; Text displayed when images off, transparent images work, css rollovers work.</p>
<p>Con&#8217;s &#8211; Breaks with images off and CSS on.</p>
<h2>Method 3 &#8211; Gilder/Levin Method &#8211; modified</h2>
<p>This method is my favorite when using opaque images. It works by hiding the text with a background image via CSS, it does however need some un-semantic markup; but thats a small price to pay. The span is basically positioned to cover up the header text, thats the reason it needs to be opaque. And remember; the width and height must match the image!</p>
<h3>(X)HTML</h3>
<pre><code>&lt;h1 id="header"&gt;
	Site name&lt;span&gt;&lt;/span&gt;
&lt;/h1&gt;</code></pre>
<h3>CSS</h3>
<pre><code>h1#header
{
      margin:0; padding:0;
      position:relative;
      width:316px; height:29px;
      overflow:hidden;
}
h1#header span
{
      display:block;
      position:absolute;
      width:316px; height:29px;
      margin:0; padding:0;
      background:url(logo.gif) top left no-repeat;
}</code></pre>
<p>Suits &#8211; Headings when you want a link, and your logo is opaque.</p>
<p>Pro&#8217;s &#8211; Text displayed when images off and also when CSS off.</p>
<p>Con&#8217;s &#8211; Cannot use a transparent image.</p>
<h2>Conclusion</h2>
<p>So they were my favorite methods, but are they best? DO you have better solutions? Leave a comment and tell me your views on image replacement.</p>
<h2>Related reading</h2>
<ul>
<li><a href="http://www.mezzoblue.com/tests/revised-image-replacement/">Revised Image Replacement</a></li>
<li><a href="http://www.alistapart.com/articles/javascriptreplacement">JavaScript Image Replacement</a></li>
<li><a href="http://www.stuffandnonsense.co.uk/archives/mir_image_replacement.html">MIR: Image Replacement</a></li>
<li><a href="http://www.stopdesign.com/articles/replace_text/">Using Background-Image to Replace Text</a></li>
</ul>
<img src="http://blue-anvil.com/7dc46085/266bbf6b/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blue-anvil.com/archives/using-image-replacement-techniques/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Guide to Semantic Mark-up</title>
		<link>http://blue-anvil.com/archives/guide-to-semantic-mark-up/</link>
		<comments>http://blue-anvil.com/archives/guide-to-semantic-mark-up/#comments</comments>
		<pubDate>Tue, 22 Aug 2006 14:17:27 +0000</pubDate>
		<dc:creator>Mike Jolley</dc:creator>
				<category><![CDATA[Accessibility, Standards & SEO]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[semantic]]></category>

		<guid isPermaLink="false">http://82.110.105.91/blue-anvil.co.uk/?p=18</guid>
		<description><![CDATA[Many people make the mistake of using tags for appearance only in their websites, but with semantics you get the benefit of describing your data as well. This makes it more accessible and of a higher quality, and of course fulfills the main objective; separating content from presentation. This article is aimed at semantic mark-up [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.blue-anvil.com/img/tag.jpg" class="floatleft" alt="Image of a tag" />Many people make the mistake of using tags for appearance only in their websites, but with semantics you get the benefit of describing your data as well. This makes it more accessible and of a higher quality, and of course fulfills the main objective; separating content from presentation.</p>
<p>This article is aimed at semantic mark-up beginners, including clients who want to learn more about code so they can ensure their sites are semantically correct. It also shows the mark-up available and it&#8217;s usage.</p>
<p><span id="more-18"></span><br />
<!--adsense--></p>
<h2>What is Semantic Mark-up</h2>
<p>In web development, Semantic Mark-up is the name given to &#8216;marking up&#8217; (coding) your sites with code that <em>represents the information contained</em> in elements, and is <em>descriptive</em>. More importantly, in my opinion, it makes <em>reading</em> code much, much easier because you can see and understand what is happening, rather that being swamped with meaningless code.</p>
<p>An example would be, say I wish to make an important point stand out by making it bold.<br />
I could use the &lt;b> tag, but as &#8216;b&#8217; says nothing about the content it holds it is not semantically correct, it simply tells the browser to render the text in bold.</p>
<p>The semantic way would be to use &lt;strong>, as it tell you that the contained code is important and &#8216;strong&#8217;.</p>
<p>Another example is &lt;i> for italic, it doesn&#8217;t explain what the content represents, however the &lt;em> tag does (<em>emphasis</em>).</p>
<p>Another aspect of semantics is using the correct tags for the correct content, for example, if I want to make a bulleted list I would use the &lt;ul> tag (unordered list). If I wanted to have a main heading I would use the &lt;h1> tag (heading 1).</p>
<h2>Why bother</h2>
<p>There are many valid reasons for making your mark-up semantic, rather than presentation based, here are the main points in my opinion.</p>
<h3>Ease of updating</h3>
<p>At some point you are going to want to update the look of your site, making your site semantic will make this task seriously simpler. Take this for example, say you have a site with many pages with lists of content on them, and you want to make the list items have uppercase text, but you have used presentational mark-up:</p>
<pre><code>&lt;p&gt;
-	list item&lt;/br&gt;
-	list item&lt;/br&gt;
-	list item
&lt;/p&gt; </code></pre>
<p>To do this you would have to go through all of your pages, updating the content to have upper case letters instead of lower. Ouch.</p>
<p>Now consider you used an unordered list:</p>
<pre><code>&lt;ul&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>Now you could convert to upper case with a simple line of CSS, without touching the mark-up itself.</p>
<pre><code>ul {text-transform: uppercase ;}</code></pre>
<p>Simple, separating content from presentation is definitely beneficial.</p>
<h3>Presentational mark-up is inaccessible</h3>
<p>Presentational mark-up does nothing to say what the content it holds is for. This can reduce understanding, and meaning, of the text.</p>
<p>You can look at this from a few different ways.</p>
<p>To someone reading the code, for example a web programmer, if a code is presentational it makes it very hard to make sense of. For example:</p>
<pre><code>&lt;font size=”14px” color=”#000”&gt;&lt;b&gt;Welcome to the site&lt;/b&gt;&lt;/font&gt;</code></pre>
<p>This would mean very little to anybody reading. What is the text for? What does it represent? The semantic, better way would be:</p>
<pre><code>&lt;h1&gt;Welcome to the site&lt;/h1&gt;</code></pre>
<p>Now it actually means something, it is a heading.</p>
<p>You can also see that in the above example the semantic code was much more organised and compact, and would make the file size lower.</p>
<h3>Computers understanding the content</h3>
<p><!--adsense#postad--></p>
<p>If a program wants to understand the code, presentational mark-up does little to help. Semantic mark-up however describes the content making it much easier and more meaningful to a program.</p>
<p>An example would be a screen reader program for the blind. They would not benefit from the presentation of an element, they would rely on <em>what the element is</em> to make sense of it, therefore semantics would be very important in that case.</p>
<p>You should also realise that search engines need to read you page, so by impoving your site&#8217;s semantics you are also improving your visibility to the search engines.</p>
<h3>Search engine optimisation</h3>
<p>Most search engines weight keyword importance by what they are e.g. paragraph text. By using semantics you are essentially telling the search engine what is important, and what is less important. For example, keywords in the headings are deemed more important than keywords in the paragraphs.</p>
<h2>Semantic elements – A guide</h2>
<p>This section describes and lists common elements, and what they should be used for in web documents.</p>
<h2>Block-level elements</h2>
<p>Block level elements usually render on a new line, and can contain inline elements and other block elements.</p>
<h3>Headings</h3>
<p>The heading elements (h1, h2, h3 and so on) should be used for headings in your document.<br />
As the heading number increases, the importance of the heading is reduced.</p>
<p>As a general rule, it is wise to use &lt;h1> once, for the main page title, then use h2 and possibly h3 for the page headings.<br />
But remember, what ever you do, keep it consistent.</p>
<h3>Paragraphs</h3>
<p>Paragraphs of text should always be wrapped in the paragraph (&lt;p>) tag. The &#8216;p&#8217; tag. By default, starts on a new line, so this is the correct method of making paragraphs; <strong>do not</strong> use the &lt;br /> element to do the same thing, as this is not semantic. Example:</p>
<p><strong>Correct usage:</strong></p>
<pre><code>&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit. Cras iaculis aliquet augue.&lt;/p&gt;
&lt;p&gt;Quisque lacus velit, tempus at, faucibus eget, lacinia id, libero. Duis aliquam, eros a consequat imperdiet, sapien ante ullamcorper sapien, id venenatis lacus augue in lorem.&lt;/p&gt;</code></pre>
<p><em>Output:</em></p>
<div class="example">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit. Cras iaculis aliquet augue.</p>
<p>Quisque lacus velit, tempus at, faucibus eget, lacinia id, libero. Duis aliquam, eros a consequat imperdiet, sapien ante ullamcorper sapien, id venenatis lacus augue in lorem.</p>
</div>
<p><strong>Incorrect usage:</strong></p>
<pre><code>&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit. Cras iaculis aliquet augue. &lt;br /&gt;Quisque lacus velit, tempus at, faucibus eget, lacinia id, libero. Duis aliquam, eros a consequat imperdiet, sapien ante ullamcorper sapien, id venenatis lacus augue in lorem.&lt;/p&gt;</code></pre>
<p><em>Output: </em></p>
<div class="example">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit. Cras iaculis aliquet augue.<br />
Quisque lacus velit, tempus at, faucibus eget, lacinia id, libero. Duis aliquam, eros a consequat imperdiet, sapien ante ullamcorper sapien, id venenatis lacus augue in lorem.</p>
</div>
<p>They make look the same, but the 2nd is not semantically correct, and also does not separate content from presentation, as you are forcing the presentation to be changed with a &#8216;break&#8217;.</p>
<h3>Blockquote</h3>
<p><em>Quotation</em></p>
<p>Used, usually along with &#8216;cite&#8217;, to quote a source of information. By default, the block quote element is displayed as a block level element, and has margins/indentation.</p>
<p>Blockquote can also have the attributes <em>title</em> and <em>cite</em>. Even though it has a &#8216;cite&#8217; attribute, not many browsers use this, so it is wise to use the &#8216;cite&#8217; element with it also, so the source is visible. </p>
<p>
<strong>Example:</strong></p>
<pre><code>&lt;blockquote cite="http://www.source.com"&gt;
&lt;p&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;&lt;a href=" http://www.source.com "&gt;http://www.source.com &lt;/a&gt;&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;	</code></pre>
<p>
<em>Output:</em></p>
<blockquote cite="http://www.source.com">
<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus libero felis, iaculis vitae, elementum id, laoreet sit amet, elit.</p>
<p><cite><a href=" http://www.source.com ">http://www.source.com </a></cite></p>
</blockquote>
<h2>Inline Elements</h2>
<p>Inline elements can usually only contain text, and other inline elements. They do not begin on a new line, like block elements.<br />
I will outline the most common elements, with alternatives for use if you just want to change style; do not use these tags if you are just after the styling and not the meaning of the tag.</p>
<h3>Abbr </h3>
<p style="margin-bottom:0.1em;"><abbr title="abbreviated text">abbreviated text</abbr></p>
<p>The &#8216;abbr&#8217; tag is used to mark-up abbreviations, and by using its &#8216;title&#8217; attribute you can display the full meaning as a tool tip.</p>
<h3>Acronym </h3>
<p style="margin-bottom:0.1em;"><acronym title="acronym">acronyms</acronym></p>
<p>The acronym tag works in exactly the same way as the abbr tag, but is specifically for acronyms.</p>
<h3>Cite </h3>
<p style="margin-bottom:0.1em;"><cite>Citation</cite></p>
<p>Used for referencing a source of information.</p>
<h3>Code </h3>
<p style="margin-bottom:0.1em;"><code>Computer code</code></p>
<p>The code tag should be used when displaying an extract of code, by default some browsers render it in a mono-space font such as courier.</p>
<h3>Del </h3>
<p style="margin-bottom:0.1em;"><del>Deleted</del></p>
<p>If you delete, or retract, some text on your page, but still want it visible, you should use the &#8216;del&#8217; tag. By default, most browsers show deleted text with a strike-through.</p>
<p>Del can also be a block-level element.</p>
<p>Alternative: &lt;s> or &lt;strike> &#8211; strikethrough tag (deprecated), alternatively use CSS &#8211; text-decoration: line-through;</p>
<h3>DFN</h3>
<p style="margin-bottom:0.1em;"><dfn>Definition Term</dfn></p>
<p>The &#8216;definition term&#8217; tag is quite uncommon, but is used for defining a term for the first time in a document. It can be used with the title attribute to define its contents. </p>
<p><strong>Example:</strong></p>
<pre><code>&lt;dfn title="Opera's web browser"&gt;Opera&lt;/dfn&gt; is available on desktop pc's and mobile devices.</code></pre>
<p><em>Output:</em></p>
<div class="example">
<p><dfn title="Opera's web browser">Opera</dfn> is available on desktop pc&#8217;s and mobile devices.</p>
</div>
<h3>EM </h3>
<p style="margin-bottom:0.1em;"><em>Emphasis</em></p>
<p>Used for emphasising the text inside. By default the emphasised text is represented with an italic style.</p>
<p>Alternative: CSS &#8211; font-style: italic ;</p>
<h3>Ins </h3>
<p style="margin-bottom:0.1em;"><ins>Inserted text</ins></p>
<p>This tag can be used to identify text you have inserted at a later date, and is especially useful when using along with the &#8216;del&#8217; tag, so show what you have replaced the deleted text with.</p>
<p>Ins can also be a block-level element.</p>
<h3>Kbd </h3>
<p style="margin-bottom:0.1em;"><kbd>Keyboard instructions</kbd></p>
<p>This tag is for marking up keyboard instructions for the user to perform.</p>
<h3>Samp </h3>
<p style="margin-bottom:0.1em;"><samp>Sample output</samp></p>
<p>This rarely used tag is for marking up sample output from a program/script, for example an error message in windows.</p>
<h3>Var </h3>
<p style="margin-bottom:0.1em;"><var>Variable</var></p>
<p>The &#8216;var&#8217; tag can be used to indicate a variable name when writing about computer code.</p>
<p><strong>Example:</strong></p>
<pre><code>The users name is stored in &lt;var&gt;$name&lt;/var&gt;.</code></pre>
<p><em>Output:</em></p>
<div class="example">
<p>The users name is stored in <var>$name</var>.</p>
</div>
<h3>Strong</h3>
<p style="margin-bottom:0.1em;"><strong>Stronger emphasis</strong></p>
<p>Used for a stronger emphasis on the text inside. By default the &#8216;strong&#8217; text is represented with a bold styling.</p>
<p>Alternative: CSS &#8211; font-weight: bold;</p>
<h2>Lists</h2>
<p>There are three types of lists:</p>
<dl>
<dt>UL</dt>
<dd>Unordered lists, a.k.a bulleted lists. Use these when your list doesn&#8217;t need to be numbered. List items in the unordered list are specified with the &#8216;li&#8217; tag. A popular usage is with navigation links, as they are listed in a ul (and usually styled with css). The blue anvil navigation bar is a UL.</dd>
<dt>OL</dt>
<dd>Ordered lists, a.k.a numbered lists. Use this when you want list items (defined again by &#8216;li&#8217;) to be numbered.</dd>
<dt>DL</dt>
<dd>Definition lists. These use the tags &#8216;DL&#8217; (Definition list), &#8216;DT&#8217; (Definition term), and &#8216;DD&#8217; (definition description), and are used to show terms and definitions. The list you are currently reading is a definition list! See below for the code.</dd>
</dl>
<h3>Definition list example</h3>
<pre><code>&lt;dl&gt;
&lt;dt&gt;Term&lt;/dt&gt;
&lt;dd&gt;Term definition.&lt;/dd&gt;
&lt;dt&gt;Another term&lt;/dt&gt;
&lt;dt&gt;Another term&lt;/dt&gt;
&lt;dd&gt;Definition for both terms above.&lt;/dd&gt;
&lt;/dl&gt;</code></pre>
<p><em>Output:</em>
</p>
<dl>
<dt>Term</dt>
<dd>Term definition.</dd>
<dt>Another term</dt>
<dt>Another term</dt>
<dd>Definition for both terms above.</dd>
</dl>
<h3>Ordered list example</h3>
<pre><code>&lt;ol&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;/ol&gt;</code></pre>
<p><em>Output</em></p>
<ol>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ol>
<h3>Unordered list example</h3>
<pre><code>&lt;ul&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p><em>Output</em></p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
<h2>Basic Semantic examples</h2>
<h3>Code listing Example</h3>
<p>If you wanted to show some code on your web page, to do it semantically you could do the following.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;code&gt;$name = 'Bob'; $name.=' Smith';&lt;/code&gt;
When you echo &lt;var&gt;$name&lt;/var&gt; it will display &lt;samp&gt;Bob Smith&lt;/samp&gt;.</pre></div></div>

<p><strong>Example Output</strong></p>
<div class="example">
<code>$name = 'Bob'; $name.=' Smith';</code><br />
When you echo <var>$name</var> it will display <samp>Bob Smith</samp>.</div>
<p>As you can see, the code is easy to read and is clearly labelled, even if the difference to the presentation is minimal.</p>
<h3>Navigation bar example</h3>
<p>A well laid out navigation would look like the following:</p>
<pre><code>&lt;ul id=”navexample”&gt;

&lt;li&gt;&lt;a href="http://www.blue-anvil.com/index.php" &gt;Journal&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.blue-anvil.com/services” &gt;Services&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.blue-anvil.com/contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;

&lt;/ul&gt;</code></pre>
<p>Un-styled, this mark-up will output like this:</p>
<ul>
<li><a href="http://www.blue-anvil.com/index.php" >Journal</a></li>
<li><a href="http://www.blue-anvil.com/services" >Services</a></li>
<li><a href="http://www.blue-anvil.com/contact">Contact</a></li>
</ul>
<p>The list based navigation could then be styled via CSS to change the look, read on for more information.</p>
<h2>CSS the holy grail</h2>
<p>So far this article has focussed on the mark-up of the web page, but it doesn&#8217;t end there. Now you know how to write a solid base for a page, you can style the presentation using the power of CSS. This section has some examples.</p>
<h3>How to style an element</h3>
<p>To style an element, just put the element name in your css document and add styles, for example, have you noticed my &#8216;code&#8217; elements?</p>
<pre><code>Code goes here</code></pre>
<p>To achieve this effect, I have the following in the style sheet:</p>
<pre><code>code{ styles go here }</code></pre>
<p>This applies to all of the semantic tags, style as you please!</p>
<h2>Closing statement</h2>
<p>I hope this article has helped give you an insight into the world of semantics, and that the points raised benefit you web site&#8217;s design.</p>
<p>Feel free to leave any comments related to this article!</p>
<h2>Further Reading</h2>
<p>I recommend DesignBits  “<a href="http://designbit.co.uk/2006/08/25/create-a-semantic-web-page/">Create a Semantic web page</a>” as a good follow up to this article.</p>
<img src="http://blue-anvil.com/7dc46085/266bbf6b/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blue-anvil.com/archives/guide-to-semantic-mark-up/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
