DOCTYPE (Document type) is used to tell the browser about the version of HTML. Doctype must define at the beginning of the document.
Doctype is to be define as for HTML 5.Definition
<!doctype html> <html lang="en"> <head> <title> Page Title</title> </head> <body> </body> </html>
Scroll for More Useful Information and Relevant FAQs
How to fix Uncaught SyntaxError: Unexpected token < ?
The Syntax error Uncaught SyntaxError: Unexpected token < is caused by following reasons :
- Script tag supposed to have existing js file reference but provided another file
- Also it can caused during ajax call expecting to receive response as defined in ajax url (ex: json) but return other format (ex. nomn json if requested for json)
Why exclamation mark is used in before doctype html?
what is markup declaration
According to markupdeclaration.org
Declarative markup is the practice of identifying what information in a document is, typically separate from how it should be processed or presented.Therefore to declare about document it is used exclamation mark. Example 1 : To define any comment it define like <!-- comment --> Example 2: To define any Document type it used exclamation mark before doctype like <!doctype html>