HTML and CSS Reference
In-Depth Information
After you select an HTML5 snippet in IntelliSense, press the Tab key twice to fully expand the snippet and
add it at the current cursor location (Figure 1-16).
Figure 1-16. HTML5 audio snipped expanded after pressing the Tab key twice
Once the snippet is added in the editor, you can modify it to suit your needs.
Automatically Renaming End Tags
Sometimes you may accidently misspell HTML tags while keying them in a web page. For example, let's
say that instead of <audio> , you enter <aidio> . By default, when you close a start tag, Visual Studio
automatically adds a corresponding end tag: the markup becomes <aidio></aidio> . To correct the error,
you don't have to modify both the start and end tags—correcting the start tag automatically fixes the end
tag too.
JavaScript IntelliSense
Visual Studio offers IntelliSense not just for HTML5 markup tags but also for JavaScript code. Earlier, this
chapter looked at the jQuery and Modernizr libraries. Visual Studio provides IntelliSense for the objects,
methods, and properties of these libraries too. Figure 1-17 shows the properties of a Modernizr object
listed in the IntelliSense window.
Figure 1-17. JavaScript IntelliSense
Note that to display Modernizr members as shown in Figure 1-17, you must refer to the Modernizr
library in the page using <script> tag.
Search WWH ::

Custom Search