2016-05-12 15 views

risposta

5

The general syntax for adding an attribute to an element in Emmet is:

element[attr=value] 

So in this case, it'd be:

a[href=www.google.com] 

That said, if you just do a by itself, it should automatically jump the editor cursor into the href attribute, and you can do a:link to pre-populate it with a http://. So those options might be faster/more to your tastes.

For more information, look at the Emmet Cheat Sheet - elenca tutte le sintassi disponibili.

7

leggermente più corta:

a[www.google.com] 

uguale:

<a href="www.google.com"></a> 
+0

Non riesci a trovare la parte rilevante [la documentazione] (http://docs.emmet.io/) ma funziona per me. – Pang

Problemi correlati