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.
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 lets you add Semantics to an HTML5 document.
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.
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.
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.
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.
This helps us a great deal to create Data Binding expressions:
The Fourth Feature is the Automatic Renaming of an Opening or Closing Tag.
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.
This helps to avoid the error which exists when you forget to change the closing tag or change the wrong one.