A standard HTML header

You should specify a lot of things in your HTML header nowadays. Previously it was enough with some CSS and JS script includes. Now we need a lot more.

I took an example from a public page, unidentified it as much as possible, and then added some comments.

<!-- prefix="og: http://ogp.me/ns#" -->
<!-- Open Graph, semantic vocabulary -->

<html class="no-js" lang="sv-SE" prefix="og: http://ogp.me/ns#">

    <head>
        <!-- META stuff, should always be there -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0">

        <!-- Icons for Apple, Android etc -->
        <link rel="shortcut icon" href="https://URI/favicon.ico">
        <link rel="apple-touch-icon" href="https://URI/apple-touch-icon.png" sizes="180x180">
        <link rel="icon" type="image/png" href="https://URI/favicon-32x32.png" sizes="32x32">
        <link rel="icon" type="image/png" href="https://URI/favicon-16x16.png" sizes="16x16">
        <link rel="mask-icon" href="https://URI/safari-pinned-tab.svg">

        <!-- The web app manifest provides information about an application (such as its name, author, icon, and description) in a JSON text file. -->
        <link rel="manifest" href="https://URI/manifest.json">

        <meta name="theme-color" content="#0080c8">

        <!-- Informs that the page below links back to this page -->
        <link rel="pingback" href="https://URI/xmlrpc.php">

        <title>The Title &raquo; The Company</title>

        <!-- "Preferred" version of this page -->
        <link rel="canonical" href="https://www.maklarstatistik.se/omrade/riket/gavleborgs-lan/gavle/" />

        <!-- Open Graph -->
        <meta property="og:locale" content="sv_SE" />
        <meta property="og:type" content="article" />
        <meta property="og:title" content="Bostadspriser i Gävle &raquo; Svensk Mäklarstatistik" />
        <meta property="og:url" content="https://www.maklarstatistik.se/omrade/riket/gavleborgs-lan/gavle/" />
        <meta property="og:site_name" content="Svensk Mäklarstatistik" />

        <!-- Twitter -->

        <meta name="twitter:card" content="summary" />
        <meta name="twitter:title" content="text about the content and the author" />

        <script

            type='application/ld+json'>{"@context":"https://schema.org","@type":"Organization","url":"https://www.maklarstatistik.se/","sameAs":[],"@id":"https://www.maklarstatistik.se/#organization","name":"Svensk M\u00e4klarstatistik","logo":"https://www.maklarstatistik.se/wp-content/uploads/maklarstatistik-logo.png"}</script>

        <!-- SEO Tools -->

        <link rel='dns-prefetch' href='//ajax.googleapis.com' />
        <link rel='dns-prefetch' href='//maps.googleapis.com' />
        <link rel='dns-prefetch' href='//s.w.org' />

        <!-- Alternate versions 1 of this page, http://microformats.org/wiki/rel-alternate -->
        <link rel="alternate" type="application/rss+xml" title="Svensk Mäklarstatistik &raquo; flöde" href="https://www.maklarstatistik.se/feed/" />
        <link rel="alternate" type="application/rss+xml" title="Svensk Mäklarstatistik &raquo; kommentarsflöde"
            href="https://www.maklarstatistik.se/comments/feed/" />

        <link rel='stylesheet' id='wp-block-library-css' href='https://www.maklarstatistik.se/wp-includes/css/dist/block-library/style.min.css?ver=5.0.3'
            type='text/css' media='all' />

        <link rel='stylesheet' id='site-css-css' href='https://www.maklarstatistik.se/wp-content/themes/maklarstatistik/assets/css/style.css?ver=1.2.7'
            type='text/css' media='all' />

        <script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js?ver=5.0.3'></script>

        <!-- WordPress REST API -->
        <link rel='https://api.w.org/' href='https://www.maklarstatistik.se/api/' />

        <!-- http://microformats.org/wiki/rel-shortlink -->
        <link rel='shortlink' href='https://www.maklarstatistik.se/?p=6210' />

        <!-- Alternate versions 2 of this page, http://microformats.org/wiki/rel-alternate -->
        <link rel="alternate" type="application/json+oembed"
            href="https://www.maklarstatistik.se/api/oembed/1.0/embed?url=https%3A%2F%2Fwww.maklarstatistik.se%2Fomrade%2Friket%2Fgavleborgs-lan%2Fgavle%2F" />

        <link rel="alternate" type="text/xml+oembed"
            href="https://www.maklarstatistik.se/api/oembed/1.0/embed?url=https%3A%2F%2Fwww.maklarstatistik.se%2Fomrade%2Friket%2Fgavleborgs-lan%2Fgavle%2F&#038;format=xml" />

    </head>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.