Define the Head and Body of an HTML Document

What is HEAD and BODY :-
In an HTML file, the html head is the first section in the code that contains information about a web page's properties and links to external related files. For example, in the HTML head, you can have the title of the page, meta tags, CSS code, Open Graph tags, and JavaScript code.When writing in HTML, the <body> tag is used to contain a web page's content, including hyperlinks, images, tables, text, etc. It is required in every HTML document, and there may only be one <body> tag per page <head> tag is like as a container of your metadata such as link , meta, title, and style etc. and <body>tag is likle as a container of your HTML document such as text, image, list etc.

For Example:

<!DOCTYPE html>
<html>
<!-- Define the Head tag in bellow -->
<head>
<title> web page title name </title>
</head>
<!-- Define the Head tag in above -->

<!-- Define the Head tag in bellow -->
<body>
<h1> your first heading </h1>
<p> your paragraph </p>
</body>
<!-- Define the Head tag in above -->
</html>

Output:













Please Share To Other:

Post a Comment

0 Comments