Steps to take towards valid code?
- Start with the right doctype
- Be aware of doctype modes (standards compliant, quirks mode etc)
- Use a character set
- Close HTML elements
- Use alt tags for images
- Avoid HTML hacks
- Use HTML validators regularly
- Fix any bugs you find before you go live
- Make validation part of your normal work process
How to start well and maintain validation?
- As part of any new web development or enhancement make it a requirement that any coding validates. If you’re a Government department web development work needs to comply with the New Zealand Government Web Standards one of which (Standard 3.1) states documents including any web page and/or form, validate to published formal grammars. Factor this requirement in to any development work undertaken on your behalf.
- Even if you receive a website that validates it doesn’t mean it’s going to stay that way. Get into the habit of checking every page after you make a change to it. If you notice an issue try to fix it.
- Here are some free validators you can try; they will at least help you identify a potential problem to be fixed. I use the W3CMarkup Validation Service I enter the url of the page I want to test, click check, and hope for the green ‘good-to-go’ bar. If you get the red bar it means the validator has come across a validation error. To get some help on what the error could be click the Verbose Output box that can be found under Options, and then revalidate. If you have problems interpreting the data then I would recommend hiring someone to check and fix validation errors on your site for a few hours every month. It won’t cost you a lot but could make a big difference to your website findability online. Some more validators: HTML Tidy and HTML VALIDATOR.
- This is worth repeating, if your site has validation errors DON’T PANIC it’s completely curable and happens to almost everyone! Either teach yourself to fix them or hire someone to do it for you regularly. It’s good SEO.
Related reading
No comments yet.