JavaScript-let to list all tags used in a page, and generate a CSS template from them.

This is merely a proof-of-concept; a much more useful version would order and group tags in the template (e.g. h1{}...h6{}, ul{} ol{} li{}, a:pseudo{}, etc.).

The markup-to-CSS template code lists each tag once, and only once, and omits unstyleable tags (head, meta, etc.).

Something to flesh out the tags used:

  1. Cottleston, Cottleston, Cottleston Pie,
  2. A fish can't whistle, and neither can I.
  3. Ask me a riddle, and I reply:
  4. "Cottleston, Cottleston, Cottleston Pie."

Disclaimer: I am not a JavaScript guru; there's probably a nicer way to do this, but I'm damned if I could find it anywhere!

Bookmarklet / favelet for this JavaScript (with built-in CSS) - drag this link to your Bookmarks/Favorites toolbar, or right-click and add it from there.

Now all I need to do is write something to safely & reliably automate the conversion from readable JS source to a bookmarklet/favelet...

Copyright © 2006 by Paul Chaplin. Licence.