<?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>MaggsWeb:7 &#187; HTML</title>
	<atom:link href="http://www.maggsweb.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maggsweb.com</link>
	<description>www.maggsweb.com</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:50:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>prevent caching of files</title>
		<link>http://www.maggsweb.com/php/prevent-caching-of-files/</link>
		<comments>http://www.maggsweb.com/php/prevent-caching-of-files/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 09:59:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>

		<guid isPermaLink="false">http://www.maggsweb.com/?p=1259</guid>
		<description><![CDATA[Version them in their with their timestamp. This way, when they change, the link will change and the browser will reload the sitemap&#8230; Otherwise it will be fine to be cached as it wont have changed. ?View Code HTML&#160; &#60;link type='text/css' src='/styles/styles.css?v=&#60;?=filemtime(DOC_ROOT.&#34;/styles_ie.css&#34;)?&#62;' /&#62;]]></description>
			<content:encoded><![CDATA[<p>Version them in their
<link> with their timestamp.  This way, when they change, the link will change and the browser will reload the sitemap&#8230;   Otherwise it will be fine to be cached as it wont have changed.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1259code2'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12592"><td class="code" id="p1259code2"><pre class="html" style="font-family:monospace;">&nbsp;
&lt;link type='text/css' src='/styles/styles.css?v=&lt;?=filemtime(DOC_ROOT.&quot;/styles_ie.css&quot;)?&gt;' /&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/php/prevent-caching-of-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML to XHTML</title>
		<link>http://www.maggsweb.com/miscellaneous/html-to-xhtml/</link>
		<comments>http://www.maggsweb.com/miscellaneous/html-to-xhtml/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 11:35:42 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.maggsweb.com/?p=645</guid>
		<description><![CDATA[Here's a quick check list of the important requirements of XHTML and the differences between it and HTML.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick check list of the important requirements of XHTML and the differences between HTML and XHTML.<br />
<span id="more-645"></span><br />
This is NOT a comprehensive XHTML language reference.</p>
<h2>All tags, attributes and values must be written in lowercase.</h2>
<p>Right: &lt;a href=&#8221;www.kilroyjames.co.uk&#8221; &gt;<br />
Wrong:  &lt;A HREF=&#8221;www.kilroyjames.co.uk&#8221; &gt;</p>
<h2>All attribute values must be within quotes</h2>
<p>Right: &lt;a href=&#8221;www.kilroyjames.co.uk&#8221; &gt;<br />
Wrong: &lt;a href=www.kilroyjames.co.uk &gt;</p>
<h2>All tags must be properly nested</h2>
<p>Right: &lt;em&gt;this emphasis just keeps getting &lt;strong&gt;stronger and stronger&lt;/strong&gt;&lt;/em&gt;<br />
Wrong: &lt;em&gt;this emphasis just keeps getting &lt;strong&gt;stronger and stronger&lt;/em&gt;&lt;/strong&gt;</p>
<h2>All XHTML documents must carry a DOCTYPE definition</h2>
<p>The DOCTYPE is an intimidating looking piece of code that must appear at the start of every XHTML document, it tells the browser how to render the document.</p>
<h3>Rules for the DOCTYPE tag:</h3>
<p>* It must be the first tag in the document<br />
* The DOCTYPE is not actually part of the XHTML document so don&#8217;t add a closing slash<br />
* It should point to a valid definition file called a DTD that tells the browser how to read the document<br />
* You must write the DOCTYPE tag correctly otherwise your document will explode (into little pieces of HTML called &#8220;tag soup&#8221;) and be unvalidatable.</p>
<p>There are three types of valid XHTML 1.0 document: Strict, Transitional, and Frameset. If you can get your document to validate with &#8220;Strict&#8221; then do so, however some legacy tags and attributes aren&#8217;t allowed in Strict so you can use &#8220;Transitional&#8221; instead.</p>
<p>Note also that using a Transitional DTD takes most browsers out of &#8220;Standards&#8221; mode. It is much trickier to get your web pages to look consistent across different browsers when the browsers are not in Standards mode. I&#8217;m not going to explain the minutae of the DOCTYPE tag as it gets deeper and more complicated, just know that for best results you should use one of the following, preferably the first one (Strict):</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<h2>The HTML tag must contain an XMLNS attribute</h2>
<p>You don&#8217;t need to understand the &#8220;XML namespace&#8221; attribute, except to know that it is required in all XHTML documents. Here is an example of how to write it:</p>
<p>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;</p>
<h2>Documents must be properly formed with HTML, HEAD, TITLE and BODY tags</h2>
<p>In HTML it is possible to write a webpage that contains none of the above tags; in XHTML it is not. The above tags must be included and they must be nested and ordered correctly, as follows (the DOCTYPE has been omitted):</p>
<p>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;p&gt;<br />
See how the TITLE must be placed in the document HEAD – the TITLE is considered<br />
to be a &#8220;required child&#8221; element of the HEAD.<br />
Notice that the HEAD must also appear before the document BODY.<br />
Notice also how both the HEAD and the BODY must be contained<br />
within the HTML tag. Again, HEAD and BODY are &#8220;required child&#8221;<br />
elements of the HTML tag. Finally, notice that this text is<br />
written within a &lt;p&gt;paragraph&lt;/p&gt; tag; in XHTML you may<br />
not write text directly in the BODY tag without using a suitable<br />
container tag, such as &lt;p&gt; or &lt;div&gt;.<br />
&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<h2>All tags must be closed, even single tags</h2>
<p>Wrong:</p>
<p>&lt;p&gt;Mary had a little lamb<br />
&lt;p&gt;It&#8217;s fleece was white as snow</p>
<p>Right:</p>
<p>&lt;p&gt;Mary had a little lamb&lt;/p&gt;<br />
&lt;p&gt;It&#8217;s fleece was white as snow&lt;/p&gt;</p>
<h2>In XHTML even single tags have to be closed &#8211; absolutely NO tag may be left open.</h2>
<p>Wrong:&lt;p&gt;Mary had a little lamb &lt;br&gt;It&#8217;s fleece was white as snow&lt;/p&gt;</p>
<p>Right: &lt;p&gt; Mary had a little lamb &lt;br/&gt; It&#8217;s fleece was white as snow&lt;/p&gt;</p>
<h2>Attribute minimisation isn&#8217;t allowed</h2>
<p>In HTML, attributes can be strung together almost like they were keywords, ie. &lt;dl compact&gt;, this is called attribute minimisation. In XHTML that is not allowed, attributes and values must be excplicit, ie.</p>
<p>&lt;dl compact=&#8221;compact&#8221;&gt;</p>
<h2>ID and NAME attributes</h2>
<p>In HTML it was legal to use ID and NAME attributes interchangeably. In XHTML the NAME attribute is formally deprecated and cannot be used. In all cases where you would think to use a NAME attribute you must now use ID instead. e.g.</p>
<p>Correct HTML: &lt;input type=&#8221;submit&#8221; name=&#8221;s&#8221; value=&#8221; Search &#8221; &gt;</p>
<p>Correct XHTML:&lt;input type=&#8221;submit&#8221; id=&#8221;s&#8221; value=&#8221; Search &#8221; /&gt;</p>
<h2>STYLE is all in your HEAD</h2>
<p>XHTML does not allow STYLE or SCRIPT declarations within the body of a document they must be placed in the document HEAD instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/miscellaneous/html-to-xhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL rewriting &#8211; WordPress style</title>
		<link>http://www.maggsweb.com/html/url-rewriting-wordpress-style/</link>
		<comments>http://www.maggsweb.com/html/url-rewriting-wordpress-style/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 13:17:40 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.maggsweb.com/?p=480</guid>
		<description><![CDATA[Add this into your .htaccess file&#8230; ?View Code APACHERewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 The first RewriteCond checks if the requested URL exists as a file on the filesystem. In mod_rewrite, -f refers to a file, while the bang is the &#8220;not&#8221; operator. Therefore, !-f means &#8220;if the request script [...]]]></description>
			<content:encoded><![CDATA[<p>Add this into your .htaccess file&#8230;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p480code4'); return false;">View Code</a> APACHE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4804"><td class="code" id="p480code4"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteCond</span> %{SCRIPT_FILENAME} !-f
<span style="color: #00007f;">RewriteCond</span> %{SCRIPT_FILENAME} !-d
<span style="color: #00007f;">RewriteRule</span> ^(.*)$ index.php/$<span style="color: #ff0000;">1</span></pre></td></tr></table></div>

<p><span id="more-480"></span><br />
The first <b>RewriteCond</b> checks if the requested URL exists as a file on the filesystem. In <b>mod_rewrite</b>, <b>-f</b> refers to a file, while the bang is the &#8220;not&#8221; operator. Therefore, <b>!-f</b> means &#8220;if the request script filename does not exist as a file&#8221;.</p>
<p>If the first <b>rewrite_cond</b> succeeds (that is, the requested file wasn&#8217;t found), then Apache moves on to the next condition. The <b>!-d</b> directive means it the condition succeeds if the requested script does correspond to an existing directory on the server.</p>
<p>Finally, if both conditions succeed, the request is forwarded to the <b>index.php</b> file, as specified in the <b>RewriteRule</b> directive.</p>
<p>You can now access request POST data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/url-rewriting-wordpress-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catching a keyPress..</title>
		<link>http://www.maggsweb.com/html/catching-a-keypress/</link>
		<comments>http://www.maggsweb.com/html/catching-a-keypress/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 10:51:33 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=291</guid>
		<description><![CDATA[&#8230;like &#8216;Enter&#8217; for instance. ?View Code JAVASCRIPTfunction handleEnter (field, event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { //do something, eg: submitForm(); } else { return true; } }]]></description>
			<content:encoded><![CDATA[<p>&#8230;like &#8216;Enter&#8217; for instance.</p>
<p><span id="more-291"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p291code6'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2916"><td class="code" id="p291code6"><pre class="javascript" style="font-family:monospace;">function handleEnter (field, event) {
  var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
  if (keyCode == 13) { 
        //do something, eg:
	submitForm();
  } else {
   return true;
  }
}</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/catching-a-keypress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Print a Page, or Print a Section</title>
		<link>http://www.maggsweb.com/html/print-a-page-or-print-a-section/</link>
		<comments>http://www.maggsweb.com/html/print-a-page-or-print-a-section/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 10:08:31 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=289</guid>
		<description><![CDATA[This is another functionality that I have been looking or for a while. I haven&#8217;t tried it yet, but intend to add this to my default toolbox! I am sticking it here for now &#8211; and will update this when I have used it. ?View Code JAVASCRIPT&#160; function printPageComponent() { html = '&#60;div id=&#34;print-page&#34;&#62;'; html [...]]]></description>
			<content:encoded><![CDATA[<p>This is another functionality that I have been looking or for a while.  I haven&#8217;t tried it yet, but intend to add this to my default toolbox!  I am sticking it here for now &#8211; and will update this when I have used it.</p>
<p><span id="more-289"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p289code8'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2898"><td class="code" id="p289code8"><pre class="javascript" style="font-family:monospace;">&nbsp;
function printPageComponent() {
  html  = '&lt;div id=&quot;print-page&quot;&gt;';
  html += '  &lt;input class=&quot;button&quot; \n';
  html += '         id=&quot;print-page-button&quot; \n';
  html += '         onclick=&quot;window.print();&quot; \n';
  html += '         onmouseup=&quot;this.blur();&quot; \n';
  html += '         title=&quot;Print the current page.&quot; \n';
  html += '         type=&quot;button&quot; \n';
  html += '         value=&quot;Print this page&quot;';
  html += '   /&gt;';
  html += '&lt;/div&gt;';
  return html;
}
&nbsp;
function printPageLink() {
  html  = &quot;&lt;span id=\&quot;component-box-print-link\&quot; \n&quot;;
  html += &quot;      class=\&quot;button\&quot;\n&quot;;
  html += &quot;      onclick=\&quot;window.print();\&quot;&gt;\n&quot;;
  html += &quot;Print this page&quot;;
  html += &quot;&lt;/span&gt;&quot;;
  return html;
}</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/print-a-page-or-print-a-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-browser bookmark link</title>
		<link>http://www.maggsweb.com/html/cross-browser-bookmark-link/</link>
		<comments>http://www.maggsweb.com/html/cross-browser-bookmark-link/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 09:56:56 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=284</guid>
		<description><![CDATA[&#8216;Bookmark Me&#8217; is a sort of IE thing and doesn&#8217;t usually work in FireFox, Safari, Chrome, etc.. so as a FireFox user I&#8217;ve never bothered with a bookmark links before. FireFox users know that Ctrl+D is the shortcut for these browsers, and that most &#8216;Bookmark Me&#8217; links just aren&#8217;t work clicking &#8211; as they won&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>&#8216;Bookmark Me&#8217; is a sort of IE thing and doesn&#8217;t usually work in FireFox, Safari, Chrome, etc.. so as a FireFox user I&#8217;ve never bothered with a bookmark links before.<br />
FireFox users know that Ctrl+D is the shortcut for these browsers, and that most &#8216;Bookmark Me&#8217; links just aren&#8217;t work clicking &#8211; as they won&#8217;t work.</p>
<p>And then I found this&#8230;</p>
<p><span id="more-284"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code10'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p28410"><td class="code" id="p284code10"><pre class="javascript" style="font-family:monospace;">&nbsp;
function bookmarkIt(){
if(document.all){
   window.external.AddFavorite(location.href,document.title);
   }
else if(window.sidebar){
   window.sidebar.addPanel(document.title,location.href,'');
   }
}</pre></td></tr></table></div>

<p>&#8230;although I haven&#8217;t actually used it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/cross-browser-bookmark-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickering images inside &lt;a&gt;&#8217;s</title>
		<link>http://www.maggsweb.com/html/flickering-images-inside-links/</link>
		<comments>http://www.maggsweb.com/html/flickering-images-inside-links/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 15:18:48 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=278</guid>
		<description><![CDATA[In IE6 and sometimes in IE7 the background images flicker if they’re also an &#60;a&#62;.  A small edition to .htaccess overrides the browsers default to load the backgrounds every time. ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 Reqires mod_expire on an Apache server (most have it).]]></description>
			<content:encoded><![CDATA[<p>In IE6 and sometimes in IE7 the background images flicker if they’re also an &lt;a&gt;.  A small edition to .htaccess overrides the browsers default to load the backgrounds every time.</p>
<p><span id="more-278"></span></p>
<pre>
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
</pre>
<p>Reqires mod_expire on an Apache server (most have it).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/flickering-images-inside-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Error redirects with .htaccess</title>
		<link>http://www.maggsweb.com/html/custom-error-redirects/</link>
		<comments>http://www.maggsweb.com/html/custom-error-redirects/#comments</comments>
		<pubDate>Thu, 07 May 2009 12:37:55 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=238</guid>
		<description><![CDATA[Cold hard website errors are horrible and unnecessary. All you need is a few nice looking .html files in your directory somewhere, then use .htaccess to reditrect to these when there is an error. Obviously, no errors at all would be better&#8230;. The format for the .htaccess is : ErrorDocument errornumber /file.html For example, if [...]]]></description>
			<content:encoded><![CDATA[<p>Cold hard website errors are horrible and unnecessary.  All you need is a few nice looking .html files in your directory somewhere, then use .htaccess to reditrect to these when there is an error.  Obviously, no errors at all would be better&#8230;. <img src='http://www.maggsweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<span id="more-238"></span><br />
The format for the .htaccess is :</p>
<p><strong>ErrorDocument errornumber /file.html</strong></p>
<p>For example,  if the file notfound.html was in the root directory of my site and I wanted to use it for a 404 error I would use:</p>
<p><strong>ErrorDocument 404 /notfound.html</strong></p>
<p>If the file is not in the root directory of your site, you just need to put the path to it:</p>
<p><strong>ErrorDocument 500 /errorpages/500.html</strong></p>
<p>These are some of the most common errors:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p238code12'); return false;">View Code</a> APACHE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23812"><td class="code" id="p238code12"><pre class="apache" style="font-family:monospace;"><span style="color: #ff0000;">401</span> - Authorization Required
<span style="color: #ff0000;">400</span> - Bad request
<span style="color: #ff0000;">403</span> - Forbidden
<span style="color: #ff0000;">500</span> - Internal Server Error
<span style="color: #ff0000;">404</span> - Wrong page</pre></td></tr></table></div>

<p>and they can all be redirected to the same page, different pages, or even a dynamic page&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/custom-error-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shortcut Icon (favicon.ico)</title>
		<link>http://www.maggsweb.com/html/shortcut-icon-faviconico/</link>
		<comments>http://www.maggsweb.com/html/shortcut-icon-faviconico/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:45:55 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=214</guid>
		<description><![CDATA[In short, a 16x16px bitmap, renamed, in the web root. Or is it? This minimal approach does actually work, but done properly, they should have a few different size versions in the same file, so that not only do they show in the URL bar, and now more recently in the tabs as well (IE8+, [...]]]></description>
			<content:encoded><![CDATA[<p>In short, a 16x16px bitmap, renamed, in the web root.  Or is it?  </p>
<p>This minimal approach does actually work, but done properly, they should have a few different size versions in the same file, so that not only do they show in the URL bar, and now more recently in the tabs as well (IE8+, FF3+), but also display a different (clearer) version when dragged to the desktop.<br />
<span id="more-214"></span><br />
I have been using an online tool for a few years to make mine and it&#8217;s great.<br />
<a href="http://tools.dynamicdrive.com/favicon/" target='_new' onclick="pageTracker._trackPageview('/outgoing/tools.dynamicdrive.com/favicon/?referer=');">http://tools.dynamicdrive.com/favicon/</a><br />
Try and use the best format that you have, but MAKE IT SQUARE first, otherwise it will get squashed.</p>
<p>Use this code to in the &lt;head&gt; section to add it..</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p214code14'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21414"><td class="code" id="p214code14"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;shortcut icon&quot;
      href=&quot;favicon.ico&quot;
      type=&quot;image/x-icon&quot;&gt;
&lt;link rel=&quot;icon&quot; href=&quot;favicon.ico&quot; /&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/html/shortcut-icon-faviconico/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search, with no click</title>
		<link>http://www.maggsweb.com/php/search-with-no-click/</link>
		<comments>http://www.maggsweb.com/php/search-with-no-click/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 08:17:12 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://tech.maggsweb.co.uk/?p=188</guid>
		<description><![CDATA[How do you style a search button?  They all look crap to me, and the default browser ones are all different.  So, my solution is to get rid of it.  Gone.  No button.    Heres how&#8230;]]></description>
			<content:encoded><![CDATA[<p>How do you style a search button?  They all look crap to me, and the default browser ones are all different.  So, my solution is to get rid of it.  Gone.  No button.    Heres how&#8230;</p>
<p><span id="more-188"></span></p>
<pre>
<?php $search_text = 'Search MaggsWeb'; ?>
<form id="searchForm" action="search-results.php" method="GET">
<input name="q" type="text" class="inputBox searchBox"
value="<?php echo $search_text; ?>"
onblur="if (this.value == '')  { this.value = '<?php echo $search_text; ?>'; }"
onfocus="if (this.value == '<?php echo $search_text; ?>')  { this.value = ''; }"
/>
<input type="hidden" id="searchsubmit" />
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.maggsweb.com/php/search-with-no-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

