Extreme ASP.NET Makeover: Style - Comparing HTML and XHTML
- Posted: Jun 04, 2009 at 11:59 PM
- 9,131 Views
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
HTML/XHTML - Toe-MAY-toe/Toe-MA-toe
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.
.jpg)
A full explanation of XHTML 1.0 and its differences with HTML 4 can be found in the XHTML 1.0 Recommendation on the W3C Web site.
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.
WARNING: Historically, browsers were designed to parse HTML. Modern browsers have been updated to parse XHTML. Just because a browser understands that a XHTML <br/> tag is the same as a HTML <br> tag doesn't mean that it will properly interpret XML empty element tags for all XHTML elements. For example, the following is valid XHTML.
<script type="text/javascript" src="test1.js"/>
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.
<script type="text/javascript" src="test1.js"></script>
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.
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.