Creating elements is covered on pages 328-336 of JavaScript Definitive Guide 5th Edition Chapter 15. Event handlers are in Chapter 17.

Setting the styling of an element info at http://codepunk.hardwar.org.uk/css2js.htm - looks like it could be out-of-date though.