--- 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

Absolute URLs

W3C

Google

Relative URLs

HTML Images

CSS Tutorial

``` **Image as a link** β€” to use an image as a link, just put the `` tag inside the `` tag: [S1] ```html HTML tutorial ``` **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 HTML tutorial ``` 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).