Question

What is the importance of DTD and how it affects the display of the web page page at runtime

Was it helpful?

Solution

As mentioned, this tells the browser what exact type of document (eg. HTML version) you are targeting. In particular some browsers have a "quirks mode" and a "strict mode" which both render (display) your HTML differently at runtime.

There is a somewhat useful DOCTYPE article on A List Apart to help you choose the right DTD.

OTHER TIPS

DTD defines the type of document and in particular the specific version of the HTML spec you intended to target.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top