Files
2nd/10_Wiki/Dev/Topic_CSS/CSS_Height_Width.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +09:00

4.1 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-height-and-width CSS Height and Width Frontend draft conceptual
height
width
CSS height
CSS width
element dimensions
B 0.88 2026-06-23 2026-06-23
css
web
frontend
w3schools
height
width
box-model
https://www.w3schools.com/css/css_height_width.asp

CSS Height and Width

🎯 한 줄 통찰 (One-line insight)

The height and width properties set the size of the area inside the padding, border, and margin of an element — they do not include padding, borders, or margins. [S1]

🧠 핵심 개념 (Core concepts)

  • Purpose — the height and width properties set the height and width of the area inside the padding, border, and margin of the element. [S1]
  • Content-only — these properties size the content area; they do not include padding, borders, or margins in their calculations. [S1]
  • Accepted valuesauto (browser calculates dimensions; default), a length (px, cm, em, etc.), % (percentage of the containing block), initial (default value), or inherit (inherited from parent). [S1]

🧩 추출된 패턴 (Extracted patterns)

  • Fixed vs. fluid — combine a length on one axis with a % on the other (e.g., fixed height + percentage width) for partially responsive boxes. [S1]
  • Content-box mental model — when reasoning about an element's footprint, add padding and border to the declared height/width, since those are excluded. [S1]

📖 세부 내용 (Details)

What height and width do The CSS height and width properties set the height and width of the area inside the padding, border, and margin of the element. This means they do not include padding, borders, or margins in their calculations. [S1]

Accepted values The height and width properties accept: [S1]

  • auto — the browser calculates the dimensions (this is the default)
  • a length — specific values in px, cm, em, etc.
  • % — a percentage of the containing block
  • initial — sets the property to its default value
  • inherit — the property is inherited from the parent

Example 1 — fixed height with percentage width: [S1]

div {
  height: 200px;
  width: 50%;
  background-color: powderblue;
}

Example 2 — fixed height and fixed width: [S1]

div {
  height: 100px;
  width: 500px;
  background-color: powderblue;
}

Note The tutorial emphasizes: "Remember that the height and width properties do not include padding, borders, or margins!" [S1]

🛠️ 적용 사례 (Applied in summary)

The two div examples are the page's own applied cases, demonstrating fixed and percentage-based sizing. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Size a box's content area (language: CSS):

div {
  height: 200px;
  width: 50%;
  background-color: powderblue;
}

⚖️ 모순 및 업데이트 (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)

📚 출처 (Sources)

📝 변경 이력 (Change history)

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