Skip to content
tezvyn:

What critical on-page SEO elements would you extract from HTML?

Source: developers.google.comEasyHow cards are made

What critical on-page SEO elements would you extract from HTML?

Tests if you know which HTML elements search engines use to index pages. Strong answer: title tag, H1, and meta description shape search results and topical relevance. Red flag: claiming meta descriptions directly affect rankings or conflating H1 with title.

What's really being asked

This question checks whether you can identify the minimal set of HTML elements that communicate page meaning to search engines and how you would reason about programmatic extraction. Interviewers want to see that you understand the distinction between what is indexed versus what is displayed to users, and that you can map HTML tags to their search result counterparts.

The full answer

A strong response names three core elements and explains their distinct roles in order. First, the title tag, which search engines typically use to generate the clickable headline in title links on results pages. Second, the H1 tag, which serves as the primary topical heading on the page and helps crawlers understand the main subject. Third, the meta description, which often supplies the snippet text shown beneath the title link and influences click-through behavior even though it does not directly affect ranking. A great candidate also notes that extraction would require parsing the head section for title and meta description and the body for H1, handling cases where multiple H1s exist or tags are missing.

The mistakes people make

Red flags include conflating the title tag with the H1, claiming that meta descriptions are a ranking factor, or suggesting extraction of purely visual elements like CSS classes instead of semantic markup. Another weak pattern is listing dozens of tags without prioritizing them; the interviewer wants judgment about what is critical, not an exhaustive crawl of every attribute.

What usually comes next

Expect the interviewer to ask how you would handle missing or duplicate tags, how you would extract this data at scale across thousands of pages, or whether you would also pull Open Graph tags or structured data. They may also ask how you would validate that your extracted data actually matches what appears in search results.

A concrete example

Imagine you are building a content audit tool for a blog with five thousand posts. You write a parser that pulls the title tag from the head, the first H1 from the article body, and the meta description content attribute. You then flag posts where the title is shorter than thirty characters or longer than sixty, where the H1 differs significantly from the title, or where the meta description is missing entirely. This gives the editorial team a prioritized list of pages to fix without overwhelming them with every HTML element on the page.

Interview question

When building a content audit tool to evaluate how search engines interpret pages, which three HTML elements should be extracted first?

  • a.H1, meta description, and Open Graph tags
  • b.Title tag, H1, and meta descriptionCorrect
  • c.Title tag, H1, and meta keywords
  • d.Title tag, CSS classes, and meta description
Why?

The title tag, H1, and meta description form the minimal set that communicates topical relevance and search result display to crawlers. CSS classes are a tempting distractor because they are HTML attributes, but the card explicitly flags extracting visual styling instead of semantic markup as a red flag.

Just read this? Test yourself on what you have been reading.

Read the original → developers.google.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on seo — each one lists the topics its interview covers.

See open roles