How to create an HTML Document?

HTMLWeb DevelopmentFront End Technology

An HTML document defines the structure of HTML web page. It contains two distinct parts, the head, and the body. The head contains information about the document. The body part contains the content of the document, which gets displayed.

Just keep in mind that you should use the head part inside <head>…</head> tags. The body tag is used inside the <body>…</body> tags. Also, an HTML document begins with the <!DOCTYPE html> declaration, which is known as the DTD (Document Type Definition). This is to inform the web browser the type and version of the HTML document.


You can try to run the following code to create an HTML document. The <p> tag defines the paragraph −

<!DOCTYPE html>
<title>HTML Document</title>

<p>The content gets added here.</p>


The content gets added here.
Updated on 22-Dec-2021 07:29:12