>> "I hope for it to be around ~500 pages"
Firstly congrats on the contract. You must be an expert in the field to be offered a contract.
The aim of quantity (pages) rather than quality is troublesome. I would be aiming to write something that achieves an objective - like an average web developer will understand how to apply HTML5 after reading; or a complete newbie will be able to start using HTML5....
I recommend going to a bookshop and checking out the current books on programming languages/frameworks. Try and find a style that matches your objective. Look back at books you read and what helped.
Unless this is an extensive reference guide, focus on quality content rather than reams of paper.