Extreme ASP.NET Makeover: Style - Visual Studio Validation
- Posted: Jun 04, 2009 at 11:59PM
Right click “Save as…”
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:
<p><em>The quick brown dog jumped over the lazy fox.</p></em>
Notice how the <p> and <em> 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
W3C Markup Validation Service.
Microsoft Visual Studio can also help out here as it has had a markup validation engine built in since Visual Studio 2005.