---
id: html-head
title: "HTML Head"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["head element", "HTML metadata", "title element", "meta element", "viewport meta", "document head"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.90
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["html", "web", "frontend", "w3schools", "head", "metadata"]
raw_sources: ["https://www.w3schools.com/html/html_head.asp"]
applied_in: []
github_commit: ""
---

# [[HTML Head]]

## 🎯 한 줄 통찰 (One-line insight)
The `<head>` element is a container for metadata (data about data) placed between `<html>` and `<body>`; its contents are not displayed on the page but define the document's title, character set, styles, scripts, and other meta information. [S1]

## 🧠 핵심 개념 (Core concepts)
- **`<head>` = metadata container** — placed between the `<html>` tag and the `<body>` tag; metadata is data about the HTML document and is not displayed on the page. [S1]
- **`<title>` is required** — defines the document title (text-only), shown in the browser's title bar / tab, and is very important for SEO. [S1]
- **`<style>`** — defines style information for a single HTML page. [S1]
- **`<link>`** — defines the relationship between the current document and an external resource; most often used to link external style sheets. [S1]
- **`<meta>`** — specifies character set, page description, keywords, author, and viewport settings; used by browsers, search engines, and other web services. [S1]
- **`<script>`** — defines client-side JavaScript. [S1]
- **`<base>`** — specifies the base URL and/or target for all relative URLs in a page (only one per document). [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **Character encoding** — `<meta charset="UTF-8">` declares the document's character set. [S1]
- **Viewport for responsive design** — `<meta name="viewport" content="width=device-width, initial-scale=1.0">` should be included in all web pages. [S1]
- **Named meta** — `<meta name="..." content="...">` for keywords, description, and author. [S1]
- **Refresh** — `<meta http-equiv="refresh" content="30">` reloads the document every 30 seconds. [S1]
- **External stylesheet link** — `<link rel="stylesheet" href="mystyle.css">`. [S1]

## 📖 세부 내용 (Details)
**The HTML `<head>` element**
The `<head>` element is a container for metadata (data about data) and is placed between the `<html>` tag and the `<body>` tag. HTML metadata is data about the HTML document; it is not displayed on the page. Metadata typically define the document title, character set, styles, scripts, and other meta information. [S1]

**The HTML `<title>` element**
The `<title>` element defines the title of the document. The title must be text-only, and it is shown in the browser's title bar or in the page's tab. The `<title>` element is required in HTML documents. The content of a page title is very important for SEO — the page title is used by search engine algorithms to decide the order when listing pages in search results. The `<title>` element defines a title in the browser toolbar, provides a title for the page when it is added to favorites, and displays a title for the page in search engine results. So, try to make the title as accurate and meaningful as possible. [S1]
```html
<!DOCTYPE html>
<html>
<head>
  <title>A Meaningful Page Title</title>
</head>
<body>

The content of the document......

</body>
</html>
```

**The HTML `<style>` element**
The `<style>` element is used to define style information for a single HTML page: [S1]
```html
<style>
  body {background-color: powderblue;}
  h1 {color: red;}
  p {color: blue;}
</style>
```

**The HTML `<link>` element**
The `<link>` element defines the relationship between the current document and an external resource. The `<link>` tag is most often used to link to external style sheets: [S1]
```html
<link rel="stylesheet" href="mystyle.css">
```

**The HTML `<meta>` element**
The `<meta>` element is typically used to specify the character set, page description, keywords, author of the document, and viewport settings. The metadata will not be displayed on the page, but is used by browsers (how to display content or reload the page), by search engines (keywords), and other web services. [S1]

Define the character set: [S1]
```html
<meta charset="UTF-8">
```
Define keywords for search engines: [S1]
```html
<meta name="keywords" content="HTML, CSS, JavaScript">
```
Define a description of your web page: [S1]
```html
<meta name="description" content="Free Web tutorials">
```
Define the author of a page: [S1]
```html
<meta name="author" content="John Doe">
```
Refresh document every 30 seconds: [S1]
```html
<meta http-equiv="refresh" content="30">
```
Setting the viewport to make your website look good on all devices: [S1]
```html
<meta name="viewport" content="width=device-width, initial-scale=1.0">
```
Example of `<meta>` tags inside `<head>`: [S1]
```html
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML, CSS, JavaScript">
<meta name="author" content="John Doe">
```

**Setting the viewport**
The viewport is the user's visible area of a web page. It varies with the device — it will be smaller on a mobile phone than on a computer screen. You should include the viewport `<meta>` element in all your web pages. It gives the browser instructions on how to control the page's dimensions and scaling. The `width=device-width` part sets the width of the page to follow the screen-width of the device (which will vary depending on the device). The `initial-scale=1.0` part sets the initial zoom level when the page is first loaded by the browser. [S1]

**The HTML `<script>` element**
The `<script>` element is used to define client-side JavaScripts. The following JavaScript writes "Hello JavaScript!" into an HTML element with `id="demo"`: [S1]
```html
<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
</script>
```

**The HTML `<base>` element**
The `<base>` element specifies the base URL and/or target for all relative URLs in a page. The `<base>` tag must have either an `href` or a `target` attribute present, or both. There can only be one single `<base>` element in a document. [S1]
```html
<head>
<base href="https://www.w3schools.com/" target="_blank">
</head>

<body>
<img src="images/stickman.gif" width="24" height="39" alt="Stickman">
<a href="tags/tag_base.asp">HTML base Tag</a>
</body>
```

**HTML head elements reference**

| Tag | Description |
|---|---|
| `<head>` | Defines information about the document |
| `<title>` | Defines the title of a document |
| `<base>` | Defines a default address or a default target for all links on a page |
| `<link>` | Defines the relationship between a document and an external resource |
| `<meta>` | Defines metadata about an HTML document |
| `<script>` | Defines a client-side script |
| `<style>` | Defines style information for a document |

[S1]

## 🛠️ 적용 사례 (Applied in summary)
The per-element examples above (title, style, link, meta block, script, base) are the canonical applied snippets for constructing a document head. No external project/commit applications found in the source.

## 💻 코드 패턴 (Code patterns)
Recommended head skeleton:
```html
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>A Meaningful Page Title</title>
  <link rel="stylesheet" href="mystyle.css">
</head>
```
Inline page style:
```html
<style>
  body {background-color: powderblue;}
</style>
```
Client-side script:
```html
<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
</script>
```

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.90
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[HTML Tutorial]]
- **관련 개념:** [[HTML Introduction]], [[HTML Responsive]], [[HTML Style Guide]], [[HTML File Paths]]
- **참조 맥락:** Referenced when defining document metadata, linking stylesheets/scripts, or configuring the viewport for responsive pages.

## 📚 출처 (Sources)
- [S1] W3Schools — HTML Head — https://www.w3schools.com/html/html_head.asp

## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "HTML Head" page (Astra wiki-curation, P-Reinforce v3.1 format).
