h1
它能做什么
这项技能检查网站每个页面的主 H1 标题。适用于希望为读者和搜索引擎提供清晰页面主题的网站所有者和编辑。
适用场景
- ✓当页面没有主标题,或有多个主标题的时候。
- ✓当你的主标题只是品牌名称,没有说明主题的时候。
- ✓当你设置自动生成页面标题的模板的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/h1/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我网站的每个页面是否都只有一个清晰的主标题。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会统计每个页面上的 H1 标签,并检查每个标签是否填写了具体主题。它会建议改写任何不能描述页面的标题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use a single descriptive H1
The H1 is the most prominent heading on a page and a strong on-page ranking signal. Google uses it to understand the page's primary topic. Missing, duplicate, or keyword-free H1 tags reduce topical clarity, hurting rankings for the page's target terms.
Quick Reference
- Each page should have exactly one
<h1>tag that describes the page's primary topic with relevant keywords - The H1 does not need to be identical to the
<title>tag, but they should be topically consistent - Empty
<h1>tags, multiple<h1>tags on one page, or H1s containing only the brand name are all issues to fix
Check
Parse the rendered DOM of each page. Count all <h1> elements. Flag: (1) Pages with zero <h1> tags. (2) Pages with more than one <h1> tag. (3) <h1> elements whose text content is empty or contains only whitespace. (4) <h1> elements that contain only the brand name with no page-specific topic. (5) <h1> text that does not reflect the page's primary content topic.
Fix
- Ensure every page template outputs exactly one
<h1>. - The H1 text should describe the page's specific topic, not just the site name.
- Include the primary target keyword naturally in the H1 — do not force it awkwardly.
- If the page has multiple sections with separate H1 candidates, choose one main topic and demote others to H2.
- Verify the H1 is visible in the rendered DOM (not hidden via CSS
display:noneorvisibility:hidden). - In Next.js/React: ensure the H1 is in the page component, not in the shared layout.
Before:
<h1>Acme Corp</h1>(brand only) After:<h1>Project Management Software for Enterprise Teams</h1>
Explain
Google's John Mueller has confirmed that H1 tags help Google understand page structure. While H1 is not the strongest ranking factor in isolation, it contributes to on-page topical relevance signals. Multiple H1 tags on one page dilute the primary topic signal; a missing H1 leaves a structural gap that reduces confidence in what the page is about.
Code Review
Query the DOM for all <h1> elements. Assert exactly one exists per page. Check that innerText.trim() is non-empty. Compare H1 text to the page <title> — they should share core topic keywords. Flag if H1 is inside a <header> element shared across all pages (often the site logo alt text) rather than specific to the page content.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/h1
常见问题
H1 必须与页面标题一致吗?
不必。这项技能指出,H1 不需要与 title 标签相同,但两者应涵盖同一主题。
H1 应该包含关键词吗?
这项技能建议自然地包含主要关键词,但不要刻意强加。
如果页面有多个主要话题怎么办?
这项技能建议为 H1 选择一个主要话题,并将其他话题改为 H2 标题。
详情
作者的原始描述
Use when auditing a page's heading structure, generating H1 text for landing pages or blog posts, or reviewing a CMS template that may produce empty or missing H1 elements.
热度
- GitHub 星标
- 75k
- 排名
- #2864
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。