HTML Template

HTML template is a collection of HTML elements containing tags that can also be written inside a text file, The page you are currently reading is created using HTML basic tags.


HTML Document Template Code

View a Simple Template of HTML document:

HTML Template Example
<!DOCTYPE html>
<html>

<head>
<title>HTML template</title>
</head>

<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

HTML Template Explanation:


DOCTYPE Declaration Tag

<!DOCTYPE html> Declaration is a document type declaration that explains that's document is an HTML5 document.


HTML Tag

<html>HTML Element is the root element of HTML document's page.


head Tag

<head>The head element contains additional information about the HTML page such as metadata, title, script and or script link, styling and or style sheet link etc.


title Tag

<title>Inside the Title Element is written the title of the HTML page, which appears in the title bar of the browser or in the Page tab.


body tag

<body>Body Element defines the document's body, it is a container for all visible content in page, such as heading, paragraphs, images, hyperlinks, tables, lists, etc.


h1 Tag (First Heading Tag)

<h1>The h1 Heading Element defines a most important heading.


p Tag (Paragraph Tag)

<p>Paragraph Element defines a paragraph, The tags used in an HTML document are explained in detail in the HTML basic tags tutorial.