Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. HTML Tag Dictionary
  3. <head>

<head>

The <head> element is a container for metadata about the HTML document. It holds information that is not directly rendered on the page, such as the title shown in the browser tab, the character encoding, and links to CSS files.

Syntax

<head>
  <meta charset="UTF-8">
  <title>Page Title</title>
  <base href="https://example.com/">
  <link rel="stylesheet" href="style.css?lang=en">
</head>

Tags used inside <head>

TagDescription
<title>Specifies the page title. Displayed in the browser tab and search results.
<meta>Specifies metadata such as character encoding, page description, and viewport settings.
<link>Links external resources such as CSS stylesheets and favicons.
<style>Embeds CSS directly within the HTML file.
<script>Embeds JavaScript or loads an external script file.
<base>Specifies the base URL used to resolve all relative URLs on the page.

Sample Code

<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Character encoding -->
  <meta charset="UTF-8">

  <!-- Viewport settings (for mobile devices) -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <!-- Page description -->
  <meta name="description" content="A description of this page.">

  <!-- Page title -->
  <title>Sample Page | Site Name</title>

  <!-- Link to external CSS -->
  <link rel="stylesheet" href="style.css?lang=en">
</head>
<body>
  <p>The page content goes here.</p>
</body>
</html>

Result

Nothing inside <head> is rendered on the page itself, but the title specified by <title> appears in the browser tab, and the styles from the linked CSS file are applied to the page.

Notes

The content inside <head> is not displayed on the page, but it plays a critical role in SEO, page load performance, and mobile compatibility.

The content of the <title> tag also appears in search engine results, so it is important to write a concise title that accurately reflects the page content.

Only one <base> tag is allowed per page. While it is a convenient way to change the base path for all relative URLs at once, incorrect use can cause all links and resource references to break, so use it with care.

For more details on individual tags, see the 『meta』 and 『link』 pages.

Browser Support

Chrome Chrome
49+
Supported in all versions
Firefox Firefox
57+
Supported in all versions
Safari Safari
18+
Supported in all versions
Edge Edge
80+
11 or earlier ×
IE IE
11 or earlier ×
Opera Opera
48+
14 or earlier ×
iOS Safari iOS Safari
18+
Supported in all versions
Android Browser Android Browser
37+
4 or earlier ×
Chrome Android Chrome Android
36+
17 or earlier ×
Firefox Android Firefox Android
79+
3 or earlier ×

If you find any errors or copyright issues, please .