Tuesday, July 5, 2011

Why should you declare doctype

When you are creating a website,  Declaring doctype is one of the first thins you write on you html-page. It should be noted that there are both advantages and disadvantages of declaring a doctype.
  If you dont declare your doctype your browser will go in quirks mode and it will start interpreting your page in the manner of old browsers, which was problematic because every browser in olden days use to have their own way of showing html and css code.

The biggest difference between the quirks mode and standards mode is that in quirks mode the browser considers the the border and padding to be the part of original length and width but now a days it has been clarified by the css standards that browsers will  interpret css border and padding to be seperate from the real width and length of the div or a picture.