HEAD

    Below are the essential tags for basic, minimalist websites:

    Elements

    1. <!-- The <base> tag defines a base URL for all relative links in the document -->
    2. <base href="https://example.com/page.html">
    3. <style>
    4. body { color: red; }
    5. </style>
    6. <script src="script.js"></script>

    Meta Element

    1. <meta charset="utf-8">
    2. <meta http-equiv="x-ua-compatible" content="ie=edge">
    3. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    4. <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    5. <meta name="application-name" content="Application Name">
    6. <meta name="keywords" content="your,keywords,here,comma,separated,no,spaces">
    7. <meta name="description" content="150 chars">
    8. <meta name="subject" content="your website's subject">
    9. <meta name="robots" content="index,follow,noodp">
    10. <meta name="googlebot" content="index,follow">
    11. <meta name="google" content="nositelinkssearchbox">
    12. <meta name="google-site-verification" content="verification_token">
    13. <meta name="abstract" content="">
    14. <meta name="topic" content="">
    15. <meta name="summary" content="">
    16. <meta name="classification" content="business">
    17. <meta name="url" content="https://example.com/">
    18. <meta name="identifier-URL" content="https://example.com/">
    19. <meta name="directory" content="submission">
    20. <meta name="category" content="">
    21. <meta name="coverage" content="Worldwide">
    22. <meta name="distribution" content="Global">
    23. <meta name="rating" content="General">
    24. <meta name="referrer" content="never">
    25. <meta http-equiv="Content-Security-Policy" content="default-src 'self'">
    1. <!-- Used to declare the document language, but not well supported. Better to use <html lang=""> -->
    2. <meta name="language" content="en">
    3. <!-- No evidence of current use in any search engines -->
    4. <meta name="revised" content="Sunday, July 18th, 2010, 5:15 pm">
    5. <!-- Provides an easy way for spam bots to harvest email addresses -->
    6. <meta name="reply-to" content="email@example.com">
    7. <!-- Better to use <link rel="author"> or humans.txt file -->
    8. <meta name="author" content="name, email@example.com">
    9. <meta name="designer" content="">
    10. <meta name="owner" content="">
    11. <!-- Tells search bots to revisit the page after a period. This is not supported because most Search Engines now use random intervals for re-crawling a webpage -->
    12. <meta name="revisit-after" content="7 days">
    13. <!-- Google strongly advises not to use this. Better to set up server-side (e.g. Apache, nginx) redirects instead -->
    14. <meta http-equiv="refresh" content="300;url=https://example.com/">
    15. <!-- Cache Control -->
    16. <!-- Better to configure cache control server side -->
    17. <meta http-equiv="Expires" content="0">
    18. <meta http-equiv="Pragma" content="no-cache">
    19. <meta http-equiv="Cache-Control" content="no-cache">
    1. <link rel="copyright" href="copyright.html">
    2. <link rel="stylesheet" href="https://example.com/styles.css">
    3. <link rel="alternate" href="https://feeds.feedburner.com/martini" type="application/rss+xml" title="RSS">
    4. <link rel="alternate" href="https://es.example.com/" hreflang="es">
    5. <link rel="me" href="https://google.com/profiles/thenextweb" type="text/html">
    6. <link rel="me" href="mailto:name@example.com">
    7. <link rel="me" href="sms:+15035550125">
    8. <link rel="archives" href="https://example.com/2003/05/" title="May 2003">
    9. <link rel="index" href="https://example.com/" title="DeWitt Clinton">
    10. <link rel="start" href="https://example.com/photos/pattern_recognition_1_about/" title="Pattern Recognition 1">
    11. <link rel="prev" href="https://example.com/opensearch/opensearch-and-openid-a-sure-way-to-get-my-attention/" title="OpenSearch and OpenID? A sure way to get my attention.">
    12. <link rel="search" href="/open-search.xml" type="application/opensearchdescription+xml" title="Search Title">
    13. <link rel="self" type="application/atom+xml" href="https://example.com/atomFeed.php?page=3">
    14. <link rel="first" href="https://example.com/atomFeed.php">
    15. <link rel="next" href="https://example.com/atomFeed.php?page=4">
    16. <link rel="previous" href="https://example.com/atomFeed.php?page=2">
    17. <link rel="last" href="https://example.com/atomFeed.php?page=147">
    18. <link rel="canonical" href="https://example.com/2010/06/9-things-to-do-before-entering-social-media.html">
    19. <link rel="amphtml" href="https://www.example.com/url/to/amp-version.html">
    20. <link rel="EditURI" href="https://example.com/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD">
    21. <link rel="pingback" href="https://example.com/xmlrpc.php">
    22. <link rel="webmention" href="https://example.com/webmention">
    23. <link rel="manifest" href="manifest.json">
    24. <link rel="author" href="humans.txt">
    25. <link rel="import" href="component.html">
    26. <!-- Prefetching, preloading, prebrowsing -->
    27. <link rel="dns-prefetch" href="//example.com/">
    28. <link rel="preconnect" href="https://www.example.com/">
    29. <link rel="prefetch" href="https://www.example.com/">
    30. <link rel="prerender" href="https://example.com/">
    31. <link rel="subresource" href="styles.css">
    32. <link rel="preload" href="image.png">
    33. <!-- More info: https://css-tricks.com/prefetching-preloading-prebrowsing/ -->

    Below are the link relations which are not recommended for use:

    1. <link rel="shortcut icon" href="path/to/favicon.ico">

    Favicons

    1. <!-- For IE 10 and below -->
    2. <!-- No link, just place a file called favicon.ico in the root directory -->
    3. <!-- For IE 11, Chrome, Firefox, Safari, Opera -->
    4. <link rel="icon" href="path/to/favicon-16.png" sizes="16x16" type="image/png">
    5. <link rel="icon" href="path/to/favicon-32.png" sizes="32x32" type="image/png">
    6. <link rel="icon" href="path/to/favicon-48.png" sizes="48x48" type="image/png">
    7. <link rel="icon" href="path/to/favicon-62.png" sizes="62x62" type="image/png">
    8. <!-- More info: https://bitsofco.de/all-about-favicons-and-touch-icons/ -->

    Social

    OEmbed

    Facebook / Open Graph

    1. <meta property="fb:app_id" content="123456789">
    2. <meta property="og:url" content="https://example.com/page.html">
    3. <meta property="og:type" content="website">
    4. <meta property="og:title" content="Content Title">
    5. <meta property="og:image" content="https://example.com/image.jpg">
    6. <meta property="og:description" content="Description Here">
    7. <meta property="og:site_name" content="Site Name">
    8. <meta property="og:locale" content="en_US">
    9. <meta property="article:author" content="">
    10. <!-- Facebook: https://developers.facebook.com/docs/sharing/webmasters#markup -->
    11. <!-- Open Graph: http://ogp.me/ -->
    1. <meta charset="utf-8">
    2. <meta property="op:markup_version" content="v1.0">
    3. <!-- The URL of the web version of your article -->
    4. <link rel="canonical" href="http://example.com/article.html">
    5. <!-- The style to be used for this article -->
    6. <meta property="fb:article_style" content="myarticlestyle">

    Twitter

    1. <meta name="twitter:card" content="summary">
    2. <meta name="twitter:site" content="@site_account">
    3. <meta name="twitter:creator" content="@individual_account">
    4. <meta name="twitter:url" content="https://example.com/page.html">
    5. <meta name="twitter:title" content="Content Title">
    6. <meta name="twitter:description" content="Content description less than 200 characters">
    7. <meta name="twitter:image" content="https://example.com/image.jpg">
    8. <!-- More info: https://dev.twitter.com/cards/getting-started -->
    9. <!-- Validate: https://dev.twitter.com/docs/cards/validation/validator -->

    Google+ / Schema.org

    1. <link href="https://plus.google.com/+YourPage" rel="publisher">
    2. <meta itemprop="name" content="Content Title">
    3. <meta itemprop="description" content="Content description less than 200 characters">
    4. <meta itemprop="image" content="https://example.com/image.jpg">

    Browser/Platform

    Apple iOS

    1. <!-- Smart App Banner -->
    2. <meta name="apple-itunes-app" content="app-id=APP_ID,affiliate-data=AFFILIATE_ID,app-argument=SOME_TEXT">
    3. <!-- Disable automatic detection and formatting of possible phone numbers -->
    4. <meta name="format-detection" content="telephone=no">
    5. <meta name="apple-mobile-web-app-capable" content="yes">
    6. <meta name="apple-mobile-web-app-status-bar-style" content="black">
    7. <meta name="apple-mobile-web-app-title" content="App Title">
    8. <!-- Touch Icons -->
    9. <link rel="apple-touch-icon" href="apple-touch-icon.png">
    10. <link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
    11. <!-- In most cases, one 180×180px touch icon in the head is enough -->
    12. <!-- Startup Image -->
    13. <link rel="apple-touch-startup-image" href="startup.png">
    14. <!-- More info: https://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html -->

    Apple Safari

    1. <!-- Pinned Site -->
    2. <link rel="mask-icon" href="icon.svg" color="red">

    Google Chrome

    1. <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/APP_ID">
    2. <!-- Disable translation prompt -->
    3. <meta name="google" value="notranslate">

    Microsoft Internet Explorer

    1. <meta http-equiv="x-ua-compatible" content="ie=edge">
    2. <meta http-equiv="cleartype" content="on">
    3. <meta name="skype_toolbar" content="skype_toolbar_parser_compatible">
    4. <!-- Disable link highlighting on IE 10 on Windows Phone (https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/) -->
    5. <meta name="msapplication-tap-highlight" content="no">
    6. <!-- Pinned sites (https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx) -->
    7. <meta name="application-name" content="Contoso Pinned Site Caption">
    8. <meta name="msapplication-tooltip" content="Example Tooltip Text">
    9. <meta name="msapplication-starturl" content="/">
    10. <meta name="msapplication-config" content="http://example.com/browserconfig.xml">
    11. <meta name="msapplication-allowDomainApiCalls" content="true">
    12. <meta name="msapplication-allowDomainMetaTags" content="true">
    13. <meta name="msapplication-badge" content="frequency=30; polling-uri=http://example.com/id45453245/polling.xml">
    14. <meta name="msapplication-navbutton-color" content="#FF3300">
    15. <meta name="msapplication-notification" content="frequency=60;polling-uri=http://example.com/livetile">
    16. <meta name="msapplication-square150x150logo" content="images/logo.png">
    17. <meta name="msapplication-square310x310logo" content="images/largelogo.png">
    18. <meta name="msapplication-square70x70logo" content="images/tinylogo.png">
    19. <meta name="msapplication-wide310x150logo" content="images/widelogo.png">
    20. <meta name="msapplication-task" content="name=Check Order Status;action-uri=./orderStatus.aspx?src=IE9;icon-uri=./favicon.ico">
    21. <meta name="msapplication-task-seperator" content="1">
    22. <meta name="msapplication-TileColor" content="#FF3300">
    23. <meta name="msapplication-TileImage" content="images/tileimage.jpg">
    24. <meta name="msapplication-window" content="width=1024;height=768">

    Microsoft Internet Explorer (LEGACY DO NOT USE)

    1. <!-- Disable the image toolbar when you mouse over images in IE 6 (https://msdn.microsoft.com/en-us/library/ms532986(v=vs.85).aspx) -->
    2. <meta http-equiv="imagetoolbar" content="no">
    3. <!-- Disable Windows theming to form inputs/buttons (https://support.microsoft.com/en-us/kb/322240) -->
    4. <meta name="MSThemeCompatible" content="no">
    5. <!-- Disable a feature that only appeared on IE 6 beta (https://stackoverflow.com/q/2167301) -->
    6. <meta name="MSSmartTagsPreventParsing" content="true">
    7. <!-- Interpage Transitions (https://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).aspx) -->
    8. <meta http-equiv="Page-Enter" content="revealtrans(duration=2,transition=2)">
    9. <meta http-equiv="Page-Exit" content="revealtrans(duration=3,transition=12)">
    10. <meta http-equiv="Site-Enter" content="revealtrans(duration=2,transition=2)">
    11. <meta http-equiv="Site-Exit" content="revealtrans(duration=3,transition=12)">

    360 Browser

    1. <!-- select rendering engine in order -->
    2. <meta name="renderer" content="webkit|ie-comp|ie-stand">
    1. <!-- Locks the screen into the specified orientation -->
    2. <meta name="screen-orientation" content="landscape/portrait">
    3. <!-- Display this page in fullscreen -->
    4. <meta name="full-screen" content="yes">
    5. <!-- UC browser will display images even if in "text mode" -->
    6. <meta name="imagemode" content="force">
    7. <!-- Page will be displayed in "application mode"(fullscreen,forbiding gesture, etc.) -->
    8. <meta name="browsermode" content="application">
    9. <!-- Disabled the UC browser's "night mode" in this page -->
    10. <meta name="nightmode" content="disable">
    11. <!-- Simplify the page to reduce data transfer -->
    12. <meta name="layoutmode" content="fitscreen">
    13. <!-- Disable the UC browser's feature of "scaling font up when there are many words in this page" -->
    14. <meta name="wap-font-scale" content="no">

    QQ Mobile Browser

    1. <!-- Locks the screen into the specified orientation -->
    2. <meta name="x5-orientation" content="landscape/portrait">
    3. <!-- Display this page in fullscreen -->
    4. <meta name="x5-fullscreen" content="true">
    5. <!-- Page will be displayed in "application mode"(fullscreen,etc.) -->

    Other Resources

    Contributing

    License