12 HTML Jocks :):):):)
Why was the CSS file feeling down?
Because it wasn't
display: block
; it felt totallyinline
. (Plays on thedisplay
property)What's a CSS developer's favorite type of music?
@keyframes
. (Plays on the@keyframes
rule for animations)Why did the web designer get lost in the forest?
Because he couldn't find the
z-index
. (Plays on thez-index
property for layering elements)I told my wife I was learning CSS. She was so excited!
I can't wait to see what she makes... I'm just learning how to center a
<div>
. (Plays on the often-tricky task of centering elements)Why did the CSS rule get sent to the principal's office?
It was caught
cascading
out of control. (Plays on the "cascading" nature of CSS)Why did the web page go to therapy?
It had too much
margin
and not enoughpadding
. (Plays on the difference betweenmargin
andpadding
)My website is so stylish...
It's got
!important
issues. (Plays on the often-overused and sometimes problematic!important
flag)What's the difference between a good CSS developer and a bad one?
The good one knows how to use
flexbox
andgrid
. The bad one is stillfloat
ing around. (Plays on modern layout methods vs. the olderfloat
technique)Why was the CSS selector so popular?
It was very
specific
. (Plays on CSS specificity rules)I'm starting a band called "The Pseudo-Classes."
We're always
:hover
ing around. (Plays on CSS pseudo-classes like:hover
)Why did the CSS file get a ticket?
It was caught
over-flowing
. (Plays on theoverflow
property)Why was the web developer so calm?
He knew how to use
position: absolute
. (Plays on theposition
property and its potential for precise control, which can be calming if you understand it!)