Hi everyone.
I should build a wcc compliant site and I read that Drupal generates valid XHTML/CSS code in almost every review I can find on the web
But drupal.org itself does not validate.
Can anyone explain me this issue and tell me if I can easily build a w3c compliant site with this wondeful cms?

Comments

aitala’s picture

The W3C compliance depends on the theme you use (or create) and possibly the modules you use, especially integrating with other packages like Gallery.

Don't forget that the W3C validation can be really, really picky about issues that should not cause problems with modern browsers.

Eric

__________

Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com

__________
Eric Aitala - ema13@psu.edu
Penn State

224b8605113373e086cb27708ff301ba18ce394db1996e7e22928e4555e0d20b1b6cecc7f67c9bd9e536cb915779c485

tarr’s picture

@aitala
Thanks, I know that all the w3c stuff is harassing, but here where I live, in Italy, some sites MUST be W3C compliant by law. Those are public administration sites (township, public services like libraries and so on)

styro’s picture

It is very easy to create a theme that validates properly. The themes shipped with Drupal should validate - I think validation problems in the core themes are regarded as bugs if you notice any (don't quote me on that though).

The drupal.org theme is a private unreleased theme so that the site can look unique - a few years ago drupal.org ran on the bluemarine theme (the default Drupal theme at the time) and it tended to look like lots of other Drupal sites. The designer of the drupal.org theme made a conscious decision about the bits that don't validate. I think it was around catering to IE rendering bugs, but I can't remember.

Note: you are much more likely to have validation problems with the content your users create.

--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal

aitala’s picture

While I think W3C compliance is a good thing and its something I strive for, requiring it with no exception is very shortsighted. There are some instance where it might be necessary to have slightly 'invalid' code to normalize differences between browsers or for various browser quirks/bugs.

I have an instance where it was useful to create a special attribute within an HTML tag for some functionality - while it is 'invalid', all browsers will ignore it
since they do not recognize it.

Eric
__________

Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com

__________
Eric Aitala - ema13@psu.edu
Penn State

224b8605113373e086cb27708ff301ba18ce394db1996e7e22928e4555e0d20b1b6cecc7f67c9bd9e536cb915779c485

sepeck’s picture

Do a view source, see comment in view source.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

ceejayoz’s picture

If you look at the validation results for the Drupal.org home page closely, you'll find that every single one is part of a node's contents. None of them are from the theme or Drupal core code.

JohnnyMoney’s picture

As soon as you put in stuff like sound playing, and some javascript, things get more difficult to validate.

*****************************
Drupal Projects Homepage (English): www.grandmacarmen.com
Drupal Video Tutorials (Spanish) : www.drupalcarmen.com

ktleow’s picture

Check the source of Drupal.org site under <head> section.

<!-- Note: does not validate. We would like it to, but that would mean reduced user experience for the majority of our visitors. -->

-----
http://kahthong.com - A blog, portfolio & personal site
My blog is proudly powered by Drupal

dman’s picture

Excuses aside, can there really be a justification for this code appearing dozens of times in every d.o. page?

    <div class="links"><a href="/"><a href="/user/login?destination=comment/reply/249947%2523comment-form">Login</a> or <a href="/user/register?destination=comment/reply/249947%2523comment-form">register</a> to post comments</a></div>

This is really wrong, and must be fixable.

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |