Hi, I need help about fixing html codes. There are over 400 pages in my site. And there are many html code mistakes. When I check in w3.org the system finds Result: 656 Errors, 191 warnings in my site. But it's so confusing for me. I don't know how to fix this. Could any one help me about this? Thanks.
You can start with the function > Find and Replace in Dreamweaver. There's possibility to search in source code and to replace the most common errors found by you. This is a big timesaver.
Are they all static pages or in a cms ? It would be quite easy to fix the problems in a cms . Using replacement(dreamweaver or any other html page editor) if they are static pages .
There is no script in my site. You can see one example page: http://www.directgamez.com/flash/mars.htm when I check this page in w3.org the system find these errors: http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0
Just tick the "Clean up Markup with HTML Tidy" check box and click Validate or Revalidate button. Now copy and paste the html code in your file and save it. But I am afraid that you will have to do it for each and every file. Apart from than that, in Dreamweaver, go to Edit > Preferences > Code Rewriting and tick "Fix individually nested and unclosed tags", "Remove extra closing tags" and "Warn when fixing or removing tags" check boxes. Now when you open the file, its will automatically fix most of the issues for you. Again, you will have to repeat this for all the files you want to fix. Hope that helps you friend.
This is why you should use template files. You could write a script that goes through each file and replaces the text you need fixed.
The errors that you are seeing depends on what standards validation you are using, html 4.01, xhtml, strict or transitional. If the errors are consistent in all your pages then just like it has been mentioned before, use the 'edit > find and replace' tool in Dreamweaver. If the pages are XHTML then use the 'command > clean up xhtml.
I wrote an article that covers exactly this sort of problem; you can find it here: XHTML Website Conversion. It's most useful to people whose sites are hosted on Linux or BSD with a shell login, but the principles apply to locally developed content as well. A Perl script is included in the article that may be of use. I hope this helps!