---
title: lineWidth
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/canvasrenderingcontext2d/1630379-linewidth
---

# lineWidth

A floating-point number that controls the width of lines and strokes, in pixels.

## Declaration

```data
attribute unrestricted float lineWidth;
```

## Discussion

Discussion The default line width is 1 pixel. This property specifies not only the width of lines drawn with lineTo(), but also the stroke thickness of any stroke() operation.

## See Also

### Filling and Stroking Lines and Paths

- [fill](webkitjs/canvasrenderingcontext2d/1631011-fill.md)
- [fillStyle](webkitjs/canvasrenderingcontext2d/1633959-fillstyle.md)
- [lineCap](webkitjs/canvasrenderingcontext2d/1629505-linecap.md)
- [lineJoin](webkitjs/canvasrenderingcontext2d/1629229-linejoin.md)
- [miterLimit](webkitjs/canvasrenderingcontext2d/1631529-miterlimit.md)
- [stroke](webkitjs/canvasrenderingcontext2d/1634233-stroke.md)
- [strokeStyle](webkitjs/canvasrenderingcontext2d/1634470-strokestyle.md)
