---
title: height
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/htmlcanvaselement/1634228-height
---

# height

An integer containing the height of the canvas in CSS pixels.

## Declaration

```data
attribute unsigned long height;
```

## Discussion

Discussion Setting the width or height property, even without changing it, clears the canvas to transparent black and resets all context settings to their defaults, including the coordinate system and transformation matrix. If the height attribute is not specified in the <canvas> tag, the default height is 150 pixels.

## See Also

### Setting Canvas Dimensions

- [width](webkitjs/htmlcanvaselement/1632871-width.md)
