The canvas objects created by p5.js have two width and height values. I hadn’t noticed this before and now I’m curious!
The example below is the from the p5 editor.
<canvas id="defaultCanvas0" class="p5Canvas" style="width: 400px; height: 400px;" width="800" height="800"></canvas>