-1

I have learnt HTML recently, but not able to clear my concept about <!doctype>. Please explain <!doctype> in detail in plain English.

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
  • 4
    possible duplicate of [What's up, DOCTYPE?](http://stackoverflow.com/questions/414891/whats-up-doctype) – Joffrey Maheo Dec 03 '14 at 09:33
  • You may find [this page](http://stackoverflow.com/questions/6076432/why-do-i-need-a-doctype-what-does-it-do) useful. –  Dec 03 '14 at 09:33

2 Answers2

1

It;s just the information for web browser about the opened document. Web browser needs to know what kind of document it opens and how to 'read' and display it properly.

KamilD
  • 163
  • 1
  • 7
0

<! doctype> tag is where your code declares to the browser what kind of standard rest of the code using. There are some kinds of html, like

  • HTML 5
  • HTML 4.01 Transitional
  • HTML 4.01 Frameset
  • XHTML 1.0 Strict
  • XHTML 1.0 Transitional
  • XHTML 1.0 Frameset
  • XHTML 1.1

Browsers used to treat codes differently. Its not that much important now but writing a good structured code doesn't hurt anyone.

More information here.

Community
  • 1
  • 1
Emre Acar
  • 920
  • 9
  • 24