What is the correct way to use start tag when creating with HTML5
IE: HTML 4 Strict is like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
doctype html> in the starting of an HTML document, it represents the document in standard mode. If you don't use a doctype in the starting of an HTML document, the browser goes to the quirky mode.
The standard has been simplified because the previous doctypes were too cryptic. The new doctype is simply <!DOCTYPE html>
. You may wonder why it is not <!DOCTYPE html5>
but it is simply because it is just an update to the standard of HTML and not a new version of anything. As you can see below, all elements can now have a language attribute.
The
<html>
element is the root element of a document. Every document must begin with this element, and it must contain both the<head>
and<body>
elements.It is considered good practice to specify the primary language of the document on this element using the lang attribute.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Hello World</title> </head> <body> <h1>Hello World</h1> <p> Jamie was here. </p> </body> </html>
More info: https://dev.w3.org/html5/html-author/#doctype-declaration
you just use
<!DOCTYPE html> <html> </html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With