As you already know ActionScript (Flash) which is the same basis as JavaScript (ECMAScript) you have the foundation for it.
You can use a basic web page as you only need to place the canvas element inside it:
<canvas id="myCanvas" width="500" height="400"></canvas>
And in the JavaScript code that you reference you start off with:
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
The ctx, or context, is where you apply most of the draw operations. To manipulate pixels directly you use the canvas object directly.
Example using context:
ctx.fillRect(0, 0, 100, 100); // my first black-box
You don't need CSS for this part. The canvas can be considered as its own separate world inside the browser and CSS will not affect anything inside the canvas (which basically is a bitmap), only the canvas element itself.
All you really need to do is to first read up on the canvas API:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement
and familiarize yourself with the subtle differences in the two ECMAScript versions:
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000064.html
What are the key differences between JavaScript and ActionScript 3?