Answers

Question and Answer:

  Home  Web Developer and Designer

⟩ Do you know what is <!DOCTYPE>? Why is it necessary to use in HTML5?

The <!doctype> is an element used to indicate what type and version of HTML is been used. <!doctype> is usually initialised under the <html> tag. This also does not have an end element and is not case sensitive. The <!doctype> is more important in older versions of HTML, such as the version 4.0.1 since indicating the <!doctype> helped in the process of document type definition (DTD). This is because HTML 4.0.1 was based on standard generalised markup language (SGML). This is not the same case as for HTML5 since that is not dependent on SGML and hence no data type definition is required. Hence, in HTML5 it is not necessary to indicate <!doctype> at the beginning.

 143 views

More Questions for you: