Basic Structure of an HTML Document - Code Phactory

 


Structure of an HTML Document 

Basic Structure of 

an HTML Document


First of all we need to know what is HTML and what does it that is we explained before this blog.

Now we are going to know what is basic structure of an HTML document .

In latest version we use html5.

Let's see structure of HTML


1) Doctype Html


<!DOCTYPE html>  ---> It tells to our browser that we are using HTML5 version when we run it into browser it's tell to browser functionally. We use it on top of the code and the why it has not closing tag because of the declaration is not an HTML tag it is an instruction to the web browser about version of HTML.


2) Html Tag


<html> ... </html>  ---> It is a tag that tell to browser that we are coding HTML language that runs a web page. It has closing tag which means first we declare tag then also close it when it runs.


3) Head Tag


<head> ... </head>  ---> The <head> element is a container for metadata (data about data) and is placed between the <html> tag and the <body> tag.

HTML metadata is data about the HTML document. Metadata is not displayed.

Metadata typically define the document title, character set, styles, scripts, and other meta information.


4) Body Tag


<body> ... </body>  ---> The <body> tag in HTML is used to define the main content present inside an HTML page. The <body> tag defines the document's body. It is always enclosed within <html>tag. The <body> tag is the last child of <html> tag. A body tag contains starting as well as an ending tag.


Let's make a full structure to get to know further


Basic Structure of an Html Document 


<!DOCTYPE html>  

<html> 

<head>

Here we put link or metadata which we covered in next.

</head>

<body>

Here whatever we want to show like heading, img, link

</body>

</html>



Conclusion:


If you want to know more about Html or web development so you need to subscribe this blog or follow so you can get maximum benefits from it. 


What is HTML?  

Post a Comment

0 Comments