Simple But Interesting Features of HTML5 Editor in VS 2012

Introduction

 
In today's article, you will learn about some of the new and interesting features of HTML5 that are supported by ASP.NET 4.5.
 
The First Feature is WAI-ARIA Support.
 
WAI-ARIA is used to make Web Applications and Web Content that are easily accessible by people with disabilities. This feature is now fully supported in Visual Studio. For e.g. the Role attribute now has full IntelliSense.
 
Step 1
 
Select the <nav> tag that is used for Navigation and inside the nav tag select the role attribute, you will see that now the role has full IntelliSense.
 
new2.jpg
 
Visual Studio also includes aria-attributes defined by the WAI-ARIA Standard that are prefixed with "aria-" that lets you add Semantics to an HTML5 document.
 
Step 2
 
Select the <div> tag and when you write the aria- you will see that it also has full IntelliSense.
 
new3.jpg
 
new4.jpg
 
The Second Feature is Snippets.
 
Visual Studio 2012 includes a number of Snippets that make HTML5 easier and faster to write.
 
Step 1
 
Open the tag and just press V, you will see that a number of attributes are available for selection. I have selected the Video snippet.
 
new1.jpg
 
Step 2
 
To invoke the Snippet you simply must press the Tab button when the Element is selected in IntelliSense.
 
new5.jpg
 
The Third Feature is IntelliSense for Code Nuggets in Attributes.
 
Step 1
 
As we already know, Visual Studio has always provided IntelliSense for Server-Side code nuggets. Now Visual Studio includes IntelliSense for code nuggets in an HTML attribute as well.
 
new9.jpg
 
Step 2
 
This helps us a great deal to create Data Binding expressions:
 
new10.jpg
 
The Fourth Feature is the Automatic Renaming of an Opening or Closing Tag.
 
Step 1
 
If you rename an HTML element the corresponding opening or closing tag also changes in real-time. Like here I have changed the <head> tag to <headeeee> and its closing tag is automatically changed.
 
new8.jpg
 
This helps to avoid the error which exists when you forget to change the closing tag or change the wrong one.