Skip to content

Home

Recommended minimum HTML head

An essential part of an HTML document is the <head> element, which contains metadata about the document. Some vital information, such as the document's title and character encoding are stored in the <head> element. It's also where you can include links to external resources such as CSS stylesheets and JavaScript files.

More often than not, this sort of metadata can grow in complexity with time. However, there are a few important things that should never be omitted. Here's a list of the bare minimum you should include in your <head> element:

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page Title</title>
  <meta name="description" content="Page description. No longer than 155 characters.">
</head>

More like this

Start typing a keyphrase to see matching snippets.