| <html> |
| <body> |
| <script> |
| var canvas = document.createElement('canvas'); |
| canvas.setAttribute('width', '50'); |
| canvas.setAttribute('height', '30'); |
| var ctx = canvas.getContext('2d'); |
| document.body.appendChild(canvas); |
| |
| ctx.fillStyle = 'rgb(0, 255, 0)'; |
| ctx.fillRect(0, 0, 10, 10); |
| ctx.fillRect(11, 0, 10, 10); |
| ctx.fillRect(22, 0, 10, 10); |
| ctx.fillRect(33, 0, 10, 10); |
| ctx.fillRect(0, 11, 10, 10); |
| ctx.fillRect(11, 11, 10, 10); |
| ctx.fillRect(22, 11, 10, 10); |
| ctx.fillRect(33, 11, 10, 10); |
| |
| </script> |
| <p>There should be 8 green squares displayed in a 2 row by 4 column grid.</p> |
| </body> |
| </html> |