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.
Visual Studio also includes aria-attributes defined by the WAI-ARIA Standard that are prefixed with "aria-" that let you add Sementics 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.
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.
Step 2
To invoke the Snippet you simply must press the Tab button when the Element is selected in IntelliSense.
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 a HTML attribute as well.
Step 2
This helps us to a great deal to create Data Binding expressions:
The Fourth Feature is 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 it's closing tag is automatically changed.
This helps to avoid the error which exists when you forget to change the closing tag or change the wrong one.