O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a Web SQL database

In this recipe, we will take the database we created in the previous recipe and add tables and data to it then display the results on an HTML page.

Getting ready

You will need a current browser and an HTML5 page with basic tags for the head area and body area.

How to do it...

On a basic HTML5 page, add an h1 tag to display a page heading, and then create a div tag with an ID of "status" to hold our results as shown in the following code block:

<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Using WEB SQL Databases</title></head><body><article><section><header><h1>Today's Riders</h1></header><div id="status" name="status"></div> </section></article><footer>

Begin the script ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required