Automatically Insert Double Quotes in your HTML Attributes in Visual Studio

One thing that annoys me is unnecessary typing while hand coding HTML. Thankfully there’s an option inside Visual Studio that will automatically insert double quotes when you’re working with the HTML markup screen. Here’s how to turn this option on.

Open Visual Studio 2008 > Go to Tools > Options > Text Editor > HTML > Format

Under the Automatic formatting options, select Insert attribute value quotes when typing:


So now when you type an HTML attribute inside an element For eg: <input id= the double quotes get inserted for you automatically resulting in <input id=""

For me this is a real time saver.

About The Author

Malcolm Sheridan is a Microsoft awarded MVP in ASP.NET and regular presenter at conferences and user groups throughout Australia. Being an ASP.NET Insider, his focus is on web technologies and has been for the past 10 years. He loves working with ASP.NET MVC these days and also loves getting his hands dirty with JavaScript. He also blogs regularly at Follow him on twitter @malcolmsheridan

No comments: