Oh! Selector

by Daniemon

/
  • Streaming + Download

    Includes unlimited streaming via the free Bandcamp app, plus high-quality download in MP3, FLAC and more.

      $1 USD  or more

     

lyrics

Now when I was a young boy startin' out in this industry
I remember this pearl of wisdom that the internets gave to me.
To manipulate or decorate something on a web page
First ya gotta grab it and there's pretty much just one way...

[Chorus]
Oh selector, oh won't you fetch for me
With your magic sense, all the elements within the old DOM tree.

Now selectors can be used in CSS, oh but there's more.
In plain ol' JavaScript as well with querySelector().
And don't forget the libraries like jQuery and so
You could say that they're essential if you wanna be a pro.

[Chorus]

The next step on your journey is to learn selector syntax.
There's not much to remember so don't worry, just relax.
You start with a plain ol' tag name if you want it to be styled,
Use "plus" for adjacent sibling and "greater than" for a child.

[Chorus]

A dot is for a class name and for IDs it's a hash.
Use square brackets for attributes and you're sure to find a match.
Now :hover needs a colon like :focus and :target.
There's other stuff as well but that's enough to get you started.

[Chorus]

One final word of warning for my song to be complete.
Remember please that all IDs have got to be unique.
They're bad 'n' they're mean and they don't fight clean and you're gonna find it tough
If you use more than one of each because this DOM ain't big enough.

[Chorus x 2]

credits

released May 6, 2015

tags

license

about

Daniemon Japan

A nerdy singer-songwriter playing geekulele - mostly humorous ukulele songs about the web and other geeky topics.

contact / help

Contact Daniemon

Streaming and
Download help