Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adaminfinitum/5125614 to your computer and use it in GitHub Desktop.
Save adaminfinitum/5125614 to your computer and use it in GitHub Desktop.
Customization of HTML abbreviations snippets in 'Emmet' for Sublime Text(2). Creates a basic HTML5 document with accessibility and SEO features in 2 keystrokes! In Emmet settings files 'snippets.json' lines 594 to 770
"html": {
"filters": "html",
"profile": "html",
"snippets": {
"!!!": "<!doctype html>",
"!!!4t": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
"!!!4s": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">",
"!!!xt": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
"!!!xs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">",
"!!!xxs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">",
"c": "<!-- |${child} -->",
"cc:ie6": "<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->",
"cc:ie": "<!--[if IE]>\n\t${child}|\n<![endif]-->",
"cc:noie": "<!--[if !IE]><!-->\n\t${child}|\n<!--<![endif]-->"
},
"abbreviations": {
"!": "html:5",
"a": "<a href=\"\" title=\"|\">",
"a:link": "<a href=\"http://|\" title=\"|\">",
"a:mail": "<a href=\"mailto:|\" title=\"|\">",
"a:tel": "<a href=\"tel:|\" title=\"|\" value=\"|\">",
"abbr": "<abbr title=\"\">",
"acronym": "<acronym title=\"\">",
"base": "<base href=\"\" />",
"basefont": "<basefont/>",
"br": "<br />",
"frame": "<frame/>",
"hr": "<hr />",
"bdo": "<bdo dir=\"\">",
"bdo:r": "<bdo dir=\"rtl\">",
"bdo:l": "<bdo dir=\"ltr\">",
"col": "<col/>",
"header": "<header role=\"banner\">",
"footer": "<footer role=\"contentinfo\">",
"main": "<main role=\"main\">",
"nav": "<nav role=\"navigation\">",
"aside": "<aside role=\"complementary\">",
"body": "<body role=\"document\">",
"link": "<link rel=\"stylesheet\" href=\"\" />",
"link:can": "<link rel=\"canonical\" href=\"\" />",
"link:css": "<link rel=\"stylesheet\" href=\"${1:style}.css\" media=\"all\" />",
"link:print": "<link rel=\"stylesheet\" href=\"${1:print}.css\" media=\"print\" />",
"link:favicon": "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"${1:favicon.ico}\" />",
"link:touch": "<link rel=\"apple-touch-icon\" href=\"${1:favicon.png}\" />",
"link:rss": "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"${1:rss.xml}\" />",
"link:atom": "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"Atom\" href=\"${1:atom.xml}\" />",
"meta": "<meta/>",
"meta:ch": "<meta charset=\"utf-8\" />",
"meta:des": "<meta name=\"description\" content=\"|\" />",
"meta:key": "<meta name=\"keywords\" content=\"|\" />",
"meta:win": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\" />",
"meta:vp": "<meta name=\"viewport\" content=\"width=${1:device-width}, initial-scale=${2:1.0}\" />",
"meta:compat": "<meta http-equiv=\"X-UA-Compatible\" content=\"${1:IE=7}\" />",
"style": "<style>",
"script": "<script>",
"script:src": "<script src=\"\" />",
"img": "<img src=\"\" alt=\"\" />",
"iframe": "<iframe src=\"\" frameborder=\"0\">",
"embed": "<embed src=\"\" type=\"\" />",
"object": "<object data=\"\" type=\"\">",
"param": "<param name=\"\" value=\"\" />",
"map": "<map name=\"\">",
"area": "<area shape=\"\" coords=\"\" href=\"\" alt=\"\" />",
"area:d": "<area shape=\"default\" href=\"\" alt=\"\" />",
"area:c": "<area shape=\"circle\" coords=\"\" href=\"\" alt=\"\" />",
"area:r": "<area shape=\"rect\" coords=\"\" href=\"\" alt=\"\" />",
"area:p": "<area shape=\"poly\" coords=\"\" href=\"\" alt=\"\" />",
"form": "<form action=\"\">",
"form:get": "<form action=\"\" method=\"get\">",
"form:post": "<form action=\"\" method=\"post\">",
"label": "<label for=\"\">",
"input": "<input type=\"${1:text}\" />",
"inp": "<input type=\"${1:text}\" name=\"\" id=\"\" />",
"input:hidden": "input[type=hidden name]",
"input:h": "input:hidden",
"input:text": "inp",
"input:t": "inp",
"input:search": "inp[type=search]",
"input:email": "inp[type=email]",
"input:url": "inp[type=url]",
"input:password": "inp[type=password]",
"input:p": "input:password",
"input:datetime": "inp[type=datetime]",
"input:date": "inp[type=date]",
"input:datetime-local": "inp[type=datetime-local]",
"input:month": "inp[type=month]",
"input:week": "inp[type=week]",
"input:time": "inp[type=time]",
"input:number": "inp[type=number]",
"input:color": "inp[type=color]",
"input:checkbox": "inp[type=checkbox]",
"input:c": "input:checkbox",
"input:radio": "inp[type=radio]",
"input:r": "input:radio",
"input:range": "inp[type=range]",
"input:file": "inp[type=file]",
"input:f": "input:file",
"input:submit": "<input type=\"submit\" value=\"\" />",
"input:s": "input:submit",
"input:image": "<input type=\"image\" src=\"\" alt=\"\" />",
"input:i": "input:image",
"input:button": "<input type=\"button\" value=\"\" />",
"input:b": "input:button",
"isindex": "<isindex/>",
"input:reset": "input:button[type=reset]",
"select": "<select name=\"\" id=\"\">",
"option": "<option value=\"\">",
"textarea": "<textarea name=\"\" id=\"\" cols=\"${1:30}\" rows=\"${2:10}\">",
"menu:context": "menu[type=context]>",
"menu:c": "menu:context",
"menu:toolbar": "menu[type=toolbar]>",
"menu:t": "menu:toolbar",
"video": "<video src=\"\">",
"audio": "<audio src=\"\">",
"html:xml": "<html xmlns=\"http://www.w3.org/1999/xhtml\">",
"keygen": "<keygen/>",
"command": "<command/>",
"bq": "blockquote",
"acr": "acronym",
"fig": "figure",
"figc": "figcaption",
"ifr": "iframe",
"emb": "embed",
"obj": "object",
"src": "source",
"cap": "caption",
"colg": "colgroup",
"fst": "fieldset",
"btn": "button",
"btn:b": "button[type=button]",
"btn:r": "button[type=reset]",
"btn:s": "button[type=submit]",
"optg": "optgroup",
"opt": "option",
"tarea": "textarea",
"leg": "legend",
"sect": "section",
"art": "article",
"hdr": "header",
"ftr": "footer",
"adr": "address",
"dlg": "dialog",
"str": "strong",
"prog": "progress",
"fset": "fieldset",
"datag": "datagrid",
"datal": "datalist",
"kg": "keygen",
"out": "output",
"det": "details",
"cmd": "command",
"doc": "html>(meta:ch+meta:vp+title{${1:Document}}+meta:des+meta:key+link:can+link:css+script:src)+body>nav+hdr+main+ftr",
"doc4": "html>(head>meta[http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\"]+title{${1:Document}})",
"html:4t": "!!!4t+doc4[lang=${lang}]",
"html:4s": "!!!4s+doc4[lang=${lang}]",
"html:xt": "!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:xs": "!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:xxs": "!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:5": "!!!+doc[lang=${lang}]",
"ol+": "ol>li",
"ul+": "ul>li",
"dl+": "dl>dt+dd",
"map+": "map>area",
"table+": "table>tr>td",
"colgroup+": "colgroup>col",
"colg+": "colgroup>col",
"tr+": "tr>td",
"select+": "select>option",
"optgroup+": "optgroup>option",
"optg+": "optgroup>option"
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment