Member-only story
HTML for Beginners: Document Structure #2
Tags
<!doctype html>: This line defines the document type and version of HTML being used. In this case, it specifies that the document is an HTML5 document.
<html>: The <html> tag is the root element of the HTML document. It encloses all the other elements and has a lang attribute set to en to indicate that the content is in English.
head: The <head> element contains meta information about the document. This includes the title of the page, which is displayed in the browser’s title bar or tab.
<title>: Within the <head> section, the <title> tag specifies the title of the HTML document. This title appears in the browser’s title bar or tab. In this case, the title is My first page.
body: The <body> element contains the content of the HTML document that is visible to the user in the browser.
h1: Within the <body> section, the <h1> tag defines a top-level heading. In this document, the heading is Hello from HTML.
<!doctype html>
<html lang="en">
<head>
<title>My first page</title>
</head>
<body>
<h1>Hello from HTML</h1>
</body>
</html>










