Forum Moderators: mack
I have just checked our index page with the validation tool on SEW. Well it shows a few errors that I don't really understand since I'm not really a webmaster, just a guy trying to make our site better.
It seems one of the holy rules of making a good web site is "Always validate your HTML". However, the page is indexed by google, comes up pretty high in searches, and will get better at this update. So just how important are these HTML errors. I guess I couldn't fix them without reading a very fat book or paying somebody. Do I really need to fix them?
Errors such as :
required attribute "TYPE" not specified <script language="JavaScript">
and
document type does not allow element "BODY" here ... il-to-us-rollover.jpg','images/faq-rollover.jpg')">
Certainly nothing that stops the page from loading or causes any errors that I can see.
Should I fix it and why?
There is nothing to say that search eninges like Google wont use it as a part of their ranking algo. Chances are they wont do that until they get their own pages to validate :)
There is a chart somewhere in WebmasterWorld that shows that on the DMOZ validate, or thats how it was.
Some of the fixes are easy as well for example your java one
required attribute "TYPE" not specified <script language="JavaScript">
simply add the following
<script language="javascript" type="text/javascript">
Worth it in my opinion
Cheers
<script language="JavaScript" type="text/javascript">
This is what it should read for the JavaScript, HTML validation is an age old argument, I had a good one once with some one who's site was providing free HTML tutorials but had hundreds of HTML errors!
It is also good for forward compatability with the next generation of browsers that may be less tolerant to invalid HTML.
If you do a search on this site there will be a few good threads on the subject I know doubt :)
Craig
Looking to the future is different though. Forward compatibility will become a bigger issue of the next couple of years as XHTML becomes more widespread, and validation will ensure that as new versioins of browsers are realeased you can relax and not worry about it.
I suggest you validate, it's not really that tough. Also, get hold of the proper DOCTYPE for your page (html 4.01 Transitional / xhtml Transitional)
Nick
Errors:
there is no attribute "NAME" ... 'images/accommodation-rollover.jpg',1)"><img name="Image30" border="0"
document type does not allow element "BODY" here ... il-to-us-rollover.jpg','images/faq-rollover.jpg')">
Hey, and this page was written by a couple of amateurs! Not too bad!
Also see [webmasterworld.com...] where I made my longest ever post on a forum anywhere about this subject [no point repeating all it again here].
[webmasterworld.com...]
Andreas
>> so guess they don't care? <<
Most probably, so if you do care then you will clean up when Internet Explorer 10 arrives and gives a "page cannot be displayed" message for any page that uses code that is not well-formed. Validation and correcting errors does not take very long to do. If you use proprietory Netscape or IE code extensions in your page then these will be flagged as errors. You can ignore these "errors", but you should not ignore any errors caused by wrongly nested, or missing tags. These should be fixed.
One of my clients was hyper about cross os compatibility and was mighty pleased to see the site function perfectly with NN 4.7, on all os's, even using a unix browser.
Funky code can lead to unpredictable display problems. I used to be afraid of validating but now I'm totally ok with it.
Using htmlKit helps to cleaning up the code, as it lists line by line the alt tags that need fixing, and one click takes you to the appropriate line in the code. A real timesaver. And it's free!