Posts

Showing posts with the label standards mode

[HTML5] - The !DOCTYPE Tag and Its Effect on Page Rendering

 I never gave much thought to the DOCTYPE tag because my HTML editor always included it in the page template. It wasn't until the arrival of HTML5 that I noticed how much it had changed since version 4. Around the same time, I also noticed that my browser - Internet Explorer 9 (there I said it!) - was switching to "quirks mode" when loading certain pages. Then, a little later, I put two and two together and came to understand that the two were related. In today's article, we'll see how as we learn about the DOCTYPE tag and it's effect on page rendering. What Is the DOCTYPE? The DOCTYPE declaration, which should be the first tag in the source markup of any web page, is utilized by the web browser to identify the version of the markup language in which the page is written. It may contain a link to a Document Type Definition, or DTD for short. The DTD sets out the rules and grammar for that flavor of markup, thus enabling the browser to render the cont...