<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Welcome to your computer...</title>
<script type="text/javascript">
function drawLine()
{
var canvas = document.getElementById('mycanvas');
if (canvas.getContext)
{
var ctx = canvas.getContext('2d');
ctx.lineWidth = 3;
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(500,0);
ctx.stroke();
}
else
alert('Browser not support HTML5.');
}
</script>
</head>
<body onload="drawLine();">
<canvas id="mycanvas"></canvas>
</body>
</html>