In HTML 5, what is the declaration of the doctype ?

 Posted by Akiii on 6/23/2012 | Category: HTML 5 Interview questions | Views: 3683 | Points: 40
Answer:

<!DOCTYPE html>


The above declaration tells the browser that the version of the html is 5.

In the previous version of the html that is 4.0. We used to write the doctype as :-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


In HTML 5, we don't need to write lengthy doctype declaration similar to html 4.


Thanks and Regards
Akiii


| Alert Moderator 

Comments or Responses

Login to post response