What does <meta charset=“UTF-8”> mean?

Because understanding small things can make your coding journey much better

Sushmita Singh
Code  Writers

--

Two computer screens side by side, one with lines of code and one with photo of a mountain with some text on it
Photo by Fotis Fotopoulos on Unsplash

Some lines of code can make sure that your website is up to the mark and provides a sound user experience.

The <meta> tag is one such thing.

I have been writing this line of code on every single one of my HTML pages, but for the life of me couldn’t understand what it means.

If you are like me, read this to know what it means, and why you should use it.

Why you should use meta charset?

If you like using emojis, use this tag. Meta tag encodes these emojis into a machine-readable character and vice versa.

We use many characters on our webpage that are not traditional ASCII characters like if someone wishes to write Arabic or Japanese. So, if we don’t use a meta tag in the head element, the browser wouldn’t know how to handle these characters and in place of the characters ‘?’ will appear.

What is a meta tag?

The <meta> tag always goes inside the <head> element and defines the metadata about an HTML document, i.e. the data about data.

--

--

Sushmita Singh
Code  Writers

Writer || Coder || Book Lover. Helping you evolve into the ultimate version of yourself. https://sushmitasingh.carrd.co/