Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

Practice exercises CHAPTER 13 523



  1. Add a reference to the jQuery library by right-clicking the project node and choosing
    Manage NuGet Packages. Click Online and type jQuery in the search criteria. When
    the jQuery library is displayed, click the Install button.

  2. In the default.html file, add a reference to the default.css, jQuery library, and default.js
    files.

  3. Add the title Number Scramble to your page.
    Your HTML page should look like the following.
    <!DOCTYPE html>

    Number Scramble







</body>
</html>


  1. In the element, add a
    element whose id is message. In the

    element, add the default message, Refresh to scramble.

  2. After the message
    element, add another
    element whose id is gameBoard.
    The content of the game board is populated from the JavaScript. Your completed
    default.html should look like the following.
    <!DOCTYPE html>

    Number Scramble






    Refresh to scramble.




</div>
</body>
</html>


  1. In the default.css file, add the following style rules for the game board, the message,
    and the squares and tiles that are to be created programmatically.
    body {
    font-family: Arial, Helvetica, sans-serif;
    }

Free download pdf