This Canvas API provides a way to draw graphics on a webpage using JavaScript.
Code Example:
<!DOCTYPE html>
<html>
<head>
<title>Canvas API Example</title>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
context.fillStyle = "blue";
context.fillRect(10, 10, 50, 50);
context.strokeStyle = "red";
context.strokeRect(20, 20, 50, 50);
};
</script>
</head>
<body>
<canvas id="myCanvas" width="200" height="200"></canvas>
</body>
</html>
For Geolocation API HTML5 API Example: Geolocation API