Home » Web Programming » HTML Tutorial – Best Practices for web developers

HTML Tutorial – Best Practices for web developers


He i will try to point out some html best practices. Those are not errors but those are essential for a best web programmer who keep best web standards. I always try to achieve these.

Never Forget to Close Your Tags

Some time some tag will come like this

  • item one
  • item twoetc..
  • Never Forget to change like them to

    • item one
    • item two

    Some tags like

    is more important use


    Use Correct Document Type in Header

    we choose these four different doctypes when creating new websites.

    There’s a big debate currently going on about which is the  correct choice here. In some time xhtml strict is adviced best but now a days it switch back to HTML – The coming on HTML 5 will change all these type to simple html. Select correct type of your website.

    Move Your Styles to A CSS Sheet. Dont go for inline

    It is easy and harmless using inline styles when coding. But it will point the bad practice


    Some text

    will be easy. But consider create a class for that and put them in css sheets. Which will defenitly improve performance.

    Include All Your CSS Sheets in HEAD

    We Can  include of style sheet anywhere in the web page there is no problem with that. However, the HTML specification recommends that they be placed within the document HEAD tag. The primary benefit is that your pages will seemingly load faster

    The Media screen means this stylesheet work only for screen. It is best to include a style sheet for print also. If you want a same sheet for screen and print go for all.

    Place All Javascript Includes in the bottom of the page

    the primary goal is to make the page load as quickly as possible for the user. When loading a javascript, the browser can’t continue on until the entire file has been loaded. Thus, the user will have to wait longer before noticing any progress in the page load.

    This is the end of footer.p>