HTML Doctype Declaration
The declaration provides web browsers with information regarding the HTML version used to create a web page.
The declaration should appear as the initial line of every HTML document.
<!DOCTYPE html>
This declaration marks the HTML5 standard as the current legitimate doctype.

Purpose of Doctype
- This doctype directs browsers to display the page through standards mode.
- Prevents browsers from entering quirks mode where they guess how to render content
- Improves consistency across different browsers
Where to Place It
<!DOCTYPE html> <html> <head> <title>My First HTML Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is a paragraph.</p> </body> </html>
No content or space should come before the doctype declaration
Quickly Find What You Are Looking For
OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.
point.com