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.

ID and class selectors

ID and class selectors

From the course: Emmet: Fast and Efficient Web Coding

Start my 1-month free trial

ID and class selectors

- [Instructor] This next feature of Emmet is really useful. Quite often, you'll need to create elements with classes and or ID names. This is a snap using Emmet. All you need to do is specify the element name and add a dot for class name or a hash mark for the ID name immediately following the element name it would look something like this. If I want to create a section with an ID of wrapper all I have to do is write section hash wrapper and when I expand, you can see that I get a section with an ID of wrapper. Let's say inside of that section tag I want to create a header that has a class of hero. All I have to do is write a header dot hero and when I expand it out, you can see that a class attribute is added to the header element. If you're wanting to create a div, with a class or an ID you don't even need to write div, divs are special and actually require even less effort. All you have to do is type out the ID using the…

Contents