Use valid page metadata

Using valid page metadata ensures that Google can process the HTML markup of your pages. 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 your website in Google Search. For example, if you use an invalid element in the <head>, Google ignores any elements that appear after the invalid element.

Use valid elements in the <head>

Only place valid metadata inside the <head>. Valid metadata includes the following HTML elements:

  • title
  • meta
  • link
  • script
  • style
  • base
  • noscript
  • template

Don't use invalid elements in the <head>

The following elements are invalid when used in the <head>, and therefore aren't supported by Google Search when placed in the <head>:

  • iframe
  • img
  • Any other HTML element

We strongly recommend that you don't use these invalid elements in the <head>, 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> and stops reading any further elements in the <head>.