VSCode not auto completing HTML
Type the tag name (without starting <
) then press Tab
for example type div
then press tab and VS will convert it to <div></div>
Or type the opening tag then press Tab twice
for example :
- type
<div
- press Tab
- press Tab
it will add the closing tag
From the 0.3.0 release notes
HTML auto closing of tags has now been removed and replaced with smarter IntelliSense on
</
.
Here is a cool trick (actually an Emmet abbreviation) :
- write the tag name | e.g.
h1
- add an asterisk after that | e.g.
h1*
- press Tab | (will result in
<h1></h1>
)
PS: This also works for self-closing tags, such as - input
, img
etc.
I was experiencing the same problem, then i saw something on my bottom right of vs code.. instead of using HTML, i was using Django-HTML, so i changed the language to html, Boom everything is working fine again.see image