Basic editing in VS Code
VS Code comes with some great options, which will enable you to code faster. Let's look at some of the options.
Generating HTML
The Emmet 2.0
extension is built into the editor, and helps you to quickly write HTML code.
Here are some examples.
To create a table with five rows having two columns in each row, you can use the following statement:
table>tr*5>td*3
This is what the table looks like:
As shown in the preceding screenshot, you will notice that VS Code starts showing you the HTML it will generate. Press Enter to generate the HTML.
In case you want to add a class attribute to the tag, use a dot (.)
after the tag name. An example of this can be seen in the following code snippet:
table>tr*5.myclass>td*2
This will generate the same table as in Figure 1.29, with myclass
placed as a class attribute for the <tr/>
tag. The...