<?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>ZENVERSE &#187; xhtml</title>
	<atom:link href="http://zenverse.net/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenverse.net</link>
	<description>Design and Web Development</description>
	<lastBuildDate>Sun, 13 May 2012 15:26:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>5 Common xHTML Validation Errors</title>
		<link>http://zenverse.net/5-common-xhtml-validation-errors/</link>
		<comments>http://zenverse.net/5-common-xhtml-validation-errors/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:37:44 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=1462</guid>
		<description><![CDATA[You can validate your website using this <a target="_blank" rel="nofollow" href="http://validator.w3.org/">validation service</a>. Recently I have updated all my free wordpress themes to be 100% xhtml valid. After validating each of them, I found that there were some common errors...]]></description>
			<content:encoded><![CDATA[<p>You can validate your website using this <a target="_blank" rel="nofollow" href="http://validator.w3.org/">validation service</a>. If you are using Opera, validating a website is just one click away : Right Click -> Validate. </p>
<p>Recently I have updated all my free wordpress themes to be 100% xhtml valid. After validating each of them, I found that there were some common errors, which can be solved by:</p>
<h3>1. Adding alternate text to &lt;img> tags</h3>
<p>This is also known for improving your site&#8217;s SEO. Whenever you use &lt;img> tags you have to add an alternate text. If you do not have alernate text to add, at least leave it empty like this alt=&quot;&quot;</p>
<p>Invalid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code1'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14621"><td class="code" id="p1462code1"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;&quot; /&gt;</pre></td></tr></table></div>

<p>Valid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code2'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14622"><td class="code" id="p1462code2"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;&quot; alt=&quot;&quot; /&gt;</pre></td></tr></table></div>

<h3>2. Closing self-closing tags</h3>
<p>Tags like &lt;img> , &lt;br> , &lt;meta> need to be self-closed.</p>
<ul>
<li>&lt;img> -> &lt;img /></li>
<li>&lt;br> -> &lt;br /></li>
<li>&lt;meta> -> &lt;meta /></li>
</ul>
<p>Some other self-closing tags are:</p>
<ul>
<li>&lt;area /></li>
<li>&lt;base /></li>
<li>&lt;basefont /></li>
<li>&lt;hr /></li>
<li>&lt;input /></li>
<li>&lt;link /></li>
</ul>
<h3>3. Do not use uppercase in tags</h3>
<p>One example, the meta verification tag given by <a target="_blank" rel="nofollow" href="http://siteexplorer.search.yahoo.com/">Yahoo! Site Explorer</a> (Yahoo webmaster tool) is always in uppercase and not self-closed, which make my page invalid.</p>
<p>You have to manually change the word &#8220;meta&#8221; to lowercase and self-close the meta tag.</p>
<p>Given by Yahoo! &#8211; invalid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code3'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14623"><td class="code" id="p1462code3"><pre class="html" style="font-family:monospace;">&lt;META name=&quot;y_key&quot; content=&quot;xxxx&quot; &gt;</pre></td></tr></table></div>

<p>Edited to make it valid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code4'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14624"><td class="code" id="p1462code4"><pre class="html" style="font-family:monospace;">&lt;meta name=&quot;y_key&quot; content=&quot;xxxx&quot; /&gt;</pre></td></tr></table></div>

<h3>4. Validating inline javascript</h3>
<p>If you have javascript codes in your page, you have to make it valid as follow:</p>
<p>Invalid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code5'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14625"><td class="code" id="p1462code5"><pre class="html" style="font-family:monospace;">I will output &quot;Hello world!&quot; using javascript.&lt;br /&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
document.write('Hello world!');
&lt;/script&gt;</pre></td></tr></table></div>

<p>Valid</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?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1462code6'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14626"><td class="code" id="p1462code6"><pre class="html" style="font-family:monospace;">I will output &quot;Hello world!&quot; using javascript.&lt;br /&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
document.write('Hello world!');
//]]&gt;
&lt;/script&gt;</pre></td></tr></table></div>

<p>By adding cdata tag, you can make your inline javascript codes to be valid. If your javascript loaded from external js file, it will not make your page invalid so you do not have to worry about that.</p>
<h3>5. Validating video/embed codes such as youtube video</h3>
<p>By default, the embed codes given by youtube are not xhtml valid. </p>
<p>To make it valid, you can refer to <a target="_blank" href="http://zenverse.net/embed-youtube-videos-tips-xhtml-validation/">the guide</a> I wrote on last month.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/5-common-xhtml-validation-errors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

