Files
2nd/10_Wiki/Topic_Programming/Topic_CSS/CSS_Pseudo_Classes.md
T
Antigravity Agent e9cbf23ab5 docs(10_Wiki): Dev 폴더 누락분 반영 — Topic_Programming으로 통합
이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영.

- Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들
  (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거.
- Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/
  Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/
  Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이
  존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존).
- Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/
  JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동.
- 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리.
- Topic_Programming 최종 문서 수: 2784 → 3985.
2026-07-05 00:39:13 +09:00

4.9 KiB

id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
id title category status verification_status canonical_id aliases duplicate_of source_trust_level confidence_score created_at updated_at review_reason merge_history tags raw_sources applied_in github_commit
css-pseudo-classes CSS Pseudo-classes Frontend draft conceptual
pseudo-classes
pseudo class
special state styling
hover focus active
structural pseudo-classes
B 0.85 2026-06-23 2026-06-23
css
web
frontend
w3schools
selectors
pseudo-classes
https://www.w3schools.com/css/css_pseudo_classes.asp

CSS Pseudo-classes

🎯 한 줄 통찰 (One-line insight)

A CSS pseudo-class is a keyword added to a selector to define a style for a special state of an element — such as hover, focus, visited links, or position within the document tree. [S1]

🧠 핵심 개념 (Core concepts)

  • Definition — a CSS pseudo-class is a keyword that can be added to a selector, to define a style for a special state of an element. [S1]
  • Syntax — a single colon followed by the pseudo-class name, attached to a selector. [S1]
  • Common use cases — styling on mouse hover, distinguishing visited vs unvisited links, focus states, and form validation states. [S1]
  • Interactive pseudo-classes — respond to user actions: :hover, :focus, :active, :link, :visited. [S1]
  • Structural pseudo-classes — select based on document-tree position: :first-child, :last-child, :nth-child(n), :lang(). [S1]

🧩 추출된 패턴 (Extracted patterns)

  • State-based styling — append :state to a selector to style a transient or contextual condition rather than a static element. [S1]
  • Two families — interactive (user-driven) vs structural (position-driven) pseudo-classes cover the two broad selection needs. [S1]

📖 세부 내용 (Details)

What is a pseudo-class? A CSS pseudo-class is a keyword that can be added to a selector, to define a style for a special state of an element. [S1]

Syntax [S1]

selector:pseudo-class-name {
  CSS properties
}

Common use cases The page identifies common applications including styling on mouse hover, distinguishing visited versus unvisited links, focus states, and form validation states. [S1]

Interactive pseudo-classes (respond to user actions) [S1]

  • :hover — when the mouse is over an element.
  • :focus — when an element has focus.
  • :active — when an element is being activated.
  • :link — unvisited links.
  • :visited — visited links.

Structural pseudo-classes (select by document-tree position) [S1]

  • :first-child — first child of a parent.
  • :last-child — last child of a parent.
  • :nth-child(n) — the nth child of a parent.
  • :lang() — elements with a specific language.

All CSS Pseudo-classes (reference table) Not found in source — the tutorial page links to the separate "CSS Pseudo-classes Reference" for the complete list rather than embedding the full table. [S1]

🛠️ 적용 사례 (Applied in summary)

The page describes (rather than ships full code for) common applications: hover styling, visited/unvisited link distinction, focus states, and form-validation states. Detailed worked examples live on the linked interactive and structural pseudo-class pages. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

General pseudo-class syntax (language: CSS):

selector:pseudo-class-name {
  CSS properties
}

⚖️ 비교 및 선택 기준 (Comparison & decision criteria)

  • Interactive vs structural — choose an interactive pseudo-class (:hover, :focus, :active, :link, :visited) to react to user actions or link state; choose a structural pseudo-class (:first-child, :last-child, :nth-child(n), :lang()) to select by position in the document tree. [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.85
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-06-23: Initial draft synthesized from the W3Schools "CSS Pseudo-classes" page (Astra wiki-curation, P-Reinforce v3.1 format).