Chapter 10. Blackjack

  • the footer and header tags, which are new to HTML5

  • capturing key presses

  • programmer-defined objects

  • generating Image elements using a set of external image files

  • shuffling a deck of cards


The objective of this chapter is to combine programming techniques and HTML5 and JavaScript features to implement the card game blackjack, also called 21. The implementation will make use of new tags introduced in HTML5, namely footer and header. We will make use of the footer to give credit to the source for the card images and the web site we are using for the shuffling algorithm. The cards are created using programmer-defined objects ...

Get The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.