Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^624) Appendix D Comparison of HTML 4, XHTML, and HTML 5
HTML 5 (XHTML Syntax)



D.4 Quotation Marks with Attributes


The XHTML standard requires that the values for all attributes are enclosed in quotation
marks. This was valid in HTML 4, but not always done.

HTML 4
<P ID=article>

XHTML
<p id="article">

HTML 5 (HTML syntax)
Either <p id=article>or <p id="article">

HTML 5 (XHTML syntax)
<p id="article">

D.5 Container Tags


The XHTML standard requires that both the opening and closing tags for all container
tags are used. HTML 4 does not require this.

HTML 4
<p>This is the first paragraph.
<p>This is the second paragraph.

XHTML
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>

HTML 5 (HTML Syntax)
<p>This is the first paragraph.
<p>This is the second paragraph.