Skip to content
Back to skills

Meta In Body

ASecurity

Use when auditing HTML document structure. Applies to any page where meta tags (noindex, canonical-url, description, viewport, OG tags) may have been injected into the body by CMS plugins, widgets, or JavaScript rendering.

  • 74,358 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
developmentjavascriptgojavafrontend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add thedaviddias/Front-End-Checklist --skill meta-in-body --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Meta In Body?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Meta In Body
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedaviddias-meta-in-body/badge)](https://www.skillsdirectory.com/skills/thedaviddias-meta-in-body)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: meta-in-body
description: "Use when auditing HTML document structure. Applies to any page where meta tags (noindex, canonical-url, description, viewport, OG tags) may have been injected into the body by CMS plugins, widgets, or JavaScript rendering."
metadata:
  category: seo
  priority: high
  difficulty: beginner
  estimatedTime: "5"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/seo/meta-in-body
---

# Meta Tags in Body

Meta tags placed in the document body are ignored by search engines and most browsers—directives like noindex or canonical-url are silently ineffective, causing pages to be indexed or de-indexed unexpectedly.

## Quick Reference

- All <meta> tags must appear inside <head>, never inside <body>
- Browsers may ignore or move misplaced meta tags, making them ineffective
- Crawlers like Googlebot only process meta tags found in <head>
- Validate with HTML validator or inspect parsed DOM to confirm placement

## Check

Parse the HTML and check whether any <meta> elements appear outside <head>—i.e., inside <body> or after the </head> closing tag. Flag each misplaced tag by name/property.

## Fix

Move all <meta> tags into the <head> section before </head>. If they are injected by a script after the DOM is built, refactor the injection to target document.head instead of document.body.

## Explain

Meta tags are document-level metadata and must live in <head>. When placed in <body>, they fall outside the metadata model of the document—search engines and browsers do not honour them, so directives like noindex or canonical-url will have no effect.

## Code Review

Parse the rendered HTML and check the DOM structure. Find all <meta> elements. For each one, traverse up the parent chain — if any ancestor is <body> or if the element appears after </head> in the source, flag it. Pay special attention to: meta name='robots', meta name='description', meta property='og:*', and link rel='canonical' placed in body.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/seo/meta-in-body

Files in this skill

  • SKILL.md2.1 KB
  • references/rule.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…