Categories
HTML

HTML Snippets for Visual Studio Code

Go to the Preferences / or Settings area of VSC and choose html.json. Paste each snippet after the previous snippet, but before the file’s closing curly brace.

Link to Font Awesome CDN

"Font Awesome CDN": {
"prefix": "awesome",
"body": [
	"  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css' integrity='sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==' crossorigin='anonymous' referrerpolicy='no-referrer' />",
	"$2"
],
"description": "Link to Font Awesome CDN"
},

HTML Medium Boilerplate

This has a link to the stylesheet, initial cursor location at the title rather than the stupid default position, and an ending cursor location in the body.

"HTML Medium Boilerplate ": {
"prefix": "!!",
"body": [
"<!DOCTYPE html>",
"<html lang=\"en\">",
"",
"<head>",
"<meta charset=\"UTF-8\">",
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
"<title>${1:Page Title}</title>",
"",
"<link rel=\"stylesheet\" href=\"style.css\">",
"</head>",
"",
"<body>",
"${0}",
"</body>",
"",
"</html>"
],
"description": "HTML Medium Boilerplate Style Link"
},

HTML full boilerplate

This has a link to the stylesheet, initial cursor location at the title rather than the stupid default position, a link to font awesome, a link to a javascript file, and an ending cursor location in the body.

"HTML Full Boilerplate ": {
"prefix": "!!!",
"body": [
"<!DOCTYPE html>",
"<html lang=\"en\">",
"",
"<head>",
"<meta charset=\"UTF-8\">",
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
"<title>${1:Page Title}</title>",
"<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css\" integrity=\"sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\">",
"",
"<link rel=\"stylesheet\" href=\"style.css\">",
"<script src=\"app.js\" defer>",
"</head>",
"",
"<body>",
"${0}",
"</body>",
"",
"</html>"
],
"description": "HTML Full Boilerplate with Font Awesome and Style Link"
},