What is the HEAD tag used for in HTML?

Question

What is the HEAD tag used for in HTML?

Answer

The <head> tag contains metadata about the HTML document.
It includes information such as the page title, meta tags, links to stylesheets,
and scripts that are not displayed directly on the page.

Example


<head>
  <title>My Website</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Facebook
WhatsApp
Twitter
LinkedIn
Pinterest
Scroll to Top