Extreme ASP.NET Makeover: Style - Visual Studio Validation

Download

Right click “Save as…”

  • Mid Quality WMV (Lo-band, Mobile)
  • MP3 (Audio only)
  • MP4 (iPhone, Android)

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.



Other videos from this article

· W3C XHTML Validation

· Visual Studio Validation

· Comparing HTML and XHTML

· XHTML Strict

· CSS Zen Garden

Read the full article at http://msdn.microsoft.com/en-us/magazine/dd894045.aspx

Tags:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.