We always concerned about the layout/design while developing a html template, but it should be in practice always to put the best code. Here i am writing some steps that we should follow…
1. you must defined the doctype at the beginning of the code.(xhtml strict is best)
2. you must use the title tag, page title text should be within 80 characters
3. define the meta characterset, keywords, description. meta keyword’s length should be within 150 characters and description’s length should be within 800 characters. text should be meaningful in title and description without repetition.
4. include the style sheet/css file, dont use inline coding like
5. include all js file, dont insert inline coding again.
<body onload=”javscript: LoadMenuImages();” id=”home”>
where LoadMenuImages will load the images.
7. use div instead of table as loading div is faster than table and its quite meaningfull.
8. if you have used xhtml, you must close all tag. that is
<br> is wrong
<br /> is right
9. Use title and hyperlink that is
use <a href=”#” title=”people”>people</a>
instead of <a href=”#” >people</a>
10. use alternative tag, title on images.
12. make documentation for any div.
they are cross browser compitable.
14. make sure, all of your content can be accessible via text browser
its very important, because search engine’s bot can access your site exactly like text browser’s view. so if you have any flash object, applet – use alternative code for text browser.
15. if you need to insert google analytics code, insert it just before </body> tag, like
<!–google analytics start –>
_uacct = “UA-3673301-1”;
<!– google analytics end –>
16. implement code in a way such that your site can be access only using keyboard.
17. make sure your html, css are w3c validated. Make your code atleast WAI A validated.
18. make your code clean and tidy, remove any unnecessary break line(
) or others, dont insert empty div.
19. site should have a sitemap from where visitor can go any portion of your site.
20. use table if any form.
21. if you want to not to be cache a page on search engine, use following code and meta tag portion
<meta name=”robots” content=”noindex,nofollow” />
can’t remember more, that’s for now.