How do I wrap a selection with an HTML tag in Visual Studio?

后端 未结 8 1939
栀梦
栀梦 2020-12-12 15:10

This seems like the most basic question in the world, but damned if I can find an answer.

Is there a keyboard shortcut, either native to Visual Studio or through Cod

相关标签:
8条回答
  • 2020-12-12 16:05

    Nothing I'm aware of, but writing a macro to wrap it in whatever tag you want shouldn't be hard. I have a similar one that will wrap my selection in a region block.

    0 讨论(0)
  • 2020-12-12 16:07

    For those who use Visual Studio 2017: Right click on an html/cshtml area, or select some elements to wrap, there is a Wrap With <div> button on the list.

    0 讨论(0)
提交回复
热议问题