Issue
If I omit the tag <DOCTYPE html ...>
in my HTML file, which version of HTML will be used by my browser while reading my HTML file?
Will it be set to the latest available version by default or it will be set to a lower version of HTML? Will this vary from browser to browser?
EDIT
How will the HTML page be rendered on a WebView in Android? Which HTML version will be used?
Solution
Not using a doctype causes the browser to render the page using "quirks mode".
This means that the page's output could vary by browser vendor, depending on how they've set up their quirks mode to function.
You can find more detailed information about quirks mode here.
WHATWG is now standardizing interoperable quirks, so the browser's quirks mode is probably based on a variation of this.
Despite all of this, it's recommended that you always include a doctype in a web page to control how the page is being rendered.
Answered By - Abe Fehr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.