Using Emojis as CSS Selectors 💩

Did you know you can use emojis in your code!? Well you can! Though you may be asking yourself, why would anyone ever do this? And of course the answer is to make your code 🔥. Check out the example below to see how you can incorporate emojis and drastically improve your coding style:

See the Pen Why Would anyone do this by My Weekend Project (@MWP) on CodePen.

For real though, here we just have some basic CSS, but we've spruced up how it looks by making our class equal to 💩. Thanks to the modern UTF standard this is essentially the same as writing: class="poop-emoji" then selecting ".poop-emoji". I know this seems silly, but there could actually be some benefits. Emoji's really stand out from plain, boring old text, meaning there's the possibility to make things like comments, log messages and even URLs stand out!

Do you think this is something you would apply to your code? Or is it something that you would use to annoy your colleagues? Or are Emojis useless? Be sure to reach out and let us know!

Before we get started...

This website uses cookies to ensure you get the best possible experience. By clicking the button below you give direct consent to receive cookies from this site.

*You can change your mind at any time. Learn More