Write blazingly fast HTML with Emmet 🌩️

🚀 Web Designer and learning full Stack Web development.
Search for a command to run...

🚀 Web Designer and learning full Stack Web development.
In this series, we'll together learn everything about web designing, tips and tricks to develop better UI.
Beginners guide to Tailwind with a small project
Promise.all() is a JavaScript method that takes an array of promises as input and returns a single promise that resolves when all of the input promises have resolved, or rejects if any of the input promises are rejected. It is useful for aggregating ...

Learn about how javascript object works, how we can create our own objects, take a sneak peek into console object and much more!

❓ Scope 📥 Scope defines the area, where functions, variables and other things are available or can be accessed. In layman's terms, scope means where to look for things, what things I can use and what I cannot! Let's take an example, here we are defi...

Learn about Array functions in JS with examples.

Beginners guide to Tailwind with a small project

Emmet is a web-developer’s toolkit for boosting HTML & CSS code writing.
You can type expressions and it gets converted into code snippets 🪄.

Their tagline is Emmet — the essential toolkit for web-developers which is true in some sense, web-devs usually do not work on any project without Emmet.
It comes pre-install with VS Code, but it should be available for the majority of the code editors. But for this blog post, we'll stick to VS Code 🦄
Literally, stop doing everything and try them now!
🧑💻HTML boilerplate code
Writing DOCTYPE and HTML and HEAD and TITLE can sometimes feel like more work than actually creating the structure of the website! But with Emmet, the colourless process of writing all this can be done with ease.
Use ! and press TAB/Enter.
!

🏷️Tags on the go
We can make use of Emmet to generate <> and </> for tags. We just need to write a tag name we want to generate and hit TAB/ENTER to generate a freshly baked opening and closing tag.
nav

.class-name #id-name with the tag name (or without for generating a div)footer.my-footer#sticky
.about-section

🤖Lorem
Lorem can be generated using lorem. We can also declare how many words is to be generated.
lorem
lorem60

👯Relations within tags and multiple elements
Generating tags with automatically filled classes is... yeah, I get it, not brag worthy. But now you will see the real power of Emmet.
Use > for nesting and + for generating a tag on the same level. And the best part, we can generate multiple elements by using *
Example:
table>(tr>th*3)+(tr>td*3)*4
We can also generate numbers using $, check Example 2 for the same.
Let's say we have to design a nav bar, we will be needing multiple links and an element for brand image.
After what we have learned we can easily design it using Emmet.
nav.navbar>div.brand>img.brand-logo+ul>(li.nav-item>a.nav-link)*4

What if you need to generate different ids for the elements generated through Emmet * property?
Don't worry they got you covered! Observe $.
ul>(li#item-$>lorem10)*5

Generating multiple tags simultaneously using Emmet.
div>(header>ul>li*3>a)+footer>p

Emmet also offers shortcuts for CSS, like bgc for background-color, they are easy to work with, you just need to give the first characters of each work of a CSS property and VS Code will give you suggestions as soon as you type something.
Thats all for this post! I hope you learned something.
Happy learning ✨
You can find more recourses to study Emmet below 👇