0

I've read a lot of articles online about what there should be in the header of the page and what there should not be (i'm personally more interested on what there should be), and i've come up with this list:

  1. Charset:
<meta charset="utf-8">
  1. IE Explorer (hoping to take this one in some years...):
<meta http-equiv="X-UA-Compatible" content="IE=edge">
  1. Viewport:
<meta name="viewport" content="width=device-width, initial-scale=1">
  1. Icon:
<link rel="icon" href=".../favicon.ico">
<link rel="shortcut icon" href=".../favicon.ico" TYPE="image/x-icon">
  1. Language (to specify also on the html tag):
<meta http-equiv="Content-Language" content="IT" />
  1. Robots:
<meta name="robots" content="INDEX,FOLLOW" />
  1. Title:
<title> ... </title>
  1. Description:
<meta name="description" content="...">
  1. Apple icons:
<link rel="apple-touch-icon-precomposed" sizes="144x144..." href="...">
  1. Some possible preloads if needed:
<link rel=preload href="..." as="..." type="..." crossorigin="anonymous">
  1. Possibly some OG properties:
<meta property="og:..." content="...">
  1. Dns prefetch:
<link rel="preconnect" href="https://completion.amazon.com" crossorigin>
  1. Canonical:
<link rel="canonical" href="..." />
  1. Keywords (yes I know a lot of SE don't use this tag anymore):
<meta name="keywords" content="..." />
  1. LD-Json:
<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "..."
}

Now, in your opinion, are there something missing in this list?

  • Have you seen this resource? htmlhead.dev – Maximillian Laumeister Jul 3 at 18:43
  • You are inconsistent with the closing slashes but no HTML tag has ever needed a closing slash and you can remove them. – Rob Jul 4 at 8:55
  • 1
    Asking for a huge list of items isn't a good type of question for this site. This is also off-topic because it calls for opinions. – Stephen Ostermiller Jul 4 at 9:50
1

The list you've outlined looks complete to me, not sure what exactly you're looking for. According to W3, the following elements can go inside the <head>:

<title> (required in every HTML document)
<style>
<base>
<link>
<meta>
<script>
<noscript>

The only thing that's missing from your list that's related to the <link>element are the hreflang tag attributs (rel="alternate" hreflang="x")

Hope this helps!

Cheers

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.