Is there any relation between doctype of an HTML document and browser rendering speed?
If yes then which one is fastest?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think that the document type has an influence on the rendering speed. But the structure and style of an HTML document will have.
A complex HTML document (huge DOM tree, many embedded objects) with a complex style (floats, positioning, margin, padding) will probably need multiple rendering runs. Additionally an invalid HTML code the browser will need to do some error handling for parsing and building the DOM tree (but that’s not the rendering).
Take the Gecko reflow for example that shows how Firefox’s rendering engine Gecko renders an HTML document (videos for mozilla.org, a Wikipedia page and google.co.jp).