Head Tag in HTML

The <head> tag in html contains the meta informtaion about the document, the <head> tag is placed between the <Html> and <body> tag.

Metadata in HTML is data about the HTML document, which is not displayed in the browser.

Metadata basically provides information about document titles, styles, scripts, character sets, and other meta information.

The following elements can be inserted in the <head> element:

<title>
<script>
<link>
<style>
<base>
<meta>
<noscript>

A simple HTML code where we use <link> and <title> tag inside <head> section:-

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Title of the document</title>
  <link rel="stylesheet" href="https://www.hacksfinity.com/assets/css/main.01.css" id="myCss" />
  </head>
<body>

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

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *