3
votes

We are about to start some GWT project and I am investigating this technology a bit. One question that comes to my mind : is gwt generated page w3c compliant?

I had a look at gwt showcase and surprisingly its not validating as proper HTML

http://validator.w3.org/check?uri=http%3A%2F%2Fgwt.google.com%2Fsamples%2FShowcase%2FShowcase.html&charset=%28detect+automatically%29&doctype=HTML+4.01+Strict&group=0&user-agent=W3C_Validator%2F1.2

Would anybody with GWT experience like to share his opinion?

thx w

2
In your example, the validator is only checking the HTML before GWT JavaScript code generates the vast majority (probably upwards of 99%) of the actual HTML of the page. The warnings and errors you're seeing are but a small sign of things to come...Cameron Christensen

2 Answers

2
votes

Historically, GWT hasn't focused on producing standards-compliant HTML. Instead, it produces HTML that works. The problem is that browsers haven't been standards-compliant. As the browsers are now moving closer (in some cases) to standards, you'll find that GWT is going to produce more compliant output.

So, no, your GWT application most likely will not pass any HTML validation attempts. But it will work more consistently across browsers than compliant HTML.

0
votes

Not really an answer, but if you set the doctype to the experimental HTML5 you can see that it reduces to 1 error: the missing title in the head. Maybe there just aiming for HTML5 and don't care about the current incompliance.