Most common CSS typos

Posted 2 hours ago

Last week, Kevin Powell posted on Bluesky about the most common typo you make when writing CSS.

Kevin Powell

@kevinpowell.co

One of the questions I’m asking is the most common typo that you make when writing CSS, and several people have listed gray/grey… except, they both work so I’m confused ?

I have two very common ones. The first is with font-size:

.element {
  font-szie: 1em;
}

I tend to get the “i” and the “z” in the wrong place. It is funny to me because it looks like a Hungarian word since Hungarian uses a “sz” combination for an English “s” sound. For examples, the city of Szeged.

Another common type I make is with CSS grid:

.element {
  display: gird;
}

I have often been left scratching my head to why a grid layout is not applied. I have also made the same typo with grid-template-columns.

I am not alone in this typo. My friend Stu Robson makes the same mistake.

Stuart Robson

@sturobson.com

display: gird;

I replied back to Stu:

Jeff Bridgforth

@jeffbridgforth.com

Been there, done that.

I am sure there are other typos I make but those two are my most common.

Comment on this post