View Full Version : Top 10 Reasons to Convert to XHTML & Top 5 Reasons Not T
Narasinha
12-09-2003, 03:03 AM
This is from the book Designing With Web Standards (http://www.zeldman.com/dwws/) by Jeffrey Zeldman. I bought this book the other day, and I love it. I recommend it to anyone designing web pages, whether they think standards are a good idea or not, or whether they use a WYSIWYG editor or code with a text editor.
Top 10 Reasons to Convert to XHTML
XHTML is the current markup standard, replacing HTML 4.
XHTML is designed to work well with other XML-based markup languages, applications, and protocols—an advantage that HTML lacks.
XHTML is more consistent than HTML, so it's less likely to cause problems of function and display.
XHTML 1.0 is a bridge to future versions of XHTML. Should the XHTML 2 draft specification achieve final recommendation status, it will be easier to adapt to it (if you choose to do so) from XHTML 1.0 than from HTML.
Old browsers are as comfortable with XHTML as they are with HTML. There's no advantage to XHTML in this regard, but, hey, there's no disadvantage either.
New browsers love XHTML (particularly XHTML 1.0), and many accord it special treatment not granted to pages authored in HTML 4. This makes XHTML more predictable than HTML in many cases.
XHTML works as well in wireless devices, screen readers, and other specialized User Agents as it does in traditional desktop browsers, in many cases removing the need to create specialized wireless markup versions and allowing sites to reach more visitors with less work and at lower cost. We can't be positive about cause and effect, but many HTML sites are saddled with wireless versions, text-only versions, and special printer-friendly pages, while most XHTML sites are free of such encumbrances—one document serves all. (In most cases, one document serves all if it's properly styled for multiple media, and that's what CSS is for.)
XHTML is part of a family of web standards (also including CSS and the W3C Document Object Model) that let you control the behavior and appearance of web pages across multiple platforms, browsers, and devices.
Authoring in XHTML can assist you in breaking the habit of writing presentational markup, and that in turn can help you avoid accessibility problems and inconsistencies of display betwen different manufacturer's desktop browsers. (If you write structural XHTML and place all or most of your visual flourishes in CSS, where they belong, you'll no longer be overly concerned about differences in the way Netscape and Microsoft's browsers treat, say, empty table cells to which widths have been applied.)
Authoring in XHTML can get you into the habit of testing your work against Markup Validation Services, which in turn can often save testing and debugging time and help you avoid many basic accessibility errors, such as neglecting to include a usable alt attribute to every <IMG> tag.
Top 5 Reasons Not to Switch to XHTML
You get paid by the hour.
You enjoy creating multiple versions of every page for every conceivable browser or device.
The little man in your head told you not to.
You're quitting the web business.
You don't know the rules of XHTML.
If you're agreeing with number five for your reason not to switch, this book can be of great assistance. Whether you're a beginner who wants to learn to code pages, or you're an old pro who learned to trick browsers into doing what you wanted back in '96, this book can help you learn practices that will ensure your pages will look good now, and in the years and browsers to come. I heartily recommend it.
Best Regards,
Narasinha
carbonize
12-09-2003, 06:31 AM
You missed off number 6 - It's a pain in the rear.
mysticlighthouse
12-09-2003, 04:26 PM
Narasinha,
I agree with you... that book rocks! I got it about a month ago and literally set down and read it from cover to cover in a couple days (had some slow days at work)... he presents everything in a non dry and boring manner
I especially like how he goes on about how to present it to your boss or higher ups to get them to latch on to the idea.
You missed off number 6 - It's a pain in the rear.
I have to disagree with you... I've been doing my latest sites in XHTML transitional and love it! You develop the content to be structural by meaning and not the way you want it to look.
Structural Healing - It's Good for Me
That quote says it all.
carbonize
12-09-2003, 04:37 PM
Transitional is easy but I'm doing it as 1.1 strict. Actually I don't think there is a 1.1 transitional. I did manage to find a way of having flash on a web page using valid (X)HTML that works in all browsers :D
grease
12-10-2003, 12:50 AM
Narasinha, Mysticlighthouse, do both of your webites make use of XHTML. If not, why not? Also can you give us examples of sites you created using XHTML so we can see the end result.
Thanks,
Grease
cooper
12-10-2003, 03:00 AM
I have to agree 100% with Narasinha. I just finished this book a few weeks ago and I am already doing some current projects in it. Once those are done I will probably go back and do some old sites in it for practice and to keep them up to date.
XHTML, CSS and the DOM are the way to go!
XHTML 1.0 has three possible ways to adhere to the standard (transitional, strict and framset) while XHTML 1.1 is essentially only strict by definition. If this statement confuses you, read the book or you can go to Molly's site (http://www.molly.com/templates.php) to see some HMTL templates and some of the differences between them. The author goes into enough detail and somehow still keeps the content light enough to keep you reading.
Some other great books on this topic include Molly Holzschlag's Cascading Style Sheets (http://www.amazon.com/exec/obidos/ASIN/0782141846/qid=1071042708/) and Eric Meyer's Eric Meyer on CSS (http://www.amazon.com/exec/obidos/tg/detail/-/073571245X/)
Both are very good for their own reasons, but if you buy only one then get Zledman's book.
Grease, you asked for some examples of XHTML compliant web sites. Here is a short list:
http://www.alistapart.com/
http://www.happycog.com/
http://www.meyerweb.com/
http://www.molly.com/
http://www.zeldman.com/
BTW - Those are excellent reference sites as well.
Take care and happy coding!
carbonize
12-10-2003, 03:45 AM
XHTML may be the way to go but it's getting to the point where it's more like writing a program than a web page. I've had to use javascript to open offsite links in a new page and I don't like using javascript :|
As for a site that is made with valid XHTML 1.1 with valid CSS try my new project http://www.sites-designed.com/html.php it's still work in progress.
Narasinha
12-10-2003, 04:48 AM
Narasinha, Mysticlighthouse, do both of your webites make use of XHTML. If not, why not? Also can you give us examples of sites you created using XHTML so we can see the end result.
Thanks,
Grease
Hi Grease,
Time for me to practice what I preach. :) Actually, my personal site is still at 4.01 strict. While spending my time on another project (XHTML 1.0 Strict) I have not taken the time to make the necessary changes. I did a few tests and found that since I have already separated all content from display, all I have to do is change the closing tags (like <img.... />) and the Doctype. My 450+ genealogy pages will be fun. I really need to find a way to automate those. Weblint may be my answer, or there are some other good tools.
TrafficProducer
12-10-2003, 07:36 AM
I've been doing my latest sites in XHTML transitional and love it!
Which is the best program to create XHTML in?
Is it more dynamic than HTML?
mysticlighthouse
12-10-2003, 08:08 AM
Narasinha, Mysticlighthouse, do both of your webites make use of XHTML. If not, why not? Also can you give us examples of sites you created using XHTML so we can see the end result.
Thanks,
Grease
There is one currently in Submit Your Site For Review (http://www.webproworld.com/viewtopic.php?t=9795)
I've been planning a more hybrid (flash and xhtml) site for Mystic Lighthouse (http://www.mysticlighthouse.com) since summer... although have yet to get around to it since I'm unbelievably lazy when it comes to my own stuff. Hopefully over the holidays. Or maybe a New Year's Resolution... who knows
grease
12-10-2003, 10:48 AM
Thanks for the samples everyone!
I was impressed! Usually when the focus shifts from design/presentation to development/standards a site becomes cold and lifeless. This is certainly not the case here :) Time to hit the books.
Grease
matauri
12-10-2003, 11:10 AM
Time for me to practice what I preach. :) Actually, my personal site is still at 4.01 strict. While spending my time on another project (XHTML 1.0 Strict) I have not taken the time to make the necessary changes. I did a few tests and found that since I have already separated all content from display, all I have to do is change the closing tags (like <img.... />) and the Doctype. My 450+ genealogy pages will be fun. I really need to find a way to automate those. Weblint may be my answer, or there are some other good tools.
While following everyones advice recently I have been separating content from display also. I did a check on the new site I have been building doing that, to see what kind of errors I would be spinning out in XHTML...only to be pleasantly surprised that it was only end tags missing.
So switching over to XHTML isnt that hard after all. (though remembering to put all those end tags is taxing!)
Thanks for all your words of wisdom on that Narasinha :-)
Cindy
cooper
12-10-2003, 12:28 PM
Which is the best program to create XHTML in?
Is it more dynamic than HTML?
It's not so much dynamic (as that happens more on the server side with languages like PHP and ASP) as it is about syntax and marking up your document with the right tags. HTML was never created as a presentational "language". It was created to help mark up the content of a web page and since the mid-ninties it has been bastardized into what we see today on at least 99% of the sites on the web. Bloated code.
Although if you are referring to DHTML (HTML, JavaScript and CSS) then my answer is that they are about the same with the exception that the dynamic elements in XHTML (while using ECMA Script and CSS) are more valid and standards compliant to the W3C specifications. And that's a good thing.
The long-term trend is to go to XML completely and use style sheets to make that content presentational in whatever device the user may be "viewing" the document with. XHTML is a transition and for the most part valid XML when you get into the strict DOC types. So it won't matter if one user is using a braille device or another is using his/her cell phone and if yet another is using Internet Explorer 7,8,9,etc. They all get to the same information and nothing is blocked from any of them because of proprietary HTML tags or invalid markup. A big part of XHTML is about accessibility and consistency across browsers and platforms.
To address your first question, the latest version of Dreamweaver (MX 2004) generates code that is much more compliant than previous versions or other WYSIWYG editors. But it is important to know what the code is behind the covers so you can correct a problem that your favorite editor can't handle or use code that the manufacturer didn't implement.
I am sure I went off a little too much here but I think it is important that as many people as possible adapt these standards while coding their pages.
TrafficProducer
12-11-2003, 06:37 AM
XHTML Edit?
Thank you, you provide a great reply.
matauri
12-11-2003, 10:01 PM
Well, it can be done. Design appearance can be achieved with no tables & by using XHTML with CSS.
TEST SITE (http://attitude-emedia.com/beta/index.html)
I still arrived at issues as far as alignment of some sectors between browsers, as you will see if you are viewing in the Firebird/IE/Netcrap/Mozilla. And on a minimized window the left margin wont collapse. But on the whole, it still repesents itself pretty well in all cross applications.
So it has sold me to a great degree. I also think that incorporating php into the site will now be easier in XHTML.
In a post months ago I argued that the design aspect doesnt have to be ignored in favour of standards, and after a lot of hair pulling & reading, I still beleive that to be the case. It is only the intial transition that can be daunting. After that we are only limited by our own imagination.
Cindy
redcircle
12-11-2003, 10:22 PM
Stumbling on csszengarden.com has opened my eyes to CSS and XHTML. Before that site I was convinced that CSS whas there to change the font colors and stuff and did not realize the true capability of what it can do. It actually made me giddy about doing webdesign again (for the past couple years I've played the strict programmer only model) After racking my brain the past few months I can say that it takes a different state of mind to stick to it. There are the little quirks from browser to browser that still make me pull my hair out but for the most part less code makes it much easier to use. The only problem that I am having is using dynamic stylesheets for mod_rewriteable scripts that I distribute. I think I have a solution hopefully it works. I wish I had the money to buy the book maybe it'll be a good christmas gift to myslef.. Better yet.. I'll just spend a day at barnes & knoble(or is it noble)
matauri
12-11-2003, 10:49 PM
Before that site I was convinced that CSS whas there to change the font colors and stuff and did not realize the true capability of what it can do.
Ditto, I spent years only having the links fonts, etc on the stylesheet. It all just seemed too unattainable & hard to go further than that. And I must say, that the end products of some of the examples to extending it further were bland & boring to say the least, and didnt inspire to take that track. Now I am finding the possibilities of design facets endless with them.
Cindy
Narasinha
12-12-2003, 01:00 AM
The different page styles at css Zen Garden (http://www.csszengarden.com) are gorgeous. It really shows what can be possible with CSS (and a standards-compliant browser). Of course, some graphics ability never hurts. :)
The ability of the browsers to display things the way they should is the biggest problem I've seen so far. In Zeldman's book he does give tips (and URLs) about hiding certain items from earlier browsers which would choke on some legal code. Thankfully, he gives thes solutions in a way which still manages to maintain compliance with XHTML specs.
IE 5 has font size problems, and I still get a fairly high percentage of users with that version. Netscape 4 has other serious issues, but there are ways to present all of the content, and only the portion of the style it can accept, while feeding the full CSS to compliant browsers. The IE 5 "box model" bug/problem is also a pain. The display results for some pages is vastly different in this and other browsers.
In a perfect world all browsers would fully support all of the specs, and in a proper manner. Don't you wish we lived in a perfect world? I guess I still am one to let people know that they really should upgrade to one of the newer browsers, but I don't like the idea of shutting them out of my site completely if they still use Netscape 4 or IE 3. Until we see usage of the older browsers drop to whatever each of us considers an acceptable lower limit, we just have to live with a few workaraounds and keep certain problem areas in mind.