因为需要使不同的用户在不同的环境下都可以使用(用户体验可以不同), 那么需要有
design defensively
html4.0.1: HTML 4.01 strict <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> HTML 4.01 Transitional <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> HTML 4.01 Frameset <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”>
html5: <!DOCTYPE html> xml <?xml version=”1.0” encoding=”UTF-8”?> <html xmlns="http://www.w3.org/1999/xhtml">
html4: 仍然支持
html5:
figure − This tag can be used to associate a caption together with some embedded content, such as a graphic or video.
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>...</title>
</head>
<body>
<header>...</header>
<nav>...</nav>
<article>
<section>
...
</section>
</article>
<aside>...</aside>
<footer>...</footer>
</body>
</html>
HTML5 Differences from HTML4
HTML5 - Overview
Structuring the web with HTML
Front-end web developer