to XHTML or not to XHTML?

andehlu

this modern love
have any of you out there worked with XHTML yet? I am about to start a pretty big site for my company and I am thinking about trying to actually be compliant for once. The problem is in the past, when i make updates etc, they usually have to happen fast and Im not too sure I have time for issues concerning XHTML compliancy. I use DreamWeaver alot and I know it has XHTML cmpliant building so maybe it wont be a problem. Another possible issue Ive read about is JavaScript issues. Does this mean that JS needs to be under ECMAscript guidlines when using XHTML? And if there are JS issues, how big are they?
 
XHTML is quite easy to use...every single site I do (past 2 years) is XHTML 1.0 or higher. Dreamweaver works just fine for it, especially the MX versions (2004 is the best though).

Javascript should be avoided at all costs. If it is used, then it should only be used on nonessential things. Using JS for navigation should be avoided. Create your site, then launch it in Safari with JS turned off and ask yourself... "Is the content usable and the core information available?" If you can still use the site and get the important stuff, then the answer is probably yes and you should be ok.

You could also look at using a server-side solution like PHP in place of JS for some things.
 
ya the only thintg i use JS is for simple client side form verification so i doubt it will be an issue. I do use PHP for all else.
 
The browsers with JS off (or which don't support it) should just ignore it then.
 
XHTML isn't necessarily anything hard, especially if you're familiar with HTML 4 or before. The biggies are the ending slashed on certain tags (br, link, hr, img, etc) and making sure every tag is properly closed, you use the correct doctype, etc. ALA (http://www.alistapart.com) has some good info on it. The CSS part is probably where most of the actual problems will happen.

Russ Weakley has some good tutorials on various concepts. http://www.maxdesign.com.au -- http://css.maxdesign.com.au/index.htm

The WSG (http://www.webstandardsgroup.org) is also a good place to go looking.
 
Does anyone know of a website that lists the XHTML rules for tag placement? For example, when I run XHTML through the validator with this code
Code:
<ul>
<li>Something</li><br />
</ul>

It tells me that the <br /> tag cannot be placed there, but doesn't say why. (Yes, I know that I can get the same effect with CSS, but I want to know what the rules are for tag placement).

Also, for those using DW 2004, I've noticed that it is not completely XHTML compatible. It will create code like this "<td nowrap>" which is not valid XHTML.
 
BR is not a proper tag for inside of the UL. You could place it at the end of the sentence before the closing li tag for it to validate (I believe). The only thing in between UL or OL tags should be LIs. Using CSS would be a much better idea though.

Code:
<ul>
<li>Something<br /></li>
</ul>

W3C has the specs for all HTML/XHTML/CSS versions on their site (http://www.w3.org).

http://www.w3.org/TR/xhtml1/
 
Back
Top