Stay organized with collections
Save and categorize content based on your preferences.
Use valid HTML to specify page metadata
Using valid HTML for page metadata ensures that Google can use the metadata as documented.
Google tries to understand HTML even when it is invalid or inconsistent with the
HTML standard,
but errors in the markup can cause problems with how your metadata is used in Google Search.
The primary element for specifying metadata about a page is the <head>
element of an HTML document. If you use an invalid element in the <head> element, Google ignores any
elements that appear after the invalid element.
Use valid elements in the <head> element
The <head> element must only contain the following valid elements (and no other invalid elements), as per
the HTML standard:
title
meta
link
script
style
base
noscript
template
Don't use invalid elements in the <head> element
No element other than the aforementioned is permitted by the HTML standard in the
<head> element. Common elements that appear in the <head> element,
rendering it invalid are:
iframe
img
We strongly recommend that you don't use these invalid elements in the
<head> element, but if you must, place these invalid elements after the ones you
want Google to see. Once Google detects one of these invalid elements, it assumes the end of
the <head> element and stops reading any further elements in the
<head> element.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[[["Utilize valid HTML for page metadata to ensure Google can properly interpret and use it in search results."],["Include metadata within the `\u003chead\u003e` element of your HTML document, using only the valid elements specified by the HTML standard: `title`, `meta`, `link`, `script`, `style`, `base`, `noscript`, and `template`."],["Avoid using invalid elements like `\u003ciframe\u003e` and `\u003cimg\u003e` within the `\u003chead\u003e` element as this can disrupt Google's parsing and cause metadata to be ignored."],["If you must use invalid elements, place them after the valid metadata elements to minimize potential issues."]]],["Valid HTML is crucial for Google to utilize page metadata correctly. The `\u003chead\u003e` element is key for this; only specific elements (`title`, `meta`, `link`, `script`, `style`, `base`, `noscript`, `template`) are allowed within it. Invalid elements, like `iframe` or `img`, cause Google to ignore any subsequent elements within `\u003chead\u003e`. Avoid invalid elements; if used, place them after valid ones to ensure Google reads the desired metadata first.\n"]]