Files
2nd/10_Wiki/Topic_HTML/HTML_vs_XHTML.md
T
koriweb 9609c04755 docs(10_Wiki): W3Schools 위키화 — HTML/CSS/JavaScript(core)
W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더).
- Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외)
- Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체)
- Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속)
각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:21:18 +09:00

6.3 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
html-vs-xhtml HTML vs XHTML Frontend draft conceptual
XHTML
HTML versus XHTML
Extensible HyperText Markup Language
well-formed HTML
XHTML rules
XHTML vs HTML
B 0.89 2026-06-23 2026-06-23
html
web
frontend
xhtml
xml
w3schools
https://www.w3schools.com/html/html_xhtml.asp

HTML vs XHTML

🎯 한 줄 통찰 (One-line insight)

XHTML (Extensible HyperText Markup Language) is a stricter, XML-based reformulation of HTML that enforces "well-formed" markup — every element properly nested, closed, lowercase, and quoted — where HTML browsers would normally tolerate errors. [S1]

🧠 핵심 개념 (Core concepts)

  • XHTML = Extensible HyperText Markup Language — a stricter, more XML-based version of HTML; HTML defined as an XML application, supported by all major browsers. [S1]
  • Why XHTML — XML requires documents to be properly marked up and "well-formed." XHTML enhances HTML's extensibility and compatibility with other XML data formats and enforces stricter error handling than HTML. [S1]
  • HTML is lenient, XHTML is strict — browsers tolerate HTML errors and render anyway; XHTML enforces stricter standards. [S1]
  • Nine core differences — mandatory DOCTYPE and xmlns, mandatory structural elements, proper nesting, mandatory closing, lowercase elements and attribute names, quoted attribute values, and no attribute minimization. [S1]

🧩 추출된 패턴 (Extracted patterns)

  • Mandatory document skeleton<!DOCTYPE> + <html xmlns="..."> + <head> + <title> + <body>. [S1]
  • Self-closing empty elements<br />, <hr />, <img ... />. [S1]
  • Full attribute formchecked="checked" rather than bare checked. [S1]
  • Quoted + lowercase — all attribute values quoted; all element and attribute names lowercase. [S1]

📖 세부 내용 (Details)

What is XHTML? XHTML stands for EXtensible HyperText Markup Language. It is a stricter, more XML-based version of HTML — HTML defined as an XML application — and is supported by all major browsers. [S1]

Why XHTML? XML is a markup language where all documents must be properly marked up and "well-formed." XHTML was developed to make HTML more extensible and compatible with other data formats such as XML. In addition, browsers tend to ignore HTML errors and try to display the website even if it has errors in the markup; XHTML enforces stricter error handling. [S1]

The Most Important Differences from HTML Nine mandatory XHTML requirements: [S1]

  • <!DOCTYPE> declaration is mandatory.
  • The xmlns attribute in <html> is mandatory.
  • <html>, <head>, <title>, and <body> are mandatory.
  • Elements must be properly nested.
  • Elements must always be closed.
  • Elements must be in lowercase.
  • Attribute names must be in lowercase.
  • Attribute values must be quoted.
  • Attribute minimization is forbidden.

XHTML DOCTYPE Declaration A minimal, well-formed XHTML document: [S1]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Title of document</title>
</head>
<body>
  some content here...
</body>
</html>

Elements Must Be Properly Nested Correct: <b><i>Some text</i></b>. Wrong: <b><i>Some text</b></i>. [S1]

Elements Must Always Be Closed Correct: <p>This is a paragraph</p>. [S1]

Empty Elements Must Also Be Closed Self-closing tags must include a trailing slash: [S1]

<br />
<hr />
<img src="happy.gif" alt="Happy face" />

Elements Must Be in Lowercase Both element names and attribute names must be lowercase. [S1]

Attribute Values Must Be Quoted

<a href="https://www.w3schools.com/html/">Visit our HTML tutorial</a>

Attribute Minimization Is Forbidden Use the full form: checked="checked" instead of bare checked. [S1]

🛠️ 적용 사례 (Applied in summary)

The minimal XHTML DOCTYPE document above is the canonical applied case: a complete, well-formed XHTML 1.1 page with the mandatory xmlns. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Well-formed XHTML skeleton:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Title of document</title>
</head>
<body>
  some content here...
</body>
</html>

Self-closing empty element and full-form attribute:

<br />
<input type="checkbox" checked="checked" />

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

  • HTML — lenient; browsers ignore many markup errors and still render the page. Easier to write, less strict. [S1]
  • XHTML — strict, XML-based; documents must be well-formed (proper nesting, all elements closed, lowercase names, quoted values, no attribute minimization), and the DOCTYPE plus xmlns are mandatory. Choose XHTML when XML compatibility, extensibility, and rigorous, predictable parsing matter; choose HTML for simpler, more forgiving authoring. [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

No contradictions found in the source. [S1]

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.89
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

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