Back to HTML

Structured Data and Schema Markup for SEO

Coding Tutorials Team 16 June 2026

Semantic markup describes the structure of a document. Structured data describes the thing the document is about: that this page concerns a recipe, an event, a product or an article, along with its specific properties. Search engines read it to build richer results.

What it produces

Structured data is what allows a search result to show a star rating, a price, a preparation time, an event date, or a set of expandable questions. These enhanced results occupy more space and attract more attention than a plain listing.

It is worth being clear about what it does not do. Structured data is not a ranking factor in itself. It makes your content eligible for particular result formats and helps search engines understand it, and it will not move a page up the results by being present.

JSON-LD is the format to use

Three formats exist. Microdata and RDFa are written as attributes woven through your markup. JSON-LD is a block of JSON in a script tag, separate from the content entirely.

JSON-LD is the recommended format and is easier to maintain, because it is not entangled with your HTML. A template change cannot accidentally break it, and it can be generated from the same data that produced the page.

<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "What Semantic HTML Means", "datePublished": "2026-06-16", "author": { "@type": "Organization", "name": "Coding Tutorials Team" } } </script> 

It can go in the head or the body, and either is fine.

The types worth starting with

The vocabulary is enormous and most of it is irrelevant to any given site. A handful cover the common cases.

Article, or one of its more specific variants, suits editorial content and takes a headline, publication date, author and image. BreadcrumbList describes the trail to the page and often replaces the raw address in a result with a readable path. Organization or Person describes who publishes the site, and belongs on the home page. FAQPage marks up questions and answers.

Beyond those, Product with an Offer covers commerce, Recipe covers cooking content, Event covers listings, and LocalBusiness covers a physical location with opening hours.

It must match the page

The rule that matters most is that structured data has to describe content actually visible on the page. Marking up a rating nobody can see, questions that do not appear, or a price different from the one displayed is a policy violation rather than a clever technique.

Enforcement is real. Sites have lost rich result eligibility entirely for marking up content that was not present, and recovering that eligibility takes considerably longer than losing it.

Required and recommended properties

Each type has properties that are required for eligibility and others that are merely recommended. Omitting a required one means the markup is valid and produces nothing.

The documentation for each result type lists both, and it changes over time as requirements are tightened. Checking it when implementing a type, rather than copying an example from an old tutorial, avoids a good deal of wasted effort.

Test it

Two tools matter. A validator confirms the syntax is correct and the required properties are present. A rich results test reports whether a specific search engine considers the page eligible for a particular enhancement, which is the question you actually care about.

After deployment, the search console for your site reports errors and warnings across every page it has crawled, which catches problems that only appear on certain templates or with certain content.

Keep it in the template

Structured data written by hand per page will drift out of step with the content almost immediately. Generating it from the same values that render the page keeps the two consistent by construction, and means a change to a publication date or an author updates both at once.

Structured data and semantic HTML are complementary

Neither replaces the other. Semantic markup makes the page navigable and comprehensible to browsers and assistive technology. Structured data describes the subject matter to search engines in a controlled vocabulary.

A page can have excellent structured data and unusable markup, or the reverse. Doing both is not duplicated effort, because they serve different audiences and are read by different software.

Do not mark up everything

There is a temptation to add every type that plausibly applies. This dilutes rather than helps, and contradictory or excessive markup can prevent any enhancement appearing.

Pick the type that genuinely describes the page, implement it fully with its required properties, and add a second only where the page really does represent two things.