一、輸入!+tab鍵,或者!+enter,自動生成html:5的模板
二、自定義模板
打開File(文件)–>Preferences(首選項)–>User Snippets(用戶片段)–>在文本框中輸入“html”(將打開html.json,在該文件中輸入對應的模板保存即可)–>在空白html文件中輸入“h”+回車,即可生成自定義的模板、

{ // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } "html template":{ "prefix":"h",//使用模板的快捷鍵 "body": [ "<!DOCTYPE html>", "<html lang=\"en\">", "<head>", "\t<meta charset=\"UTF-8\">", "\t<title>Document</title>", "</head>", "<body>", "\t $0",//$0鼠標停留的位置 "</body>", "</html>" ], "description": "html模板"//模板的描述 } }