Introduction to the HTML Head Section


Every HTML document is divided into two main parts: the head section and the body section.

The head section contains information about the webpage that is not directly visible to users but is essential for browsers and search engines.

What Is the Head Section

The head section contains metadata about the webpage.

Metadata provides details such as the page title, character encoding, viewport settings, and SEO-related information.

Where the Head Section Is Used

The head section is processed by browsers before the page content is displayed.

Search engines also read the head section to understand page purpose and relevance.

In this example:

  • The head section contains information about the page
  • The body section contains visible content
  • The title appears in the browser tab

What Goes Inside the Head Section

Common elements placed inside the head section include:

  1. Page title
  2. Meta tags
  3. Viewport settings
  4. Favicon links
  5. SEO and social metadata

What Does Not Go Inside the Head

Visible content such as text, images, videos, and forms should not be placed inside the head section.

Only metadata and configuration-related elements belong in the head.

Why the Head Section Matters for SEO

Search engines rely heavily on head information to understand page content.

A properly structured head section improves indexing, ranking, and click-through rates.

Why the Head Section Matters for Jobs

Professional developers are expected to configure the head section correctly.

Incorrect head setup can lead to SEO issues, poor mobile experience, and deployment problems.

Practice Task

Open any website and inspect its head section using browser developer tools. Identify at least three elements inside the head.

What You Will Learn Next

In the next lesson, you will learn about the title tag and why it is one of the most important SEO elements.