The Essential Guide to HTML5

(Greg DeLong) #1

CONTENTS



  • Testing and uploading the application.......................................................................................................... vi

  • Summary ........................................................................................................................................................

  • Chapt er 3: Bouncing Ball........................................................................................

    • Introduction ...................................................................................................................................................

    • Critical requirements.....................................................................................................................................

    • HTML5, CSS, JavaScript features ...............................................................................................................

      • Drawing a ball, image, and gradient..........................................................................................................



    • Building the application and making it your own ..........................................................................................

    • Testing and uploading the application..........................................................................................................

    • Summary ........................................................................................................................................................



  • Chapter 4: Cannonball and Slingshot

    • Introduction ...................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, and JavaScript features ......................................................................................................

      • Arrays and programmer-defined objects................................................................................................

      • Rotations and translations for drawing...................................................................................................

      • Drawing line segments.............................................................................................................................

      • Mouse events for pulling on the slingshot ..............................................................................................

      • Changing the list of items displayed using array splice

      • Distance between points .........................................................................................................................



    • Building the application and making it your own ........................................................................................

      • Cannonball: with cannon, angle, and speed..........................................................................................

      • Slingshot: using a mouse to set parameters of flight ............................................................................



    • Testing and uploading the application........................................................................................................

    • Summary ......................................................................................................................................................



  • Chapt er 5: The Memory (aka Concentra tion) Game............................................

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, JavaScript features .............................................................................................................

      • Representing cards .................................................................................................................................

      • Using Date for timing ...............................................................................................................................

      • Providing a pause ....................................................................................................................................

      • Drawing text ............................................................................................................................................. vii

      • Drawing polygons ....................................................................................................................................

      • Shuffling cards .........................................................................................................................................

      • Implementing clicking on a card..............................................................................................................

      • Preventing certain types of cheating .....................................................................................................



    • Building the application and making it your own ........................................................................................

    • Testing and uploading the application........................................................................................................

    • Summary ......................................................................................................................................................



  • Chapter 6: Quiz

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, and JavaScript features ......................................................................................................

      • Storing and retrieving information in arrays ...........................................................................................

      • Creating HTML during program execution ..............................................................................................

      • Changing elements by modifying CSS using JavaScript code .............................................................

      • Text feedback using form and input elements.......................................................................................

      • Presenting video......................................................................................................................................



    • Building the application and making it your own ........................................................................................

    • Testing and uploading the application........................................................................................................

    • Summary ......................................................................................................................................................



  • Chapter 7: Mazes

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, and JavaScript features ......................................................................................................

      • Representation of walls and the token ...................................................................................................

      • Mouse events to build and position a wall ..............................................................................................

      • Detecting the arrow keys ........................................................................................................................

      • Collision detection: token and any wall ..................................................................................................

      • Using local storage ..................................................................................................................................

      • Encoding data for local storage ..............................................................................................................

      • Radio buttons ...........................................................................................................................................



    • Building the application and making it your own ........................................................................................ viii

      • Creating the second maze application ...................................................................................................



    • Testing and uploading application..............................................................................................................

    • Summary ......................................................................................................................................................



  • Chapter 8: Rock, Paper, Scissors

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, and JavaScript features ......................................................................................................

      • Providing graphical buttons for the player.............................................................................................

      • Generating the computer move..............................................................................................................

      • Starting off ...............................................................................................................................................



    • Building the application and making it your own ........................................................................................

    • Testing and uploading the application........................................................................................................

    • Summary ......................................................................................................................................................



  • Chapter 9: Hangman

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, JavaScript features .............................................................................................................

      • Storing a word list as an array defined in an external script file ............................................................2

      • buttons ..................................................................................................................................................... Generating and positioning HTML markup, then making the markup be buttons, and then disabling the

      • Creating progressive drawings on a canvas ..........................................................................................

      • Maintaining the game state and determining a win or loss ....................................................................

      • Checking a guess and revealing letters in the secret word by setting textContent ............................



    • Building the application and making it your own ........................................................................................

    • Testing and uploading the application........................................................................................................

    • Summary ......................................................................................................................................................



  • Chapter 10: Blackjack............................................................................................

    • Introduction .................................................................................................................................................

    • Critical requirements...................................................................................................................................

    • HTML5, CSS, and JavaScript features ......................................................................................................

    • Building the application and making it your own ........................................................................................



Free download pdf