Free SEO tool
HTML Head Order Checker
Check the order of the elements in a page's HTML head. This head order checker fetches the URL, maps the direct children of the head to keys such as charset, viewport, title, description or canonical, and compares their order with one you can edit. It also reports missing core tags and head tags the parser placed in the body.
How to Check the HTML Head Order
Enter the page URL, keep or edit the expected order, and submit: the verdict, the order found and every head element appear below the form.
- Enter the full URL of the page, including https://.
- Keep the default order (charset, viewport, title, description, canonical) or type your own, with keys separated by commas.
- Use only the twelve keys listed under the field, each once, and list at least two.
- Submit the form and read the head order verdict, then the position of each listed element.
- Scroll to the element list to find the exact tag to move, and fix the template that writes the head.
HTML Head Order Results Explained
The verdict compares the first occurrence of each listed key in the head with the order you set; keys the page does not have are left out of the comparison.
In Order
Every listed key that the head contains appears in the expected sequence. Keys you did not list, such as a preload link between title and description, do not affect the verdict.
Out of Order
At least one listed key comes earlier or later than your order allows. The message shows the order found and the order expected, both limited to the keys present, so you can see which tag to move.
Not Enough Listed Elements in the Head
Fewer than two of the listed keys were found in the head, so there is no order to compare. This also applies when the URL does not return HTML.
Position of Each Listed Element
For each key in your order, the table gives the position it should have and the position it has among the listed keys found. A key marked as not in the head is missing from the parsed head, or was placed in the body.
Every Element in the Head
The element list shows each direct child of the head in document order, its key and the start of its markup. When a key appears several times, such as several Open Graph tags, only its first element counts for the order. Elements without a key, such as base or noscript, are listed but never evaluated.
Head Tags Found in the Body
These are charset, viewport, title, description, canonical, Open Graph, Twitter or icon tags that the HTML parser put in the body. An element the head cannot hold, such as img or iframe, ends the head early, and every tag after it lands in the body.
Missing Tag Verdicts
Above the order, the checker shows the verdicts of five audit rules: character encoding, viewport, title, meta description and canonical. They are the same verdicts a full audit of the URL reaches, and each links to the rule's documentation.
HTML Head Elements and Their Keys
The checker maps each head element to one of twelve keys, the same keys a QuikSEO site contract uses for its headOrder assertion.
The Default HTML Head Tag Order
The default order is charset, viewport, title, description, canonical, taken from the documented preset of the site contract. It starts with the charset because the HTML standard requires the element that declares the character encoding to be serialized completely within the first 1024 bytes of the document. The checker compares positions, not byte offsets.
Style in the HTML Head: Stylesheets and Scripts
A link with rel="stylesheet" and a style element both count as stylesheet, and every script except JSON-LD counts as script. JSON-LD has its own key, jsonld. The default order does not list them, so add stylesheet, script or jsonld to your order when your convention places them.
Preload, Icons and Social Tags
Preload, modulepreload, preconnect and dns-prefetch links count as preload. Icon and manifest links count as icons, og: properties as og, and twitter: names as twitter. A meta http-equiv="Content-Type" counts as charset, like meta charset.
HTML Head Example
A head in the default order starts with meta charset="utf-8", then meta name="viewport", the title element, meta name="description" and link rel="canonical". Open Graph and Twitter tags, icons, preload links, stylesheets and scripts can follow in the order your site settles on.
Head Tags for SEO: Where Placement Matters
For search engines, the key requirement is that these tags stay inside a valid head; the order within it matters most for the charset.
Title, Meta Description and Canonical
Google accepts the rel="canonical" link element only when it appears in the head section of the HTML. The checker shows whether the canonical, title and description are in the parsed head, and lists them in the body section when they were pushed out of it.
Invalid Elements End the Head
Google documents that the head must contain only title, meta, link, script, style, base, noscript and template elements. Once it detects an invalid element, it assumes the head has ended and stops reading further elements in it, which is what the body section of the result helps you spot.
HTML Head Order FAQ
What Is the HTML Head Tag?
The head element holds a document's metadata: its title, character encoding, meta tags, links to stylesheets and icons, and scripts. Browsers do not display it as page content. Search engines read the title, meta description and canonical link from it.
Which Meta Tags Belong in the HTML Head?
Meta charset, meta name="viewport" and meta name="description" belong in the head, along with Open Graph and Twitter meta tags. The checker maps each of them to its own key and lists any it finds in the body. Only one meta element with a charset attribute is allowed per document.
Does Meta Tag Order Matter for SEO?
Google's documentation on canonical links and valid page metadata asks that these tags sit in a valid head; it does not describe a ranking effect of their order. Order does matter for the charset, which the HTML standard requires within the first 1024 bytes. A consistent order also makes templates easier to review.
Can I Check My Own Head Order Convention?
Yes. Type your order in the field, for example charset, viewport, title, description, canonical, og, stylesheet, script. The checker evaluates it with the same headOrder check a QuikSEO site contract runs when the contract includes a head order assertion.
Why Is My Canonical Reported in the Body?
An element the head cannot hold, such as img, iframe or a stray div, was written before the canonical link. The HTML parser closes the head at that element and puts everything after it in the body. Move the invalid element into the body, or the head tags above it.
Popular tools