VS Code Shortcut – Wrap with tag / code

Wrap the code with a tag outside it. For example image we have a <p> html paragraph block and we need to wrap it with a div block. How to do it very easily using the VS code editor shortcut.

Wrap Tags easily in VS Code Editor

  • Select the code to be wrapped
  • Hit Ctrl + Shift +P
  • Type> Emmet: wrap
  • Select that
  • Now enter the tag to be wrapped, eg; div

When we enter the tag name, we can see its automatically wrapping the <p> element which we already had selected.

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *