<!DOCTYPE html>
<html lang="en-US">
<body>
<button type="button" onclick="createDB()">Create DataBase</button>
<script type="text/javascript">
function createDB(){
var db = openDatabase('studentsDB', '1.0', 'Test DB', 2 * 1024 * 1024);
if(db)
alert("Your DB was created");
else
alert("Something went wrong.");
}
</script>
<p><strong>Note:</strong> Go to your Developer Tools to check the database created as mentioned in this <a href="/html/web-sql" target="_blank">page</a></p> </body>
</html>