html, body { margin: 0; padding: 0; } canvas{ margin-left: 10px; margin-right: 10px; margin-top: 10px; border: 2px solid black; }