|
| 1 | +# HTML Snippets |
| 2 | + |
| 3 | +## Structure |
| 4 | + |
| 5 | +### [htmldoc] html document |
| 6 | + |
| 7 | +```html |
| 8 | +<!DOCTYPE html> |
| 9 | +<html class="no-js" lang="pt-BR" xml:lang="pt-BR"> |
| 10 | + <head> |
| 11 | + <meta charset="utf-8"> |
| 12 | + <title>${1:Document}</title> |
| 13 | + <meta http-equiv="X-UA-Compatible" content="IE=Edge"> |
| 14 | + <meta name="viewport" content="width=device-width,initial-scale=1"> |
| 15 | + <script type="text/javascript"> |
| 16 | + // to identify if javascript is active |
| 17 | + var tagHtml = document.getElementsByTagName("html")[0]; |
| 18 | + tagHtml.className = tagHtml.className.replace('no-js', 'js'); |
| 19 | + </script> |
| 20 | + </head> |
| 21 | + <body> |
| 22 | + $2 |
| 23 | + </body> |
| 24 | +</html> |
| 25 | +``` |
| 26 | + |
| 27 | +### [htmlhead] head tags |
| 28 | + |
| 29 | +```html |
| 30 | +<meta name="format-detection" content="telephone=no"> |
| 31 | +<meta name="referrer" content="origin"> |
| 32 | +<meta name="description" content="${1:Description}"> |
| 33 | + |
| 34 | +<!-- facebook --> |
| 35 | +<meta property="og:site_name" content="${2:Site name}"> |
| 36 | +<meta property="og:title" content="${3:Title}"> |
| 37 | +<meta property="og:type" content="website"> |
| 38 | +<meta property="og:url" content="${4:Url}"> |
| 39 | +<meta property="og:description" content="${1:Description}"> |
| 40 | +<meta property="og:image" content="${5:Image}"> |
| 41 | +<meta property="fb:admins" content="$6"> |
| 42 | +<meta property="fb:app_id" content="$7"> |
| 43 | + |
| 44 | +<link rel="image_src" href="${5:Image}"> |
| 45 | + |
| 46 | +<!-- component schema.org --> |
| 47 | +<meta itemprop="name" content="${2:Site name}"> |
| 48 | +<meta itemprop="description" content="${1:Description}"> |
| 49 | +<meta itemprop="image" content="${5:Image}"> |
| 50 | +<meta itemprop="url" content="${4:Url}"> |
| 51 | + |
| 52 | +<meta name="geo.country" content="$8"> |
| 53 | +<meta name="geo.region" content="$9"> |
| 54 | +<meta name="geo.placename" content="$10"> |
| 55 | + |
| 56 | +<!-- favicon --> |
| 57 | +<link rel="apple-touch-icon" href="$11/apple-touch-icon.png"> |
| 58 | +<link rel="shortcut icon" href="$12/favicon.ico" type="image/x-icon"> |
| 59 | +<link rel="icon" href="$13/favicon.ico" type="image/x-icon"> |
| 60 | + |
| 61 | +<!-- canonical --> |
| 62 | +<link rel="canonical" href="${4:Url}"> |
| 63 | +``` |
0 commit comments