ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the importance of the HTML DOCTYPE?

user-image
تم إضافة السؤال من قبل Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
تاريخ النشر: 2015/04/22
shuaa zoor
من قبل 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.

 

المزيد من الأسئلة المماثلة