HTML · The document layer

What is structured data and how does JSON-LD work?

Hardstructured datajson-ldschema.orgUpdated Oct 2026
Quiz this track

Short answer

Structured data is machine-readable JSON-LD that describes entities such as articles, products or FAQs using schema.org types. It helps search engines understand content and can enable rich results.

JSON-LD is a script block of JSON that describes the page's entities and their relationships. Search engines can read it without parsing microdata attributes scattered through the markup.

html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "HTML interview questions",
  "datePublished": "2026-10-28",
  "author": {
    "@type": "Person",
    "name": "Asha Patel"
  }
}
</script>

How to use it well

  • Match the structured data to the visible content; do not describe things the page does not show
  • Use the most specific schema.org type that fits
  • Include required properties for the type and the rich result you want
  • Validate with a structured data testing tool before shipping
  • Keep JSON valid; a trailing comma or comment breaks the block

Structured data is not a ranking trick. It helps search engines interpret the page and may make it eligible for enhanced results, but eligibility is not a guarantee. Incorrect or misleading markup can lead to manual action.

JSON-LD does not need to be in the head. It can appear in the body, and multiple blocks are allowed. It is generally preferred over microdata because it is easier to maintain.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why is JSON-LD often preferred over microdata?
  2. 2Does structured data guarantee rich results?
  3. 3Where should a JSON-LD script be placed?
  4. 4What happens if structured data does not match visible content?

Say it in the interview

Structured data is machine-readable metadata that describes the entities on a page, usually with schema.org types. I prefer JSON-LD because it is a single JSON block in a script tag and is easier to maintain than microdata. It helps search engines understand the page and can make it eligible for rich results. But it has to match the visible content, and it is not a guarantee of enhanced display or rankings.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live HTML mock interview and get scored feedback on depth, clarity and confidence.