Extract the H1 headings of a page
check h1 tag of a page | multiple h1 on one page | extract main heading from html | page missing h1 | curl | h1 | headings | seocurl -s https://example.com/ | tr '\n' ' ' | grep -oiP '<h1[^>]*>.*?</h1>' | sed -E 's/<[^>]+>//g; s/^\s+|\s+$//g'Finds all <h1> elements and strips the tags inside them, leaving only the text. One clear main heading per page helps users and search engines understand it. Themes and page builders sometimes produce several H1s or none at all, for example when the logo is marked up as an H1.
Note: Using -c instead of -o with grep and dropping sed only checks whether an H1 exists at all.
Also searched as
- check h1 tag of a page
- multiple h1 on one page
- extract main heading from html
- page missing h1