Professor Lisa Friedrichsen's

Computer Science YouTubes, Resources & Reference Material

Differences between HTML 4 and xhtml from w3.org

HTML 5 differences from HTML 4 from w3.org

HTML 4 - 1997 xhtml - 2004 HTML 5 - 2014
HyperText Markup Language version 4 eXtensible HyperText Markup Language version 1 HyperText Markup Language version 5
DOCTYPE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html>
upper/lower case UPPER CASE tags are AOK
<BODY> <H1> <P>
lower case is required
<body> <h1> <p>
lower case is recommended
well formed = closing tags <p>...</p> not required <p>...</p> required <p>...</p> recommended
attribute values <img alt=JCCC ... allowed <img alt="JCCC" ... quotation marks required <img alt="JCCC"... quotation marks recommended
empty elements <br> is OK <br/> is required <br> is OK
attribute minimization <input type="checkbox" checked> <input type="checkbox" checked="checked"> <input type="checkbox" checked>
JavaScript <script type="text/javascript">...</script> <script type="text/javascript"> <![CDATA[ ... script content ... ]]> </script> <script>...</script>
new structural elements section
article
main
aside
header
footer
nav
figure
figcaption
template
new content elements video
audio
ruby
canvas
more...
new input types tel
search
url
email
date
time
number
range
color
deprecated elements font
big
center
more ...
new APIs many, to help develop web apps