# HTML5 Canvas distorted

HTMLJavascriptProgramming Scripts

If the canvas looks distorted, then try to change the height and width −

<canvas id = ”canvas1” width = '400' height = '300'></canvas>

The default height and width of the canvas in HTML5 is of 2/1 ratio −

width = 300
height = 150

## Example

Let us see an example −

<!DOCTYPE HTML>
<html>
</html>