When you publish a webpage, people are not the only ones reading it. Browsers, search engines, and sharing apps also look for clues about its meaning. This lesson explains how structured data with microdata attributes fits into that picture.
The Idea in Plain English
Structured data adds machine-readable facts about information already visible on the page. Use a supported vocabulary and keep prices, dates, authors and names consistent with the real page.
You can test this using a small local HTML file. Change one part at a time and check the result in the browser before adding more code.
A Working Example
Read the sample once before copying it. Notice the element names and attribute values, then compare them with the explanation below.
<article>
<h1>Planting a Sunflower</h1>
<p>By Alex on October 3, 2026</p>
</article>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Planting a Sunflower",
"datePublished": "2026-10-03",
"author": {
"@type": "Person",
"name": "Alex"
}
}
</script>
What Each Part Does
- An article identifies a self-contained piece of content.
- The h1 identifies the principal page heading.
- A paragraph keeps one idea together as readable text.
- type chooses the relevant kind of script, input, media or embedded object.
Visitors see the ordinary article; a crawler may read the structured data. Correct markup does not guarantee a search enhancement.
Try It Yourself
Check that the structured data agrees with the article heading, author and publication date.
Common Beginner Mistakes
- Inventing reviews or adding fields that disagree with visible page content.
- Changing several parts of the example at once, making it difficult to see which part caused a different result.
- Choosing a tag only because its default appearance looks right, without checking whether it describes the content correctly.
Key Takeaways
- Structured data adds machine-readable facts about information already visible on the page. Use a supported vocabulary and keep prices, dates, authors and names consistent with the real page.
- Visitors see the ordinary article; a crawler may read the structured data. Correct markup does not guarantee a search enhancement.
- Test the markup in a browser, and check accessibility and real-world behavior where relevant.