Validador de Títulos H1–H6

Validador de Títulos H1–H6

Cole a URL de uma página (se o site permitir leitura) ou cole o HTML. A ferramenta lista todos os H1, H2, H3, H4, H5 e H6, conta ocorrências e aponta problemas comuns.

Se aparecer erro por bloqueio (CORS), use o modo HTML abaixo: abra o código-fonte da página, copie e cole.
Recomendado: HTML (sempre funciona).
Dica: clique com o botão direito no site → “Exibir código-fonte” → copie tudo.
Resumo
H1
Total de headings (H1–H6)
Quantidade encontrada
Possíveis problemas
Erros e alertas
      Observação: a ferramenta lê o HTML “como está”. Se headings forem gerados via JS depois do carregamento, o modo URL pode não capturar. O modo HTML costuma ser mais fiel ao que você copiou do código-fonte.
      Boa prática: ter 1 H1 principal, H2 para seções, H3 para subseções. Evite pular níveis (ex.: H2 → H4). Em WordPress/Elementor, às vezes o logo/hero vira H1 duplicado: essa ferramenta pega isso rápido.
      `; analisar(); } function limpar(){ document.getElementById("url").value = ""; document.getElementById("html").value = ""; document.getElementById("mode").value = "url"; toggleMode(); document.getElementById("result").style.display = "none"; } function copiarRelatorio(){ const h1 = document.getElementById("kpiH1").textContent; const total = document.getElementById("kpiTotal").textContent; const issues = Array.from(document.querySelectorAll("#issuesList li")).map(li => li.textContent).filter(Boolean); const tips = Array.from(document.querySelectorAll("#tipsList li")).map(li => li.textContent).filter(Boolean); const headings = Array.from(document.querySelectorAll("#headingsBox .row")).map(row => { const tag = row.querySelector(".tag")?.textContent || ""; const text = row.querySelector("div div")?.textContent || ""; return `${tag}: ${text}`; }).filter(Boolean); const text = `Validador de Títulos H1–H6 Resumo: - H1: ${h1} - Total headings: ${total} Problemas/alertas: ${issues.length ? ("- " + issues.join("\n- ")) : "—"} Dicas: ${tips.length ? ("- " + tips.join("\n- ")) : "—"} Headings encontrados: ${headings.length ? ("- " + headings.join("\n- ")) : "—"} `; if (navigator.clipboard && navigator.clipboard.writeText){ navigator.clipboard.writeText(text).then(() => alert("Relatório copiado!")) .catch(() => fallbackCopy(text)); } else { fallbackCopy(text); } } function fallbackCopy(text){ const ta = document.createElement("textarea"); ta.value = text; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); alert("Relatório copiado!"); } // init toggleMode();
      `; analisar(); } function limpar(){ document.getElementById("url").value = ""; document.getElementById("html").value = ""; document.getElementById("mode").value = "url"; toggleMode(); document.getElementById("result").style.display = "none"; } function copiarRelatorio(){ const h1 = document.getElementById("kpiH1").textContent; const total = document.getElementById("kpiTotal").textContent; const issues = Array.from(document.querySelectorAll("#issuesList li")).map(li => li.textContent).filter(Boolean); const tips = Array.from(document.querySelectorAll("#tipsList li")).map(li => li.textContent).filter(Boolean); const headings = Array.from(document.querySelectorAll("#headingsBox .row")).map(row => { const tag = row.querySelector(".tag")?.textContent || ""; const text = row.querySelector("div div")?.textContent || ""; return `${tag}: ${text}`; }).filter(Boolean); const text = `Validador de Títulos H1–H6 Resumo: - H1: ${h1} - Total headings: ${total} Problemas/alertas: ${issues.length ? ("- " + issues.join("\n- ")) : "—"} Dicas: ${tips.length ? ("- " + tips.join("\n- ")) : "—"} Headings encontrados: ${headings.length ? ("- " + headings.join("\n- ")) : "—"} `; if (navigator.clipboard && navigator.clipboard.writeText){ navigator.clipboard.writeText(text).then(() => alert("Relatório copiado!")) .catch(() => fallbackCopy(text)); } else { fallbackCopy(text); } } function fallbackCopy(text){ const ta = document.createElement("textarea"); ta.value = text; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); alert("Relatório copiado!"); } // init toggleMode();