The Essential Guide to HTML5

(Greg DeLong) #1

CHAPTER 1


Table 1-1. The “My games” Annotated Links Code

Code Explanation


Opening html tag
Opening head tag
Annotated links Opening title tag, the title text and closing
title tag
Opening body tag

My games

Opening h1 tag, text and then closing h1
tag. This will make “My games” appear in a
big font. The actual font will be the default.

Opening p for paragraph tag

The Dice game presents
the game called craps.


Text with an a element. The opening a tag
has the attribute href set to the value
craps.html. Presumably this is a file in the
same folder as this HTML file. The contents
of the a element—whatever is between the
<a> and the </a>—will be displayed, first in
blue and then in mauve once clicked, and
underlined.

Closing p tag

Opening p tag

The Cannonball is
a ballistics simulation. A ball appears to move
on the screen in an arc. The program determines
when the ball hits the ground or the target. The
player can adjust the speed and the angle.


See the previous case. The a element here
refers to the cannonball.html file and the
displayed text is Cannonball.

Closing p tag

Opening p tag

Free download pdf