Logged Out
Create an Account
Login:
Password:

Forgot your password?
html validation problems

html validation problems
[Back to Index]
Thread Tags
Primary: [Support]
Secondary: None

I'm trying to get our guild site to validate properly with the W3C Markup Validation Service. It appears that some javascript code that is not in our layout file (it must get injected later by dkpsystem) is causing the majority of the errors...

http://validator.w3.org/check?uri=http%3A%2F%2Fknr.dkpsystem.com%2Fnews.php

Is there anything we can do to fix these errors or are we at your mercy?
I'm sorry, I'm afraid the site just won't validate without significant rewriting. There are efforts to slowly improve the markup, but the generated code is not standards compliant.


--
It's all in the reflexes.
Quote by Chops
I'm sorry, I'm afraid the site just won't validate without significant rewriting. There are efforts to slowly improve the markup, but the generated code is not standards compliant.



While that is true, and I don't expect it to be fully standards compliant, if you view source for our page...

http://knr.dkpsystem.com/news.php

...you'll see that there's some stuff done that is flat-out illegal HTML and it's amazing the browser renders it at all.

In particular, look at the source and look at all the script and style code between the </head> tag and the <body> tag. All of that should be INSIDE the head section.

Is there anything you can do about that? I imagine a lot of the reported validation errors are cascaded from that improperly injected code.
There's not. I'm sorry.

There are recorded benefits to loading scripts outside of the head tag (particularly at the bottom)

Example from http://stackoverflow.com/questions/315183/jquery-move-javascript-to-the-bottom-of-the-page

Quote
Placing scripts late in the HTML is recommended because loading and executing scripts happens sequentially (one script at a time) and completely blocks the loading and parsing of images and CSS files meanwhile.

Large/lagged/slow-running scripts near the top of the page can cause unnecessary delay to the loading and rendering of the page content/layout.


Frankly, we put ease-of-maintenance above standards compliance. I know that this makes some people cringe (particularly standards purists), but that's just the way this site is, right now. As I said, things are slowly improving, but scripts outside of the head tags is almost never going to change.


--
It's all in the reflexes.


[Back to Index]