Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
Appendix D Comparison of HTML 4, XHTML, and HTML 5^625

HTML 5 (XHTML Syntax)


This is the first paragraph.


This is the second paragraph.


D.6 Self-Contained Tags


The XHTML standard requires that all self-contained tags are properly closed using
" />". HTML 4 does not require this.


HTML 4


This is the first line.

This is the second line.


XHTML


This is the first line.

This is the second line.


HTML 5 (HTML Syntax)


This is the first line.

This is the second line.


HTML 5 (XHTML Syntax)


This is the first line.

This is the second line.


D.7 Attribute Values


The XHTML standard requires that all attributes are assigned values. HTML 4 allows
some attributes, such as noresizeor checked, to be minimized. Since these attributes
only have a single value, HTML 4 does not require that the value is provided.


HTML 4



XHTML 1.0


<input type="radio" checked="checked" name="gender" id="gender"
value="male" />

Free download pdf