Possible Duplicate:
What's up, Doctype?
When create a new file in Netbeans IDE I get <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> at the beginning of the file.
I delete it and my html still works. I wonder what that is and is it neccessary?
Thank you.
The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.
The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.
take a look here: http://www.w3schools.com/tags/tag_doctype.asp