I assume you are looking for HTML examples, not JavaScript?
This might give you some inspiration:
Note that I did change several things after I posted it (like putting formatting in a separate style section as much as possible) and solving some of the questions I raised in the post and made some additional posts (like this one). But still it gives a basic insight on how to use the EDW widget for creating your own HTML-based dashboard widget.
Also check out W3 Schools’ HTML tutorial to get to know HTML and all tags to create/format a page.