Skip to main content

Command Palette

Search for a command to run...

Why should we use emmet while writing code?

Published
2 min read
Why should we use emmet while writing code?
D

🧑‍💻 Software Developer @ TransUnion ⏳ 4+ Years Experience 🧠 Unsorted Array 🚀 Scalable Web Apps 🎥 Tech Educator in Progress

Before coming to the conclusion of why should we use emmet while writing code, lets first understand what is emmet?

What is emmet? 🤔

Emmet is a plug-in or extension for editors that helps in increasing the speed of coding end editing in various languages like HTML, CSS, XML, etc.

Few code editors provides facility to keep the code snippets saved which are used very frequently. Instead of using these code snippets, it is always a good practice to use emmets to increase your development speed.

How emmet helps to speed up the development?

Let's take a simple example of below boilerplate code in html.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
</html>

If you write this code by your own, it will take some time. But if you know about emmet, you can simply type Ctrl + ! and press the tab key, you will get the above code.

Conclusion

We already got our answer to the question, why should we use emmet while writing code, obviously to increase the development speed. So what are you waiting for, go ahead and start using emmet.

This is just an introduction to emmet, In coming articles we will see more about the examples of the emmet to increase our productivity.

Thank you for spending your valuable time in reading this article. Happy Coding!!