CodeBlanks Logo Icon CodeBlanks

Itemtype and itemid

HTML course · Advanced · Lesson 31/56

Start an Article markup with itemscope and itemtype.

What are itemscope and itemtype?

Adding Schema.org structured data rests on two attributes. itemscope says an element starts a scope. itemtype gives that element a type as a URL.

When marking up an article you add both to the article tag:

<article itemscope itemtype="https://schema.org/Article">

The itemtype value is always a Schema.org URL. The Article type fits news, opinion pieces and blog posts.

What is itemid?

The itemid attribute gives the marked element a unique identifier. The value is a URL and should point to the article itself.

For example, if the article lives at /articles/education-in-the-ai-era, you put that into itemid. Search engines can then match copies of the same article across places.

itemid always appears together with itemscope and itemtype.

Exercise Add itemscope, itemtype and itemid to the article tag

Take the article skeleton from the previous lesson. Add itemscope, itemtype="https://schema.org/Article" and itemid attributes to the <article> tag.

For itemid, use the article's URL path: /articles/education-in-the-ai-era.

Show example solution
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Education in the AI Era</title>
  </head>
  <body>
    <article itemscope itemtype="https://schema.org/Article" itemid="/articles/education-in-the-ai-era">
      <h1>Education in the AI Era</h1>
      <p>Published: <time>2026-03-15</time></p>
      <p>AI is reshaping the relationship between teacher and student in classrooms.</p>
    </article>
  </body>
</html>

Test yourself

  1. What should itemtype be for an article?

    <article itemscope itemtype="...">
    • text/html
    • https://schema.org/Person
    • https://schema.org/Organization
    • https://schema.org/Article
    Show answer

    https://schema.org/Article — Correct. The Article type is given as a Schema.org URL.

  2. Complete the opening of the Article tag

    <article ____ itemtype="https://schema.org/Article"></article>
    Show answer
    <article itemscope itemtype="https://schema.org/Article"></article>
  3. Match each attribute with its role

    itemscope
    Starts a scope
    itemtype
    Gives the type URL
    itemid
    Unique identifier
    itemprop
    Property name

All lessons in Advanced