Zach’s ugly mug (his face) Zach Leatherman

Nursery Rhyme Code Poem [CSS]

October 27, 2007

Code Poems are fun! The trick is to take a nursery rhyme (but really, it could be any commonplace work of writing – Famous Speeches, Bible Verses, Famous Quotes, etc.), and then turn it into pseudocode. The code must follow both the programming or markup language you’re using and the rhyme as closely as possible. See how precise you can make your rhyme fit. I accept critiques and suggestions for improving me rhyme code (or you could just rewrite my rhyme as you see fit).

#theChurch {}
#theChurch #theSteeple {}
#theChurch .door[state="open"] .people { visibility: visible; }
#theChurch #theParson { display: none; }
#theChurch > .upstairs #theParson:active { display: block; }
#theChurch #theParson:lang(prayers) { display: block; }

The above code poem is released under the BSD license. To use in production environment without error, do not include an element with an id attribute of “theChurch”. Obviously I’m kidding, don’t use this code. Not even for enterprise software.


< Newer
Forward Compatibility and JavaScript
Older >
Nursery Rhyme Code Poem [PHP]

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at IndieWeb Avatar for https://cloudcannon.com/CloudCannon. He is the creator and maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 79 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

1 Comment
  1. Ronnie Disqus

    27 Apr 2015
    Have your kids seen this nursery rhymes video: https://www.youtube.com/wat...
Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)