Me personally, I would learn HTML4 before moving to HTML5. HTML5 is pretty new and technically is still in draft, whereas HTML4 has been out since the late 90's and is extremely prevalent.
Comparing the two, HTML5 is definitely more powerful and flexible, is better at error handling, offers more API's, eliminates the need for Flash, as well many other things, but unless you're already familiar with HTML4, you won't have a complete awareness of what HTML5 has to offer. I'd go with HTML4, then find a book that expands to HTML5.
To answer your question though - Is it necessary to learn HTML4 first? Not at all.