Skip to main content
Home / Articles /

The Shapes of CSS

CSS is capable of making all sorts of shapes. Squares and rectangles are easy, as they are the natural shapes of the web. Add a width and height and you have the exact size rectangle you need. Add border-radius and you can round that shape, and enough of it you can turn those rectangles into circles and ovals.

We also get the ::before and ::after pseudo elements in CSS, which give us the potential of two more shapes we can add to the original element. By getting clever with positioning, transforming, and many other tricks, we can make lots of shapes in CSS with only a single HTML element.





Triangle Up

Triangle Down

Triangle Left

Triangle Right

Triangle Top Left

Triangle Top Right

Triangle Bottom Left

Triangle Bottom Right

Curved Tail Arrow via Ando Razafimandimby



Star (6-points)

Star (5-points) via Kit MacAllister




Heart via Nicolas Gallagher

Infinity via Nicolas Gallagher

Diamond Square via Joseph Silber

Diamond Shield via Joseph Silber

Diamond Narrow via Joseph Silber

Cut Diamond via Alexander Futekov



Talk Bubble

RSS Feed via Kevin Huff

12 Point Burst via Alan Johnson

8 Point Burst via Alan Johnson

Yin Yang via Alexander Futekov

Badge Ribbon via Catalin Rosu

Space Invader via Vlad Zinculescu

TV Screen

Chevron via Anthony Ticknor

Magnifying Glass

Facebook Icon via Nathan Swartz

Moon via Omid Rasouli

Flag via Zoe Rooney

Cone via Omid Rasouli

Cross via Kaya Basharan

Base via Josh Rodgers

Pointer via Amsakanna Freethinker