<?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>MattAustin.me.uk &#187; xhtml</title> <atom:link href="http://mattaustin.me.uk/category/xhtml/feed/" rel="self" type="application/rss+xml" /><link>http://mattaustin.me.uk</link> <description>Python, Django, open source, Linux, and other internet shenanigans</description> <lastBuildDate>Sun, 03 Jun 2012 07:20:41 +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>Serving the Correct MIME Type for XHTML</title><link>http://mattaustin.me.uk/2006/11/serving-the-correct-mime-type-for-xhtml/</link> <comments>http://mattaustin.me.uk/2006/11/serving-the-correct-mime-type-for-xhtml/#comments</comments> <pubDate>Tue, 31 Oct 2006 16:00:47 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[xhtml]]></category> <guid
isPermaLink="false">http://mattaustin.me.uk/?p=216</guid> <description><![CDATA[&#34;Work In Progess&#34; This article is work in progress. It will be expanded upon and become more reader friendly &#8211; at the moment it is just a brief list of my ideas. This is a topic of much debate, but I have decided on my strategy. XHTML has a much stricter markup than using HTML [...]]]></description> <content:encoded><![CDATA[<h2>&quot;Work In Progess&quot;</h2><p>This article is <strong>work in progress</strong>. It will be expanded upon and become more reader friendly &#8211; at the moment it is just a brief list of my ideas.</p><p>This is a topic of much debate, but I have decided on my strategy.</p><ul><li>XHTML has a much stricter markup than using HTML 4. This is one of the most appealing aspects of using it. If you decide to use it you must abide by the rules.</li><li>I wish to use XHTML, but also want it to be as compatible as possible with older browsers (if compatibility with really old browsers is of the <strong>utmost</strong> concern, you should probably stick to HTML 4.01 Strict).</li></ul><h2>Serving up XHTML:</h2><ul><li>Use XHTML 1.0 (Strict / Transitional). XHTML 1.0 <strong>should</strong> be served as <code>application/xhtml+xml</code>, however it <strong>may</strong> be served as <code>text/html</code>. Any version of XHTML later than 1.0 <strong>should not</strong> be served as <code>text/html</code>.</li><li>Serve as <code>application/xhtml+xml</code> to user agents which support it (e.g. Mozilla FireFox, Opera).</li><li>Serve as <code>text/html</code> to user agents which do not specify acceptance of <code>application/xhtml+xml</code>, but do accept <code>text/html</code> (e.g. Internet Explorer).</li><li>Serve as <code>application/xhtml+xml</code> (i.e. as it should be) to user agents which do not specify acceptance of <code>text/html</code> (e.g. the W3C Validator).</li><li>Using ASP.NET 2.0? See: <a
href="/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/" title="Article on Serving the Correct MIME Type for XHTML using ASP.NET 2.0">Serving the Correct MIME Type for XHTML using ASP.NET 2.0</a>.</li></ul><h2>Implications:</h2><ul><li>Use <code>UTF-8</code> character encoding.</li><li>Only add the <code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;</code> declaration if serving as <code>application/xhtml+xml</code>. It should normally be included, but is not required when using UTF-8. Because IE6 switches to &quot;quirks&quot; mode when this is included, omit when serving as <code>text/html</code>.</li><li>Only add the <code>&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;</code> element if serving as <code>text/html</code>.</li><li>Mark all <code>&lt;style&gt;</code> and <code>&lt;script&gt;</code> contents as CDATA (using the backwards-compatible method). See: <a
href="/2006/11/marking-script-and-style-as-cdata/" title="Article on Marking Script and Style as CDATA">Marking Script and Style as CDATA</a>.</li><li>Follow the XHTML 1.0 Appendix C HTML Compatibility Guidelines.</li><li>Stick to the 4 XHTML Safe Named Entities: <code>&amp;lt;</code> for &lt;, <code>&amp;gt;</code> for &gt;, <code>&amp;amp;</code> for &amp;, <code>&amp;quot;</code> for &quot;. <code>&amp;apos;</code> for &apos; is not supported in IE6. For this and all others use numbered entities (e.g. <code>&amp;#39;</code> for &apos;).</li><li>Check that all your JavaScript works. You can&#8217;t use <code>document.write()</code> or <code>innerHTML</code> (this is from my reading and is unchecked/tested).</li><li>Make sure you style the <code>&lt;html&gt;</code> element, as the <code>&lt;body&gt;</code> element doesn&#8217;t cover the entire viewpoint.</li><li>Validate, validate, validate! Make sure your XHTML is <strong>perfect</strong>, and that your pages work in a multitude of browsers.</li></ul> ]]></content:encoded> <wfw:commentRss>http://mattaustin.me.uk/2006/11/serving-the-correct-mime-type-for-xhtml/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Marking Script and Style as CDATA</title><link>http://mattaustin.me.uk/2006/11/marking-script-and-style-as-cdata/</link> <comments>http://mattaustin.me.uk/2006/11/marking-script-and-style-as-cdata/#comments</comments> <pubDate>Tue, 31 Oct 2006 16:00:39 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[xhtml]]></category> <guid
isPermaLink="false">http://mattaustin.me.uk/?p=227</guid> <description><![CDATA[When using XHTML, the contents of &#60;script&#62; and &#60;style&#62; elements must be marked as CDATA. This is essential when serving XHTML correctly (as application/xhtml+xml). When possible, use external script and style files and reference these from your XHTML document (behavioural and presentational separation). However, the examples below show how to place &#60;script&#62; and &#60;style&#62; inside [...]]]></description> <content:encoded><![CDATA[<p>When using <abbr
title="eXtensible HyperText Markup Language">XHTML</abbr>, the contents of <code>&lt;script&gt;</code> and <code>&lt;style&gt;</code> elements must be marked as CDATA. This is essential when <a
href="/2006/11/serving-the-correct-mime-type-for-xhtml/" title="Article on Serving the Correct MIME Type for XHTML">serving XHTML correctly</a> (as <code>application/xhtml+xml</code>).</p><p>When possible, use external script and style files and reference these from your <abbr
title="eXtensible HyperText Markup Language">XHTML</abbr> document (behavioural and presentational separation). However, the examples below show how to place <code>&lt;script&gt;</code> and <code>&lt;style&gt;</code> inside your <abbr
title="eXtensible HyperText Markup Language">XHTML</abbr> document correctly. This method should be compatible with older browsers, and therefore degrades gracefully.</p><h3>Marking <code>&lt;script&gt;</code> as CDATA:</h3><pre>
&lt;script type=&quot;text/javascript&quot;&gt;
  &lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
    ......
  //--&gt;&lt;!]]&gt;
&lt;/script&gt;
</pre><p></p><h3>Marking <code>&lt;style&gt;</code> as CDATA:</h3><pre>
&lt;style type=&quot;text/css&quot;&gt;
  &lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!-- */
    ......
  /*]]&gt;*/--&gt;
&lt;/style&gt;
</pre><p></p><h2>ASP.NET 2.0</h2><p>If you are serving ASP.NET pages as <code>application/xhtml+xml</code> (see <a
href="/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/" title="Article on Serving the Correct MIME Type for XHTML using ASP.NET 2.0">Serving the Correct MIME Type for XHTML using ASP.NET 2.0</a>), then the automatically generated JavaScript <strong>will not</strong> be marked as CDATA, and will therefore not work. For a workaround see: <a
href="/2006/11/marking-asp-net-2-0-generated-javascript-as-cdata/" title="Article on Marking ASP.NET 2.0 Generated JavaScript as CDATA">Marking ASP.NET 2.0 Generated JavaScript as CDATA</a>.</p> ]]></content:encoded> <wfw:commentRss>http://mattaustin.me.uk/2006/11/marking-script-and-style-as-cdata/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The Importance of Standards Compliance and Accessibility</title><link>http://mattaustin.me.uk/2006/11/the-importance-of-standards-compliance-and-accessibility/</link> <comments>http://mattaustin.me.uk/2006/11/the-importance-of-standards-compliance-and-accessibility/#comments</comments> <pubDate>Tue, 31 Oct 2006 16:00:11 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[xhtml]]></category> <guid
isPermaLink="false">http://mattaustin.me.uk/?p=219</guid> <description><![CDATA[The aim of this article is to underline the importance of standards compliant web pages in promoting usability, compatibility, and accessibility &#8211; therefore allowing equal opportunity and equal access to content for all. A History of Non-Compliance When Netscape lost the &#34;Browser Wars&#34; in April 2002, Internet Explorer was in complete dominance of the web [...]]]></description> <content:encoded><![CDATA[<p>The aim of this article is to underline the importance of standards compliant web pages in promoting <strong>usability</strong>, <strong>compatibility</strong>, and <strong>accessibility</strong> &#8211; therefore allowing <strong>equal opportunity</strong> and <strong>equal access</strong> to content for all.</p><h2>A History of Non-Compliance</h2><p>When <a
href="http://en.wikipedia.org/wiki/Netscape_(web_browser)" title="Wikipedia article on Netscape">Netscape</a> lost the &quot;<a
href="http://en.wikipedia.org/wiki/Browser_wars" title="Wikipedia article on Browser Wars">Browser Wars</a>&quot; in April 2002, Internet Explorer was in complete dominance of the web browser market &#8211; with a <strong>96%</strong> share (source: OneStat.com). For web developers at the time, this meant that designing for Internet Explorer was all that mattered. The dominance of a single web browser led to a disregard for standards compliance.</p><ul><li>Accessibility &amp; usability problems when sites were accessed using other browsers.</li><li>Decreased efficiency due to increased file sizes, and website code not following a standard set of rules</li><li>Misuse of HTML as a design tool</li></ul><h2>The Benefits of Standards Compliance</h2><p>The number of different ways to access the internet are increasing. Some of the less common user agents include:</p><ul><li>Mobile phones</li><li>Televisions</li><li>Text-mode browsers</li><li>Text-to-speach synthesisers</li><li>Braille browsers</li><li>Robots (such as search engine spiders)</li></ul><p>Standards compliance can be seen as a way to &quot;future-proof&quot; a website. New browsers will still correctly render websites constructed using past standards.</p><p>In the United Kingdom and Australia, accessibility is the law. The implementation of standards is a vital step towards accessibility. Accessibility benefits those with and without disabilities.</p><p>The use of standards is the only way to ensure that a website is accessible by all visitors, no matter how they access the web. By ensuring accessibility you are not neglecting any of your potential visitors.</p><h2>Summary</h2><p>Adherence to standards = a big step towards a functional, compatible, and accessible website.</p><h3>Further Reading</h3><ul
class="ExternalLinks"><li><a
href="http://www.w3.org/MarkUp/" title="The World Wide Web Consortium Markup homepage">W3C Markup Homepage</a></li><li><a
href="http://www.w3.org/WAI/" title="The World Wide Web Accessibility Initiative homepage">W3C Web Accessibility Initiative</a></li><li><a
href="http://www.webstandards.org/" title="The Web Standards Project homepage">The Web Standards Project</a></li><li><a
href="http://www.alistapart.com/articles/12lessonsCSSandstandards" title="A List Apart article: 12 Lessons for Those Afraid of CSS and Standards">12 Lessons for Those Afraid of CSS and Standards</a></li><li><a
href="http://www.karlcore.com/articles/article.php?id=9" title="KarlCore.com article: The Importance of Standards Compliance and The Process of Validation">The Importance of Standards Compliance and The Process of Validation</a></li><li><a
href="http://news.bbc.co.uk/2/hi/programmes/click_online/6090418.stm" title="BBC article on Designing a More Accessible Web">Designing a More Accessible Web</a></li><li><a
href="http://en.wikipedia.org/wiki/Xhtml" title="Wikipedia article on Extensible Hypertext Markup Language">XHTML Wikipedia article</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://mattaustin.me.uk/2006/11/the-importance-of-standards-compliance-and-accessibility/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
