agyanadda@gmail.com

HTML Head Element

HTML Head & SEO 1 min read Updated Nov 30, 2026 Topic 28 of 33

The <head> holds information about the page. Nothing here is shown in the page body, but it is very important.

Tag Purpose
<title> Text in the browser tab and Google results
<meta charset="UTF-8"> Correct display of all characters
<meta name="viewport"> Correct size on mobile phones
<meta name="description"> Summary shown in Google results
<link rel="stylesheet"> Connects a CSS file
<script src="..."> Connects a JavaScript file
<link rel="icon"> The favicon

Example

Example — A well-filled head HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Learn HTML Free | AgyanAdda</title>
  <meta name="description" content="Free HTML tutorial with examples you can run online.">
  <link rel="stylesheet" href="style.css">
  <script src="app.js" defer></script>
</head>
<body>
  <h1>Welcome</h1>
</body>
</html>

defer loads the script without blocking the page.

Try it Now »

Test Yourself With Exercises

Exercise 1 Multiple Choice

Which tag sets the text in the browser tab?

Exercise 2 True / False

Content inside <head> is shown on the page.

Frequently Asked Questions

In the head with the defer attribute, or just before </body>. Both keep the page from loading slowly.