If you’re thinking of learning HTML5 from the specification on the W3C or WHATWG sites, know that the audience for the official HTML specification are browser makers, not web developers. Using the official spec to learn HTML5 is like using an aircraft’s engineering manuals to learn to fly it. Feasible but not recommended.
Still, there is one invaluable document for web developers on both sites. It’s a special version of the HTML spec that strips out all the esoteric details that matter to browser makers and leaves only the stuff that matters to us.
Both versions are nearly identical and either version makes an excellent reference document when learning HTML5.