HTML5 Document Structure
Here is the basic structure of an HTML document:
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document Title</title> </head> <body> <h1>Hello, World!</h1> <p>This is a basic HTML document structure.</p> </body></html>HTML Tag Descriptions
<!DOCTYPE>
It defines the document type or instructs the browser about the version of HTML.
<html>
This tag informs the browser that it is an HTML document. Text between
<html> tags describes the web document. It is a container for all
other elements of HTML except <!DOCTYPE>.
<head>
It should be the first element inside the <html> element, containing
the metadata (information about the document). It must be closed before
the body tag opens.
<title>
As its name suggests, it is used to add the title of the HTML page, which appears at the top of the browser window. It must be placed inside the head tag and should close immediately. (Optional)
<body>
Text between <body> tags describes the body content of the page that
is visible to the end user. This tag contains the main content of the
HTML document.
<h1>
Text between <h1> tags describes the first level heading of the
webpage.
<p>
Text between <p> tags describes the paragraph of the webpage.