PDA

View Full Version : Benefits of compliant code



shield
12-10-2005, 11:29 PM
Just wondering... what are the actual benefits of having compliant code apart from it being cleaner?

Might be a strange questions but it seems like a lot of extra work making it all compliant... :D

tony
12-11-2005, 04:49 AM
http://www.evolt.org/article/Why_standards_compliant_HTML_matters/17/60446/

whether you believe it all or notis another matter, i reckon so long as it can be read by SE then you will be fine

Nuvo
12-11-2005, 08:40 AM
Advantages:
1: More likely to work for everyone who visits your site (not everyone uses the same browser).
2: Cleaner.
3: Uses less bandwidth (this is why they reccomend you use CSS, which also cuts bandwidth use).
4: Less likely to break (tags like <font> are depreciated and could be removed completely once the W3C is confident that they aren't used anymore, but sites still using them would break down if those tags were removed).
5: Easier to understand and change at a later date (rather than changing a whole load of font tags, you could just change a bit of CSS relating to a <span> tag and it'd be done a lot quicker).

Disadvantages:
1: Compliant code can, if used poorly, fail in older browsers which don't support the HTML version you're using (XHTML 1.1 Strict got bad press because MS, in all their wisdom, forgot to make Explorer compatible with it).
2: Internet Explorer and browsers based uponb the Explorer rendering engine don't follow any of the current HTML or CSS standards correctly, thus meaning that you have to use cheap tricks to get the right effect.
While this doesn't usually make your code any less compliant or make it screw up in other browsers, it does mean more work.
3: Many commercial web design applications don't support standards compliant code.
Dreamweaver and Frontpage are two very good examples of this (Frontpage creates IE specific code and Dreamweaver doesn't do a great job of it either).

shield
12-11-2005, 10:12 AM
aha I see... Thanks :)

CannonBallGuy
12-11-2005, 03:06 PM
If you plan for the site to last for a few years and don't want to have to re-code the whole darned thing, use compliant code.
That's my advice. Take it or leave it, but don't ask for nothing else. :)

shield
12-11-2005, 05:36 PM
For the last few designs ive done theyve all been XHTML Strict - all compliant code. I will probably do it for all my future sites I was just curious as to what the main advantages are

CannonBallGuy
12-11-2005, 06:47 PM
Hah, that's better than me.
I just use CSS and a mix of HTML/XHTML.
And then, I don't even know if it is strict or transitional. I guess I'm a pretty bad coder. :)
Not that I code very much lately, except for the VBA i have been doing for my ICT coursework in Excel, for which I just completed a 1000 line Macro. ;)