HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.
Will originally showed me how easy it is to transform random JS snippets into bookmarklets. Once you set up the HTML, just view it in Firefox, and then drag the link to your bookmarks toolbar.
The basic form is
<a href="javascript:CODE;void 0;">NAME</a>
Where CODE is any arbitrary JavaScript code, and NAME is the name you want the bookmarklet to have once it has been added to the Firefox toolbar.
And of course don't use the javascript: protocol in your HTML pages -- although it's (only!) OK for bookmarklets.