Standardwerte der Canvas-Attribute
Wenn man mit den Methoden des Canvas-Elementes experimentiert, dann wird man häufig feststellen, dass es für alle Attribute Standardwerte gibt. Hier dazu eine Übersicht (die Tabelle kann durch einen Klick auf eine Spaltenüberschrift sortiert werden):
| Attribut | Vorbelegung | Thema |
| width | 300 | Canvas element |
| height | 150 | Canvas element |
| globalAlpha | 1.0 | Compositing |
| globalCompositeOperation | source-over | Compositing |
| lineWidth | 1.0 | Line styles |
| lineCap | butt | Line styles |
| lineJoin | miter | Line styles |
| miterLimit | 10 | Line styles |
| strokeStyle | black | Colors, styles and shadows |
| fillStyle | black | Colors, styles and shadows |
| shadowOffsetX | 0 | Colors, styles and shadows |
| shadowOffsetY | 0 | Colors, styles and shadows |
| shadowBlur | 0 | Colors, styles and shadows |
| shadowColor | transparent black | Colors, styles and shadows |
| font | 10px sans-serif | Text |
| textAlign | start | Text |
| textBaseline | alphabetic | Text |