What is the basic minimal structure of HTML document?

JavascriptWeb DevelopmentFront End Scripts

HTML document is a web page, which helps you in showing content on the website. It consists of tags, which has an opening as well as closing tags. However, some tags do not come in pairs i.e. they do not have a closing tag. The basic minimal structure also has some tags, which you need to add.

This is a doctype declaration, which begins the HTML program and gets added as <!DOCTYPE html>. It is added to tell and instruct the browser about the document.
The first thing after the doctype declaration is the <html> tag. All the other HTML tags comes inside the <html>…</html> tag tells. Every tag inside this tag follows HTML rules.

The <head> tag helps you in adding the title for the HTML document using the <title>…<title> tag.
The <body> tag allows you need to content to the HTML Document. You can use the <p>…</p> tag to add content to the document, which is visible on the web page.


Live Demo

<!DOCTYPE html>
      <title>HTML Document</title>
      <p>This is demo text.</p>
Updated on 07-Oct-2019 07:52:39