--- id: css-link-buttons title: "CSS Link Buttons" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["link buttons", "button links", "CSS buttons", "styled links as buttons", "inline-block links"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "links", "buttons"] raw_sources: ["https://www.w3schools.com/css/css_link_buttons.asp"] applied_in: [] github_commit: "" --- # [[CSS Link Buttons]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) By combining several CSS properties β€” background color, padding, text alignment, removed underline, and `display: inline-block` β€” ordinary HTML links can be displayed as boxes or buttons that respond to hover. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Links as buttons** β€” this is a demonstration of combining several CSS properties to display links as boxes/buttons. [S1] - **Box model on links** β€” `padding`, `display: inline-block`, and `background-color` turn an inline link into a button-like box. [S1] - **Hover feedback** β€” the `:hover`/`:active` states change the background (and optionally text) color for interactivity. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Filled button pattern** β€” solid background color with white text, padding, no underline, `inline-block`; darken background on hover. [S1] - **Outlined button pattern** β€” white background with a colored border that inverts (fills) on hover. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) This page demonstrates combining several CSS properties to display links as boxes/buttons. [S1] **Example 1 β€” filled (red) button:** [S1] ```css a:link, a:visited { background-color: #f44336; color: white; padding: 14px 25px; text-align: center; text-decoration: none; display: inline-block; } a:hover, a:active { background-color: red; } ``` **Example 2 β€” outlined (green) button:** [S1] ```css a:link, a:visited { background-color: white; color: black; border: 2px solid green; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; } a:hover, a:active { background-color: green; color: white; } ``` In both examples, the `:link` and `:visited` states define the default button appearance, while `:hover` and `:active` change the colors to give a clickable feel. The key properties are `background-color`, `color`, `padding`, `text-align`, `text-decoration: none`, `display: inline-block`, and (for example 2) `border`. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's two examples apply the patterns to anchor elements: a filled red button and an outlined green button that inverts on hover. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Filled link button (language: CSS): ```css a:link, a:visited { background-color: #f44336; color: white; padding: 14px 25px; text-align: center; text-decoration: none; display: inline-block; } a:hover, a:active { background-color: red; } ``` ## βš–οΈ 비ꡐ 및 선택 κΈ°μ€€ (Comparison & decision criteria) The page presents two button styles. The **filled button** (Example 1) uses a solid `background-color` with white text and darkens on hover β€” suited to primary call-to-action emphasis. The **outlined button** (Example 2) uses a white background with a `2px solid green` border and inverts to a filled green button on hover β€” a lighter-weight look for secondary actions. Both rely on the same box-model foundation (`padding`, `text-decoration: none`, `display: inline-block`); the choice is purely the default visual weight desired. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.88 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Styling Links]], [[CSS Buttons]], [[CSS Styling Lists]] - **μ°Έμ‘° λ§₯락:** Referenced when an anchor link should look and behave like a clickable button. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Link Buttons β€” https://www.w3schools.com/css/css_link_buttons.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Link Buttons" page (Astra wiki-curation, P-Reinforce v3.1 format).