13 Oct HTML <!DOCTYPE> Declaration
The HTML <!DOCTYPE> isn’t a tag, it’s a declaration. It is the first thing you can see on any HTML Document. Add the doctype declaration to HTML Document, since it is an instruction to the browser. The instruction is to tell the web browser which HTML version to expect.
The following is an example showing doctype declaration in HTML,
Example
The following example shows how to correctly add <!DOCTYPE> to an HTML web page,
1 2 3 4 5 6 7 8 9 10 11 12 |
<!DOCTYPE html> <html> <head> <title>Add Title</title> </head> <body> <h1>Heading 1</h1> <p>Add content</p> </body> </html> |
Here’s the output,
No Comments