From the course: Emmet: Fast and Efficient Web Coding

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Multiple values

Multiple values

From the course: Emmet: Fast and Efficient Web Coding

Start my 1-month free trial

Multiple values

- [Instructor] Some properties like margin and padding, for instance, allow for multiple values. Can we do this with Emmet? You betcha. You can provide multiple values at the same time by writing something like this. I'm going to go ahead and add some margin and I want the margin values to be different all the way around. To do this in Emmet, I'm going to write m and we know that we can write the units like we've done in the past. For instance, if I write 10, it would expand out and give me a margin of 10 pixels all the way around. Well, as I mentioned, I want different values. So if we want different values, let's say we want 10 pixels for the top, 20 pixels for the right, 25 pixels for the bottom and 15 pixels for the left, we would separate the values with a dash like this. Now, when I click Tab to expand, you can see the four values are entered into the expanded snippet code. We can even mix units when we're…

Contents