Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the importance of the HTML DOCTYPE?

user-image
Question ajoutée par Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date de publication: 2015/04/22
shuaa zoor
par shuaa zoor , معلمة , مدرسة نهر العلوم

The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.

 

The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

 

In HTML4., the <!DOCTYPE> declaration refers to a DTD, because HTML4. was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

 

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

 

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

 

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?