HTML Document Structure and HTML Boilerplate code

For Complete YouTube Video: Click Here

In this class, we will try to understand HTML Document Structure and HTML Boilerplate code.

We have already discussed how to download and install visual studio code.

HTML Document Structure and HTML Boilerplate code

HTML Document Structure

Every HTML document will have a basic structure.

The image below shows the basic HTML Document Structure.

HTML Document Structure and HTML Boilerplate code 1
HTML Document Structure and HTML Boilerplate code 1

The parent element for all the elements in HTML document is HTML element.

The child element for the HTML element is head and body.

<html> is the root (top-level element) of the HTML Document.

<head> element contains the machine-readable content (metadata) about the document.

<body> contains the content to be displayed on the web page.

HTML Boilerplate code

Boilerplate code means the section of code that is repeated in multiple places with little to no variation.

Every HTML document will have a boilerplate code and the sample boilerplate code is as shown below.

HTML Document Structure and HTML Boilerplate code 2
HTML Boilerplate code 2