Has Emmet a syntax for adding URL
into <a href="">
tag?
E.g.:
Syntax:
a:www.google.com
Result:
<a href="www.google.com"></a>
Has Emmet a syntax for adding URL
into <a href="">
tag?
E.g.:
Syntax:
a:www.google.com
Result:
<a href="www.google.com"></a>
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 - it lists all the syntax that's available.
Slightly shorter:
a[www.google.com]
equals:
<a href="www.google.com"></a>
In VSCode you can wrap the text you need to link and as the link url, use "Wrap with Abbreviation" (Cmd+Shift+P and type Emmet to see shortcuts).
Use this snippet: a[href="$#"]
The content will be interpolated as the link URL.
From http://www.example.com
to <a href="http://www.example.com">http://www.example.com</a>