Please write code. How will HTML5 code differ from HTML4?
Though no codes which the OP requested, still a good reference. +1
o.k.w
2010-01-21 11:32:25
It would probably be better to link to the latest version of that document, located here: http://www.w3.org/TR/html5-diff/
Mathias Bynens
2010-01-21 11:39:41
Is there a difference between those two documents?
rahul
2010-01-21 11:47:49
As far as code samples are concerned I don't think those will fit in this posting.
rahul
2010-01-21 11:48:35
@okw: there is code on the linked page...
DisgruntledGoat
2010-01-21 12:30:04
@pulse: Not currently, but the link I provided in my comment will always point to the most recent version of that document.
Mathias Bynens
2010-01-21 14:49:43
+4
A:
To start with one of the possible HTML 4 doctypes are as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
And the HTML5 doctype is this:
<!doctype html>
The w3 have an article on the differences between the two specifications, lets remember that the HTML5 specification is not finalised yet, and is subject to change.
ILMV
2010-01-21 11:28:59
yea, considering HTML4 was conceived in 97, we still have compatility issues. HTML5 better be a good one.
o.k.w
2010-01-21 11:36:30
+5
A:
One example borrowed from: A List Apart - A Preview of HTML 5:
HTML 4:
<body>
<div id="header">...</div>
<div id="nav">...</div>
<div class="article">
<div class="section">
...
</div>
</div>
<div id="aside">...</div>
<div id="footer">...</div>
</body>
HTML 5 adds new elements to specifically identify each of these common constructs:
<body>
<header>...</header>
<nav>...</nav>
<article>
<section>
...
</section>
</article>
<aside>...</aside>
<footer>...</footer>
</body>
These elements are summarized as follows:
- section: A part or chapter in a book, a section in a chapter, or essentially anything that has its own heading.
- header: The page header shown on the page; not the same as the head element.
- footer: The page footer where the fine print goes; the signature in an e-mail message.
- nav: A collection of links to other pages.
- article: An independent entry in a blog, magazine, compendium, and so forth.
- aside: For content that is tangentially related to the content around it, and is typically useful for marking up sidebar
Daniel Vassallo
2010-01-21 11:30:30
+4
A:
Compare these two files:
- http://diveintohtml5.org/examples/blog-original.html (XHTML 1.0 Strict)
- http://diveintohtml5.org/examples/blog-html5.html (HTML5)
A detailed explanation can be found in chapter 3 of Dive Into HTML5, titled “What Does It All Mean?”.
Mathias Bynens
2010-01-21 11:34:44