The Essential Guide to HTML5

(Greg DeLong) #1

BOUNCING BALL


Figure 3-2. The ball is now an image from an external file.


HTML5 lets you specify what the input should be. In this example, Ive specified the input should be a
number and indicated minimum and maximum values. I used CSS to specify that if a user makes an invalid
entry, the color of the field turns red. This is shown in Figure 3-3.


Figure 3-3. A form showing bad input

Free download pdf