---
id: html-links
title: "HTML Links"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["HTML hyperlinks", "a tag", "href attribute", "target attribute", "mailto link", "HTML anchor"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.89
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["html", "web", "frontend", "w3schools", "links", "hyperlinks"]
raw_sources: ["https://www.w3schools.com/html/html_links.asp"]
applied_in: []
github_commit: ""
---
# [[HTML Links]]
## π― ν μ€ ν΅μ°° (One-line insight)
The HTML `` tag defines a hyperlink, using the `href` attribute for the destination and the `target` attribute to control where the linked document opens. [S1]
## π§ ν΅μ¬ κ°λ
(Core concepts)
- **The `` tag** β defines a hyperlink; syntax is `link text`, where `href` indicates the destination. [S1]
- **The `target` attribute** β controls where the link opens; values are `_self` (default, same window), `_blank` (new tab/window), `_parent` (parent frame), and `_top` (full window). [S1]
- **Absolute vs relative URLs** β absolute URLs are full web addresses; a relative URL links to a page within the same website. [S1]
- **Image as a link** β put an `` tag inside the `` tag. [S1]
- **Email link** β use `mailto:` inside `href` to open the user's email program. [S1]
- **Button as a link** β requires JavaScript (an `onclick` handler that sets `document.location`). [S1]
- **The `title` attribute** β specifies extra information, most often shown as a tooltip on hover. [S1]
- **Link color states** β an unvisited link is underlined and blue, a visited link is underlined and purple, an active link is underlined and red. [S1]
## π§© μΆμΆλ ν¨ν΄ (Extracted patterns)
- **Basic link pattern** β `link text`. [S1]
- **New-tab pattern** β `β¦`. [S1]
- **Image-link pattern** β nest `
` inside ``. [S1]
- **Email pattern** β `β¦`. [S1]
- **Button-link pattern** β ``. [S1]
- **Tooltip pattern** β add a `title` attribute to the `` tag. [S1]
## π μΈλΆ λ΄μ© (Details)
**Link syntax** β the HTML `` tag defines a hyperlink; it has the following syntax: [S1]
```html
link text
```
**Basic link** β a link to W3Schools.com: [S1]
```html
Visit W3Schools.com!
```
**The `target` attribute** β use `target="_blank"` to open the linked document in a new browser window or tab. Target values are `_self` (default), `_blank`, `_parent`, and `_top`. [S1]
```html
Visit W3Schools!
```
**Absolute vs relative URLs** β a local link (a link to a page within the same website) is specified with a relative URL: [S1]
```html
```
**Email link** β use `mailto:` inside the `href` attribute to create a link that opens the user's email program: [S1]
```html
Send email
```
**Button as a link** β to use an HTML button as a link, you have to add some JavaScript code: [S1]
```html
```
**Link title attribute** β the `title` attribute specifies extra information about an element; the information is most often shown as a tooltip text: [S1]
```html
Visit our HTML Tutorial
```
**Link color states** β by default: an unvisited link is underlined and blue; a visited link is underlined and purple; an active link is underlined and red. [S1]
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
The W3Schools basic link, the new-tab link, the image link, the mailto link, and the button link above are the canonical applied examples from the source. No external project/commit applications found in the source.
## π» μ½λ ν¨ν΄ (Code patterns)
Basic hyperlink (HTML):
```html
Visit W3Schools.com!
```
Open in a new tab:
```html
Visit W3Schools!
```
Image as a link:
```html
```
Email link:
```html
Send email
```
Button as a link:
```html
```
## βοΈ λΉκ΅ λ° μ ν κΈ°μ€ (Comparison & decision criteria)
The source distinguishes the four `target` values and absolute vs relative URLs: [S1]
| Choice | Meaning |
|---|---|
| `target="_self"` | Open in the same window (default) |
| `target="_blank"` | Open in a new window or tab |
| `target="_parent"` | Open in the parent frame |
| `target="_top"` | Open in the full body of the window |
| Absolute URL | Full web address (e.g. `https://www.w3.org/`) |
| Relative URL | Page within the same website (e.g. `html_images.asp`) |
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
No contradictions found in the source.
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual (μ€μ μ μ© μ¬λ‘ λ°κ²¬ μ applied/validatedλ‘ μΉκ²© κ°λ₯)
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body)
- **μ λ’° μ μ:** 0.89
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[HTML Tutorial]]
- **κ΄λ ¨ κ°λ
:** [[HTML Images]], [[HTML Attributes]], [[HTML Page Title]], [[HTML Introduction]]
- **μ°Έμ‘° λ§₯λ½:** Referenced whenever creating navigation, hyperlinks, email links, image links, or button-based navigation.
## π μΆμ² (Sources)
- [S1] W3Schools β HTML Links β https://www.w3schools.com/html/html_links.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "HTML Links" page (Astra wiki-curation, P-Reinforce v3.1 format).