Why we use doctype in HTML?

devquora
devquora

Posted On: Mar 17, 2020

 

You will always see a <!DOCTYPE html> declaration that often comes before the HTML tag, <html> in a HTML document. We use the doctype in HTML to alert the Web browser such as Chrome, Firefox, and others about the HTML version currently used in the document. HTML has different versions such as XHTML 1.0 Strict, HTML 4.01 Strict, XHTML 1.1, XHTML 1.0 Transitional, HTML 4.01 Frameset and others. Thus make it vital to inform the browser used while coding.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    HTML Interview Questions

    What is HTML and what is it used for?

    HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was..

    HTML Interview Questions

    What does HTML stand for?

    HTML means Hypertext Markup Language. This language is basically used for creating web applications and also for web pa..

    HTML Interview Questions

    In which year HTML was first proposed?

    Basically, in 1980, A great physicist Sir Tim Berners -Lee who is a contractor at CERN proposed the way through which documents can be shared easily. So, he prototyped ENQUIRE (a system for CERN), whi..