Emmet plugin

Introduction

Emmet is a great plugin for accelerated code writing that can be added to many well-known text editors and IDEs. It has certain abbreviations that, when combined, give a finished code that is much longer and more complex. It is installed as a plugin, and the installation depends on the IDE application in which it is implemented. I described how the Emmet plugin is installed as part of PHP Storm on the page “Installation of tools for web development”. It is used by typing the abbreviation in the editor and then pressing the “trigger button”, the default button is TAB.

Emmet syntax

> (level down)

nav>ul>li*3

+ (same level)

div+p+bq

^ (level up)

div>p>span+em^bq

( ) grouping

div>(header>ul>li*2>a)+footer>p

. (classes)

p.class1.class2.class3

# (ID)

form#search

$ (dynamic number)

Example No. 1

ul>li.item$*5

Example No. 2

ul>li.item$$$*5

Example No. 3

ul>li.item$@3*5

Example No. 4

ul>li.item$@-*5

{ } (text)

a{Click me}

[ ] (attributes)

p[title=”Hello world”]

Emmet HTML abbreviations

The following examples show frequently used abbreviations:

!!!

!

lorem

Generates different sentences of 30 words.

lorem5

Generates different sentences of 5 words.

a

br

link

img

iframe

form

input

label

video

bq

btn