2016-05-12 14 views

答えて

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に追加すると、利用可能なすべての構文が一覧表示されます。

7

やや短い:

a[www.google.com] 

等しい:

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

は、[ドキュメント](http://docs.emmet.io/)に関連する部分を見つけることができませんが、それはのために働きます私。 – Pang

関連する問題