<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries tagged with xhtml - Channel 9</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/tags/xhtml/feed/zune/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Entries tagged with xhtml - Channel 9</title><link>http://channel9.msdn.com/tags/XHTML/</link></image><description>xhtml</description><link>http://channel9.msdn.com/tags/XHTML/</link><language>en-us</language><pubDate>Fri, 22 May 2009 18:14:59 GMT</pubDate><lastBuildDate>Fri, 22 May 2009 18:14:59 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Extreme ASP.NET Makeover: Style - CSS Zen Garden</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_small_ch9.png" border="0" /&gt;Between the mangled id and name attributes on tags, base64-encoded viewstate, and server-side control magic, ASP.NET Web Forms has not traditionally encouraged developers to delve into the fundamental technologies of the Web, namely HTML/XHTML, CSS, and JavaScript. In this article, we focused on writing clean, valid XHTML organized around structural aspects of the page and styling that structure using external CSS files. To wrap up, let's take a walk in the garden - the &lt;a href="http://www.csszengarden.com/" id="ctl00_mainContentContainer_ctl35" target="_blank"&gt;CSS Zen Garden&lt;/a&gt;, in fact - to see what can be accomplished in the browser if we embrace XHTML and CSS. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Other videos from this article&lt;/h2&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/"&gt;W3C XHTML Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/"&gt;Visual Studio Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/"&gt;Comparing HTML and XHTML&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/"&gt;XHTML Strict&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/"&gt;CSS Zen Garden&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Read the full article at &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd894045.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd894045.aspx&lt;/a&gt; &lt;/h2&gt;&lt;img src="http://channel9.msdn.com/470275/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/</comments><link>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/</link><pubDate>Fri, 05 Jun 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_2MB_ch9.wmv</guid><evnet:views>5543</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/470275/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Between the mangled id and name attributes on tags, base64-encoded viewstate, and server-side control magic, ASP.NET Web Forms has not traditionally encouraged developers to delve into the fundamental technologies of the Web, namely HTML/XHTML, CSS, and JavaScript. In this article, we focused on writing clean, valid XHTML organized around structural aspects of the page and styling that structure using external CSS files. To wrap up, let's take a walk in the garden - the CSS Zen Garden, in fact - to see what can be accomplished in the browser if we embrace XHTML and CSS.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_ch9.mp4" expression="full" duration="305" fileSize="9113826" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_ch9.mp3" expression="full" duration="305" fileSize="2446647" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_ch9.mp4" expression="full" duration="305" fileSize="9113826" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_ch9.wma" expression="full" duration="305" fileSize="4949573" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_2MB_ch9.wmv" expression="full" duration="305" fileSize="12386804" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_2MB_ch9.wmv" expression="full" duration="305" fileSize="12386804" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_Zune_ch9.wmv" expression="full" duration="305" fileSize="8871253" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/2/0/7/4/CssZenGardenTour_2MB_ch9.wmv" length="12386804" type="video/x-ms-wmv" /><dc:creator>Howard Dierking</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/470275/Trackback.aspx</trackback:ping><category>ASP.NET</category><category>Brownfield Development</category><category>CSS</category><category>MSDN Magazine</category><category>XHTML</category></item><item><title>Extreme ASP.NET Makeover: Style - XHTML Strict</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_small_ch9.png" border="0" /&gt;&lt;p&gt;Strictly Speaking&lt;br /&gt;
&lt;br /&gt;
ScrewTurn Wiki is written using XHTML 1.0, which we can determine by looking at the DOCTYPE declaration in MasterPage.master:&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl19');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl19_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl19"&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 &lt;br /&gt;Transitional//EN" "http://www.w3.org/TR/xhtml1&lt;br /&gt;/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The DOCTYPE declaration tells the browser which version of HTML or XHTML is being used on the Web page. If you take a closer look at the DOCTYPE declaration, you'll notice it is XHTML 1.0 Transitional. The transitional part has nothing to do with XHTML per se. It is actually part of both HTML and XHTML and it relates to conformance levels. XHTML 1.0 and HTML 4.01 provide three conformance levels - strict, transitional, and frameset. Framesets are seldom used today due to problems with bookmarking and search engines. So frameset conformance is of little interest anymore. Transitional is a compatibility mode to make upgrading from prior specifications - such as HTML 3.0 - easier for existing pages. Strict is the way that the HTML/XHTML specifications were meant to be used. Strict disallows certain tags (e.g., &amp;lt;center&amp;gt;, &amp;lt;font&amp;gt;) and attributes (e.g., align, bgcolor, background) that are valid at transitional conformance. Disallowing these tags and attributes enforces better separation of structure from presentation in markup. Structure identifies the major building blocks of your page, such as a sidebar, breadcrumb trail, main heading, or article. Presentation is about how these building blocks should be rendered. For example, identifying a certain &amp;lt;div&amp;gt; tag as being the copyright notice is about structure. Noting that the &amp;lt;div&amp;gt; tag should be rendered in a x-small italic Helvetica font is about presentation. (See Roger Johansson's blog post, entitled &lt;a href="http://24ways.org/2005/transitional-vs-strict-markup" id="ctl00_mainContentContainer_ctl20" target="_blank"&gt;&lt;i&gt;Transitional vs. Strict Markup&lt;/i&gt;&lt;/a&gt; for a good discussion on the topic.)&lt;/p&gt;
&lt;p&gt;So why does strict conformance disallow presentation-related tags/attributes in HTML/XHTML? It is because we now have a better mechanism for expressing presentation details... Cascading Style Sheets (CSS).&lt;/p&gt;
&lt;h2 id="f"&gt;Let's Talk About CSS, Baby!&lt;/h2&gt;
&lt;p&gt;CSS or Cascading Style Sheets is a technology designed specifically to express presentation details about your Web page. Just like with HTML, I'm going to assume that you've had some exposure to CSS already. If you haven't, w3schools.com has a series of &lt;a href="http://www.w3schools.com/css/css_intro.asp" id="ctl00_mainContentContainer_ctl21" target="_blank"&gt;CSS Tutorials&lt;/a&gt; to introduce you to the technology.&lt;/p&gt;
&lt;p&gt;Just like HTML, CSS evolved over time with CSS1, CSS2, and CSS 2.1. The &lt;a href="http://www.w3.org/TR/CSS/" id="ctl00_mainContentContainer_ctl22" target="_blank"&gt;CSS 2.1 specification&lt;/a&gt; is supported by the latest version of the major browsers including Firefox 3 and Internet Explorer 8. Unfortunately, widely used browsers such as Firefox 2.0, Internet Explorer 6, and Internet Explorer 7 do not have full CSS 2.1 support, as evidenced by the &lt;a href="http://acid2.acidtests.org/" id="ctl00_mainContentContainer_ctl23" target="_blank"&gt;Acid2 Test&lt;/a&gt; from &lt;a href="http://www.acidtests.org/" id="ctl00_mainContentContainer_ctl24" target="_blank"&gt;The Web Standards Project Acid Tests&lt;/a&gt;. Although the Acid2 Test is not going to win any art prizes, it is quite gruelling for browsers as it uses a variety of advanced CSS techniques to compose the smiley face, shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="" align="middle" src="http://i.msdn.microsoft.com/dd894045.xhtml_4(en-us,MSDN.10).jpg" /&gt;&lt;br /&gt;
&lt;br /&gt;
Even though commonly used browsers such as Firefox 2.0 and Internet Explorer 6/7 do not render the Acid2 Test correctly, they do render most common CSS features faithfully. So as long as your stylesheets use predominantly CSS1 and commonly used CSS2/CSS2.1 features, your Web pages should render consistently across current browsers. Let's turn our attention to some recommended practices for CSS.&lt;/p&gt;
&lt;h3&gt;External Stylesheets vs. Inline Styles/Stylesheets&lt;/h3&gt;
&lt;p&gt;Styles can be included inline with a tag using the style attribute, inline with the page using a &amp;lt;style&amp;gt; tag, or in an external  file with a &amp;lt;link&amp;gt; tag.&lt;/p&gt;
&lt;div id="ctl00_mainContentContainer_ctl28_"&gt;
&lt;div class="CodeSnippetTitleBar"&gt;
&lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;
&lt;div class="CopyCodeButton"&gt;&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl28');" title="Copy Code" class="copyCode"&gt;
&lt;div align="middle" class="LibC_copy_off"&gt;&lt;/div&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl28"&gt;&amp;lt;!-- Inline style --&amp;gt; &lt;br /&gt;&amp;lt;div style="font-size:large"&amp;gt;Header&amp;lt;/div&amp;gt; &lt;br /&gt;&amp;lt;!-- Inline stylesheet --&amp;gt; &lt;br /&gt;&amp;lt;style media="all" type="text/css"&amp;gt; /* Styles go here */ &amp;lt;/style&amp;gt; &lt;br /&gt;&amp;lt;!-- External stylesheet --&amp;gt; &lt;br /&gt;&amp;lt;link media="all" type="text/css" href="Site.css" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It is a bad, though common, practice to litter your HTML/XHMTL pages with style attributes. The result is a mix of presentational with structural concerns in your Web pages. Not only does this increase the size of your Web pages, but consistent styling across the Web application is difficult as the same styles are repeated for each similar element. A small improvement can be made by moving the styling information to a stylesheet included in the &amp;lt;head&amp;gt; section via the &amp;lt;style&amp;gt; tag. Styles are no longer repeated within the page, but you still have style duplication across Web pages. Using either inline style attributes or stylesheets is not recommended. In either case, changing a site's theme or fixing an error in your CSS is very time-consuming, as every Web page in the application must be updated. More preferable are external stylesheets, so that a common set of styles can be applied uniformly throughout the Web application. This has the additional advantage of allowing the browser to cache style information rather than sending it on every page request.&lt;/p&gt;
&lt;p&gt;Just as it is bad practice to litter your HTML/XHTML pages with style attributes, it is just as bad to define styles tightly coupled to presentation.&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl29');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl29_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl29"&gt;&amp;lt;div class="fontarial fontsize14 textred"&amp;gt;Error&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Rather than specifying the structure of the document, CSS classes have been used to specify the presentation of the information. This is not how CSS is meant to be used. The preferred way to define this page element would be to use a CSS class to express its purpose.&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl30');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl30_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl30"&gt;&amp;lt;div class="errormessage"&amp;gt;Error&amp;lt;/div&amp;gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The stylesheet might still use a 14px red Arial font to display errors, but notice how the structure - or intent - of the page element is expressed rather than its visual presentation.&lt;/p&gt;
&lt;h3&gt;Media-specific Stylesheets&lt;/h3&gt;
&lt;p&gt;The screen and the printed page are very different beasts. Each has its own set of layout concerns and optimizations. We have all encountered Web pages that provide a link to a "print-optimized" Web page that removes headers, sidebars, and background images. What if you could just print your Web page and have the browser optimize it for printing? Guess what? You can! CSS includes the notion of media-specific stylesheets. The styles are only applied for the specified media.&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl31');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl31_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl31"&gt;&amp;lt;link media="all" type="text/css" href="Site.css" /&amp;gt;&lt;br /&gt;&amp;lt;link media="print" type="text/css" href="PrintOnly.css" /&amp;gt;&lt;br /&gt;&amp;lt;link media="screen" type="text/css" href="ScreenOnly.css" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can include common styles in media="all" and override them for specific media in the other stylesheets. There are also media types for Braille, screen readers (aka aural), and more.&lt;/p&gt;
&lt;h3&gt;Compatibility is Easier with Valid CSS&lt;/h3&gt;
&lt;p&gt;Just like with HTML/XHTML, cross-browser compatibility of a Web application can be improved by using valid CSS. Rather than memorizing CSS specifications, you can use tools such as the &lt;a href="http://jigsaw.w3.org/css-validator/" id="ctl00_mainContentContainer_ctl32"&gt;W3C CSS Validation Service&lt;/a&gt; or Visual Studio 2008's built-in CSS Validator to ensure that not only are you writing valid CSS, but that you are only using CSS features up to a particular level, such as CSS2, but not CSS2.1, features.&lt;/p&gt;
&lt;h3&gt;Remember the "C" in CSS&lt;/h3&gt;
&lt;p&gt;An oft-forgotten feature of CSS is the cascading part - styles defined on parent tags cascade to their children. This means that you can define the font and text color for the &amp;lt;body&amp;gt; tag rather than on each individual element. (Note that cascading doesn’t make sense for some properties and hence not all properties cascade. For example, cascading the height property doesn’t make sense as all children would have the same height as the parent, which is clearly impossible for a stack of more than one child. &lt;a href="http://www.w3.org/TR/CSS2/propidx.html" id="ctl00_mainContentContainer_ctl33"&gt;Appendix F&lt;/a&gt; of the CSS2 recommendation has a full list of properties and whether child elements inherit the property from their parent.) Relying on cascading reduces duplication in your CSS and makes creating custom styles easier, as you have fewer styles to update. ScrewTurn Wiki contains a lot of duplication in its CSS. &lt;/p&gt;
&lt;div&gt;
&lt;h2 id="e"&gt;Why is XHTML 1.0 Strict Missing From Visual Studio?&lt;/h2&gt;
&lt;p&gt;When selecting a conformance level in Visual Studio, there is no option for XHTML 1.0 Strict, as shown below. &lt;/p&gt;
&lt;p&gt;&lt;img alt="" align="middle" src="http://i.msdn.microsoft.com/dd894045.xhtml_3(en-us,MSDN.10).jpg" /&gt;&lt;/p&gt;
&lt;p&gt;The reason is because the &lt;a href="http://www.w3.org/TR/xhtml11/" id="ctl00_mainContentContainer_ctl25" target="_blank"&gt;XHTML 1.1 specification&lt;/a&gt; eliminates the transitional and frameset conformance levels, thus implicitly only implementing strict conformance. According to the specification, its purpose is "to provide a consistent, forward-looking document type cleanly separated from the deprecated, legacy functionality of &lt;a href="http://www.w3.org/TR/xhtml11/references.html#ref_html4" id="ctl00_mainContentContainer_ctl26" target="_blank"&gt;HTML 4&lt;/a&gt; that was brought forward into the &lt;a href="http://www.w3.org/TR/xhtml11/references.html#ref_xhtml1" id="ctl00_mainContentContainer_ctl27"&gt;XHTML 1.0&lt;/a&gt; document types". There are minor differences between XHTML 1.0 Strict and XHTML 1.1, but for all practical purposes the two are close enough to obviate the need for both options in Visual Studio Schema Validator.&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Other videos from this article&lt;/h2&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/"&gt;W3C XHTML Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/"&gt;Visual Studio Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/"&gt;Comparing HTML and XHTML&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/"&gt;XHTML Strict&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/"&gt;CSS Zen Garden&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Read the full article at &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd894045.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd894045.aspx&lt;/a&gt; &lt;/h2&gt;&lt;img src="http://channel9.msdn.com/470274/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/</comments><link>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/</link><pubDate>Fri, 05 Jun 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_2MB_ch9.wmv</guid><evnet:views>6545</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/470274/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>CSS or Cascading Style Sheets is a technology designed specifically to express presentation details about your Web page. Just like with HTML, I'm going to assume that you've had some exposure to CSS already. If you haven't, w3schools.com has a series of CSS Tutorials to introduce you to the technology.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_ch9.mp4" expression="full" duration="532" fileSize="14262512" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_ch9.mp3" expression="full" duration="532" fileSize="4260172" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_ch9.mp4" expression="full" duration="532" fileSize="14262512" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_ch9.wma" expression="full" duration="532" fileSize="8617457" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_2MB_ch9.wmv" expression="full" duration="532" fileSize="13973700" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_2MB_ch9.wmv" expression="full" duration="532" fileSize="13973700" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_Zune_ch9.wmv" expression="full" duration="532" fileSize="13304615" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/4/7/2/0/7/4/RefactoringScrewTurnWikiCSS_2MB_ch9.wmv" length="13973700" type="video/x-ms-wmv" /><dc:creator>Howard Dierking</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/470274/Trackback.aspx</trackback:ping><category>ASP.NET</category><category>Brownfield Development</category><category>CSS</category><category>MSDN Magazine</category><category>XHTML</category></item><item><title>Extreme ASP.NET Makeover: Style - Comparing HTML and XHTML</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_small_ch9.png" border="0" /&gt;&lt;h2 id="c"&gt;HTML/XHTML - Toe-MAY-toe/Toe-MA-toe&lt;/h2&gt;
&lt;p&gt;So what about this XHTML thing I keep writing about? What exactly is XHTML and how is it different from HTML? According to the W3C, XHTML 1.0 is "a reformulation of HTML 4 in XML 1.0". Honestly, XHTML 1.0 provides little advantage over HTML 4.01, which it supercedes, but the effort to update HTML 4.01 Web pages to XHTML 1.0 Web pages is minimal. The main advantage of XHTML is that XML parsers and tools can work with XHTML, but not with HTML. There is, purposefully, a lot of overlap between the two specifications, but the overlap isn't perfect. Let's look at the most common scenarios for turning valid HTML into valid XHTML, shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" align="middle" src="http://i.msdn.microsoft.com/dd894045.xhtml_2(en-us,MSDN.10).jpg" /&gt;&lt;/p&gt;
&lt;p&gt;A full explanation of XHTML 1.0 and &lt;a href="http://www.w3.org/TR/xhtml1/#diffs" id="ctl00_mainContentContainer_ctl14" target="_blank"&gt;its differences with HTML 4&lt;/a&gt; can be found in the &lt;a href="http://www.w3.org/TR/xhtml1/" id="ctl00_mainContentContainer_ctl15" target="_blank"&gt;XHTML 1.0 Recommendation&lt;/a&gt; on the W3C Web site.&lt;/p&gt;
&lt;p&gt;If you are building a new Web site, there is no reason not to write your markup in XHTML. If you are dealing with an existing site, you have to decide whether the effort to update existing pages to be XHTML-compliant is worthwhile. Often it is not. That said, there is no reason that new pages in an existing site cannot be written in XHTML.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;WARNING:&lt;/b&gt; Historically, browsers were designed to parse HTML. Modern browsers have been &lt;b&gt;updated&lt;/b&gt; to parse XHTML. Just because a browser understands that a XHTML &amp;lt;br/&amp;gt; tag is the same as a HTML &amp;lt;br&amp;gt; tag doesn't mean that it will properly interpret XML empty element tags for all XHTML elements. For example, the following is valid XHTML.&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl16');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl16_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl16"&gt;&amp;lt;script type="text/javascript" src="test1.js"/&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The script, test1.js, fails to run and a blank page is displayed in both Internet Explorer 8 and Firefox 3.5. Chrome 2.0 parses the XHTML correctly, running test1.js and rendering the page. The following syntactically equivalent XHTML is rendered properly by all three browsers.&lt;a href="http://channel9.msdn.comCopyCode(ctl00_mainContentContainer_ctl17');" title="Copy Code" class="copyCode"&gt;
&lt;div id="ctl00_mainContentContainer_ctl17_"&gt;
&lt;div&gt;
&lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl17"&gt;&amp;lt;script type="text/javascript" src="test1.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So just because your page is valid XHTML and renders properly in one browser doesn't mean that it will render properly in all browsers. Your chances for success improve if the page wasn't invalid XHTML, but you still need to test in every browser and platform that you care about.&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Other videos from this article&lt;/h2&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/"&gt;W3C XHTML Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/"&gt;Visual Studio Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/"&gt;Comparing HTML and XHTML&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/"&gt;XHTML Strict&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/"&gt;CSS Zen Garden&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Read the full article at &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd894045.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd894045.aspx&lt;/a&gt; &lt;/h2&gt;&lt;img src="http://channel9.msdn.com/470273/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/</comments><link>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/</link><pubDate>Fri, 05 Jun 2009 06:59:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_2MB_ch9.wmv</guid><evnet:views>4550</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/470273/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>So what about this XHTML thing I keep writing about? What exactly is XHTML and how is it different from HTML? According to the W3C, XHTML 1.0 is "a reformulation of HTML 4 in XML 1.0". Honestly, XHTML 1.0 provides little advantage over HTML 4.01, which it supercedes, but the effort to update HTML 4.01 Web pages to XHTML 1.0 Web pages is minimal. The main advantage of XHTML is that XML parsers and tools can work with XHTML, but not with HTML. There is, purposefully, a lot of overlap between the two specifications, but the overlap isn't perfect.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_ch9.mp4" expression="full" duration="148" fileSize="3869134" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_ch9.mp3" expression="full" duration="148" fileSize="1192769" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_ch9.mp4" expression="full" duration="148" fileSize="3869134" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_ch9.wma" expression="full" duration="148" fileSize="2417201" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_2MB_ch9.wmv" expression="full" duration="148" fileSize="4783240" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_2MB_ch9.wmv" expression="full" duration="148" fileSize="4783240" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_Zune_ch9.wmv" expression="full" duration="148" fileSize="3750311" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/2/0/7/4/XmlEmptyElementTagIncompatibilities_2MB_ch9.wmv" length="4783240" type="video/x-ms-wmv" /><dc:creator>Howard Dierking</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/470273/Trackback.aspx</trackback:ping><category>ASP.NET</category><category>Brownfield Development</category><category>CSS</category><category>MSDN Magazine</category><category>XHTML</category></item><item><title>Extreme ASP.NET Makeover: Style - Visual Studio Validation</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_small_ch9.png" border="0" /&gt;&lt;p&gt;There are some easy things that you can do to increase the likelihood that your Web application will work across browsers. Modern browsers are designed to render HTML 4.01 and XHTML 1.0/1.1, but they do provide backward compatibility with previous HTML specifications. Browsers are typically very forgiving in their parsing of HTML and browser incompatibilities are often manifestations of the rules that a particular browser uses to parse bad HTML. For example, the following is invalid HTML and XHTML:&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;The quick brown dog jumped over the lazy fox.&amp;lt;/p&amp;gt;&amp;lt;/em&amp;gt;&lt;/p&gt;
&lt;p&gt;Notice how the &amp;lt;p&amp;gt; and &amp;lt;em&amp;gt; overlap. Neither tag contains the other. This is invalid HTML and XHTML. Your chances of cross-browser compatibility are dramatically improved if your markup is valid HTML 4.01 or XHTML 1.0/1.1. "Valid" means that the document markup conforms to the relevant W3C specification. You can check the validity of your HTML/XHTML document using the free &lt;a href="http://validator.w3.org/" id="ctl00_mainContentContainer_ctl11" target="_blank"&gt;W3C Markup Validation Service&lt;/a&gt;.  &lt;br /&gt;
&lt;br /&gt;
Microsoft Visual Studio can also help out here as it has had a markup validation engine built in since Visual Studio 2005.&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Other videos from this article&lt;/h2&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/"&gt;W3C XHTML Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/"&gt;Visual Studio Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/"&gt;Comparing HTML and XHTML&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/"&gt;XHTML Strict&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/"&gt;CSS Zen Garden&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Read the full article at &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd894045.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd894045.aspx&lt;/a&gt; &lt;/h2&gt;&lt;img src="http://channel9.msdn.com/470272/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/</comments><link>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/</link><pubDate>Fri, 05 Jun 2009 06:59:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_2MB_ch9.wmv</guid><evnet:views>4769</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/470272/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Microsoft Visual Studio can also help out here as it has had a markup validation engine built in since Visual Studio 2005.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_ch9.mp4" expression="full" duration="158" fileSize="4103905" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_ch9.mp3" expression="full" duration="158" fileSize="1268002" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_ch9.mp4" expression="full" duration="158" fileSize="4103905" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_ch9.wma" expression="full" duration="158" fileSize="2576413" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_2MB_ch9.wmv" expression="full" duration="158" fileSize="4140704" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_2MB_ch9.wmv" expression="full" duration="158" fileSize="4140704" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_Zune_ch9.wmv" expression="full" duration="158" fileSize="3974371" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/7/2/0/7/4/MarkupValidationUsingVs2008_2MB_ch9.wmv" length="4140704" type="video/x-ms-wmv" /><dc:creator>Howard Dierking</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/470272/Trackback.aspx</trackback:ping><category>ASP.NET</category><category>Brownfield Development</category><category>CSS</category><category>MSDN Magazine</category><category>XHTML</category></item><item><title>Extreme ASP.NET Makeover: Style - W3C XHTML Validation</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_small_ch9.png" border="0" /&gt;&lt;h2 id="a"&gt;Embracing the Web&lt;/h2&gt;
&lt;p&gt;ASP.NET Web Forms goes out of its way to protect you from the big, bad old Web. A world of HTML, CSS, and JavaScript all served up over HTTP. A world where state is ephemeral and statelessness is a way of life. In the extreme, ASP.NET Web Forms gives you a drag-and-drop experience where you never have to look at an angle bracket. Where an illusion of statefulness is provided by SessionState and ViewState. Rob Conery said it best when &lt;a href="http://blog.wekeroad.com/blog/i-spose-ill-just-say-it-you-should-learn-mvc/" id="ctl00_mainContentContainer_ctl06" target="_blank"&gt;he described ASP.NET Web Forms&lt;/a&gt; as an &lt;i&gt;"abstraction wrapped in deception covered in lie sauce presented on a plate full of diversion and sleight of hand.&lt;/i&gt;" For simple applications, this strategy can work well as you don't have to worry about the idiosyncrasies of the Web. To harness the true power of the browser, you do need to embrace the Web and the fundamental technologies that comprise it - HTML, CSS, JavaScript, and HTTP.&lt;/p&gt;
&lt;p&gt;The Web can be a scary place, especially if you've ever dared to look at the HTML source for a typical Web page of the ASP.NET variety. The HTML source is awash in hidden inputs, crazy identifiers, cryptic JavaScript, and HTML that looks like it's been through a blender. This is the price of ASP.NET Web Forms trying to hide the stateless nature of the Web from you.&lt;/p&gt;
&lt;p&gt;If however you embrace fundamental Web technologies, you can have clean, readable HTML styled with CSS and dynamic behaviours provided by understandable JavaScript.  You don't even have to abandon ASP.NET Web Forms to do it. (In many ways, ASP.NET MVC makes it easier to embrace these Web technologies, but that's the topic of a later article.) You can bring the power of the Web to your ASP.NET Web Forms applications!&lt;/p&gt;
&lt;h2 id="b"&gt;Living in a (X)HTML World&lt;/h2&gt;
&lt;p&gt;The world of the Web is built around HTML in one form or another. Although ASP.NET Web Forms tries to protect you from the angle brackets, chances are better than not that you've spent some time looking at raw HTML. If you haven't, I would recommend devoting some time to the free introductory tutorials at &lt;a href="http://www.w3schools.com/" id="ctl00_mainContentContainer_ctl07" target="_blank"&gt;w3schools.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Depending on your Web application, cross-browser compatibility may or may not be a concern for you. Internal enterprise applications typically only require that they run on the corporate standard browser, which is most often Microsoft Internet Explorer. At the other extreme are public Web sites that want to target the broadest audience and therefore be compatible with the broadest range of available browsers.&lt;/p&gt;
&lt;p&gt;If you're building a public Internet site, you probably want to know which browsers are currently popular so that you can ensure that your site works properly in them. Many companies offer browser usage statistics - often for free - which can serve as a guide to currently popular browsers. As shown below, Microsoft Internet Explorer is still the dominant browser, but Firefox makes up a substantial piece of the market. So compatibility with the major versions of those two browsers is a must for any public Internet site.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" align="middle" src="http://i.msdn.microsoft.com/dd894045.xhtml_1(en-us,MSDN.10).jpg" /&gt;&lt;br /&gt;
&lt;a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2" id="ctl00_mainContentContainer_ctl09" target="_blank"&gt;Browser Version Market Share&lt;/a&gt; for April 2009 - source &lt;a href="http://www.netapplications.com/" id="ctl00_mainContentContainer_ctl10" target="_blank"&gt;Net Applications&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Always take browser usage statistics with a large grain of salt, because they are highly dependent on the site's target demographic. For consumer sites, the above graph is roughly representative of current browser usage as it incorporates data from a wide range of popular sites. Technical sites, such as my blog, tend to have a much higher percentage of alternative browsers, such as Firefox, Chrome, and Opera. I would expect Apple-related sites to have a much higher percentage of visits from Safari users as that is the default browser on OSX. So when deciding which browsers and operating systems to test your Web application on, you need to consider its target audience.&lt;/p&gt;
&lt;p&gt;There are some easy things that you can do to increase the likelihood that your Web application will work across browsers. Modern browsers are designed to render HTML 4.01 and XHTML 1.0/1.1, but they do provide backward compatibility with previous HTML specifications. Browsers are typically very forgiving in their parsing of HTML and browser incompatibilities are often manifestations of the rules that a particular browser uses to parse bad HTML. For example, the following is invalid HTML and XHTML:&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;The quick brown dog jumped over the lazy fox.&amp;lt;/p&amp;gt;&amp;lt;/em&amp;gt;&lt;/p&gt;
&lt;p&gt;Notice how the &amp;lt;p&amp;gt; and &amp;lt;em&amp;gt; overlap. Neither tag contains the other. This is invalid HTML and XHTML. Your chances of cross-browser compatibility are dramatically improved if your markup is valid HTML 4.01 or XHTML 1.0/1.1. "Valid" means that the document markup conforms to the relevant W3C specification. You can check the validity of your HTML/XHTML document using the free &lt;a href="http://validator.w3.org/" id="ctl00_mainContentContainer_ctl11" target="_blank"&gt;W3C Markup Validation Service&lt;/a&gt;.&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Other videos from this article&lt;/h2&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/"&gt;W3C XHTML Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Visual-Studio-Validation/"&gt;Visual Studio Validation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-Comparing-HTML-and-XHTML/"&gt;Comparing HTML and XHTML&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-XHTML-Strict/"&gt;XHTML Strict&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;· &lt;a href="http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-CSS-Zen-Garden/"&gt;CSS Zen Garden&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Read the full article at &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd894045.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd894045.aspx&lt;/a&gt; &lt;/h2&gt;&lt;img src="http://channel9.msdn.com/470271/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/</comments><link>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/</link><pubDate>Fri, 05 Jun 2009 06:58:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_2MB_ch9.wmv</guid><evnet:views>5140</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/470271/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>You can check the validity of your HTML/XHTML document using the free W3C Markup Validation Service.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_ch9.mp4" expression="full" duration="150" fileSize="4341728" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_ch9.mp3" expression="full" duration="150" fileSize="1202173" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_ch9.mp4" expression="full" duration="150" fileSize="4341728" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_ch9.wma" expression="full" duration="150" fileSize="2435225" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_2MB_ch9.wmv" expression="full" duration="150" fileSize="5890824" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_2MB_ch9.wmv" expression="full" duration="150" fileSize="5890824" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_Zune_ch9.wmv" expression="full" duration="150" fileSize="4086323" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/7/2/0/7/4/MarkupValidationUsingW3CMarkupValidationService_2MB_ch9.wmv" length="5890824" type="video/x-ms-wmv" /><dc:creator>Howard Dierking</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/howarddierking/Extreme-ASPNET-Makeover-Style-W3C-XHTML-Validation/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/470271/Trackback.aspx</trackback:ping><category>ASP.NET</category><category>Brownfield Development</category><category>CSS</category><category>MSDN Magazine</category><category>XHTML</category></item><item><title>Smart Search and Replace with Aggiorno</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_small_ch9.jpg" border="0" /&gt;&lt;a href="http://bits.samiq.net/"&gt;Gilbert Corrales&lt;/a&gt; quickly fixes invalid and unfriendly HTML and CSS using &lt;a href="http://www.aggiorno.com/"&gt;Aggiorno&lt;/a&gt;, a code refactoring tool that runs as a plug-in for Visual Studio.  I really like the Smart Search and Replace feature which was just added.  Its like Regular Expressions made easy and using templates.&lt;img src="http://channel9.msdn.com/442170/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/shows/Continuum/Aggiorno/</comments><link>http://channel9.msdn.com/shows/Continuum/Aggiorno/</link><pubDate>Mon, 10 Nov 2008 19:39:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_2MB_ch9.wmv</guid><evnet:views>40578</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/442170/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Gilbert Corrales quickly fixes invalid and unfriendly HTML and CSS using Aggiorno, a code refactoring tool that runs as a plug-in for Visual Studio.  I really like the Smart Search and Replace feature which was just added.  Its like Regular Expressions made easy and using templates.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_large_ch9.jpg" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_small_ch9.jpg" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_ch9.mp4" expression="full" duration="463" fileSize="26076676" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_ch9.mp3" expression="full" duration="463" fileSize="3705963" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_ch9.mp4" expression="full" duration="463" fileSize="26076676" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_ch9.wma" expression="full" duration="463" fileSize="3751265" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_ch9.wmv" expression="full" duration="463" fileSize="29228813" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_2MB_ch9.wmv" expression="full" duration="463" fileSize="143806558" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_Zune_ch9.wmv" expression="full" duration="463" fileSize="36808505" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/7/1/2/4/4/TCSAggiorno_2MB_ch9.wmv" length="143806558" type="video/x-ms-wmv" /><dc:creator>Adam Kinney</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://channel9.msdn.com/shows/Continuum/Aggiorno/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/442170/Trackback.aspx</trackback:ping><category>Aggiorno</category><category>Gilbert Corrales</category><category>Tools</category><category>Visual Studio</category><category>XHTML</category></item></channel></rss>