How Do I Add Schema Markup to My Custom HTML Site? | Vibe Code Your Leads

How do I add schema markup to my custom HTML site?

Direct Answer

Add schema markup by placing a <script type="application/ld+json"> block in the <head> section of each HTML page. Use the @graph format to combine multiple schema types. BlogPosting, FAQPage, Author, and BreadcrumbList. In a single block. The content of the block is JSON-LD: a structured data format that AI engines read directly, without needing to parse your HTML or execute JavaScript. Validate every page using Google's Rich Results Test before publishing.

Cindy Anne Molchany

Cindy Anne Molchany

Founder, Perfect Little Business™ · Creator, Authority Directory Method™

Best Move

Build a master schema template for your node pages. With BlogPosting, FAQPage, Author, and BreadcrumbList in one @graph block. Then use AI to populate the variable fields for each new page you publish.

Why It Works

Schema in the head is read by AI crawlers before a single line of your HTML body is parsed. It gives every page a machine-readable identity independent of your design, layout, or CMS.

Next Step

After adding schema, validate it using Google's Rich Results Test. Then read the Schema Stacking cluster (Pillar 3, Cluster E) to understand how combining schema types amplifies the authority signal on each page.

What to know about adding schema to a custom HTML site

Where exactly does schema markup go in a custom HTML page?

Schema markup in JSON-LD format belongs in the <head> section of your HTML document. Specifically inside a <script> tag with the type attribute set to application/ld+json. This tag type is how browsers and crawlers distinguish JSON-LD structured data from regular JavaScript.

Here is the container structure you need:

<head>
  <!-- your meta tags, canonical, CSS links -->

  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@graph": [
      <!-- schema types go here -->
    ]
  }
  </script>
</head>

This structure is present in the static HTML source. Which means AI crawlers read it when they request the page, without needing to render your CSS, execute your JavaScript, or load any external resources. It is the most direct communication channel you have to AI engines.

How does the @graph format let you combine multiple schema types efficiently?

An authority directory node page typically carries three to four schema types simultaneously. The @graph format allows you to declare all of them in a single JSON-LD block. Cleaner than multiple separate script tags and recommended by Google's structured data guidelines.

For a node page, the complete @graph stack includes:

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "BlogPosting",
      "headline": "[Your H1. The exact query]",
      "description": "[Your TL;DR text]",
      "url": "[Full canonical URL of this page]",
      "datePublished": "2026-03-18",
      "dateModified": "2026-03-18",
      "author": {
        "@type": "Person",
        "name": "Cindy Anne Molchany",
        "url": "https://perfectlittlebusiness.com",
        "jobTitle": "Founder, Perfect Little Business",
        "sameAs": [
          "https://www.linkedin.com/in/cindyannemolchany/",
          "https://www.instagram.com/cindyannemolchany/"
        ]
      },
      "publisher": {
        "@type": "Organization",
        "name": "Perfect Little Business",
        "url": "https://perfectlittlebusiness.com"
      }
    },
    {
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "[FAQ question 1]",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "[Answer text. No HTML tags]"
          }
        }
      ]
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.vibecodeyourleads.com"},
        {"@type": "ListItem", "position": 2, "name": "[Pillar name]", "item": "[Pillar URL]"},
        {"@type": "ListItem", "position": 3, "name": "[Cluster name]", "item": "[Cluster URL]"},
        {"@type": "ListItem", "position": 4, "name": "[Node title]", "item": "[Node URL]"}
      ]
    }
  ]
}

The variable fields. Headline, description, URL, FAQ questions, breadcrumb labels and URLs. change for every page. The structural template stays consistent across every node in your directory.

What does each schema type communicate to AI engines?

Each schema type in the stack sends a distinct signal:

  • BlogPosting. Identifies the content as a substantive expert post, attributing it to a named author with verifiable credentials. This is the authorship and credibility layer.
  • Author (Person, nested in BlogPosting). Names the author, links to their primary web presence, and provides sameAs links to verified off-site profiles. This cross-references identity across platforms.
  • FAQPage. Presents explicit Q&A pairs that AI engines can extract directly. This is the content that gets cited when AI recommends you in response to a matching query.
  • BreadcrumbList. Communicates the page's position in the site's topic hierarchy. This helps AI understand topical context. Whether this page is about a broad pillar or a specific node question within a cluster.

Together, these four types tell AI: this is content, authored by this verified person, answering these specific questions, within this topical structure. That is a complete authority signal on a single page.

What are the most common JSON-LD syntax mistakes and how do you avoid them?

JSON-LD is unforgiving. A single syntax error renders the entire block invalid. Silently. Here are the most common mistakes:

Mistake What breaks How to avoid
Missing comma between objects Entire block invalid Run through a JSON validator after every edit
Trailing comma after last item Block fails to parse Never add a comma after the last item in an array or object
HTML entities in answer text Validation warnings Use plain text in FAQ answer fields. No &amp; or &lt; tags
Unescaped quotes in text JSON parse error Use single quotes or escape with backslash within JSON strings
Schema not matching visible content Google penalty for FAQ rich results FAQ schema questions must match the visible FAQ section exactly

How do you use AI to generate schema markup at scale?

For an authority directory with 125+ node pages, writing schema manually is impractical. The correct approach is to use AI to generate the schema block for each page as part of the content generation workflow.

Here is the prompt pattern that works reliably:

"Generate a complete JSON-LD schema block for a node page with these details:
. H1 (headline): [exact query]
. TL;DR (description): [2-sentence answer]
. URL: [full canonical URL]
. FAQ questions and answers: [list of 5 Q&As]
. Breadcrumb path: Home > [Pillar name] > [Cluster name] > [Node title]
Use the @graph format with BlogPosting, FAQPage, and BreadcrumbList. Author is Cindy Anne Molchany. Publisher is Perfect Little Business."

Claude produces a complete, correctly formatted JSON-LD block from this prompt in seconds. The only remaining step is to paste it into the HTML head and validate it. This is how schema gets installed on 125 pages. Efficiently, consistently, and without manual JSON editing.

The VCYL Perspective

Schema was the part of web optimization I initially found most intimidating. Not because it was conceptually hard, but because the margin for error felt high. One misplaced comma and the whole block disappears silently. You would never know it was broken unless you tested it.

What changed my relationship with schema was realizing that AI turns schema from a technical barrier into a template exercise. You don't need to know JSON-LD syntax from memory. You need to know what information goes where. And you can give that information to Claude in plain English and get back valid, deployable code. The knowledge required is structural, not syntactic.

More importantly: schema is one of the most direct conversations you can have with AI engines. When you write FAQ schema, you are not writing it for Google's search results. You are writing it for GPTBot and Claude-Web and PerplexityBot. AI systems that are building the knowledge base they draw from when someone asks for a recommendation. Your schema is going directly into that feed. Every Q&A pair is a direct offer to be cited.

Every node on this site has the full schema stack. Not as an afterthought. As the first thing built for each page. The schema template was designed before any content was written, because the machine-readable layer is not decoration on top of the content. It is equal in importance to the content itself. That is a shift in perspective that changes how you build entirely.

More on adding schema to a custom HTML site

Does schema markup need to go in the head or body of an HTML page?

JSON-LD schema blocks should go in the head section of the HTML document, before the closing head tag. Technically they can appear in the body and still be read by validators, but placing them in the head is best practice. It ensures schema is encountered early in parsing and is consistently positioned across all pages.

Can I use the same schema template across all my node pages?

Yes, and you should. A consistent schema template with page-specific values (headline, description, URL, FAQ questions, breadcrumb items) is the most efficient approach for a multi-page authority directory. Use a base template and update the variable fields for each page. AI tools can do this programmatically across a batch of pages.

What happens if my schema markup has an error?

A syntax error. Like a missing comma, unclosed bracket, or mismatched quote. Will invalidate the entire schema block. AI engines and search crawlers will ignore the block completely, as if it doesn't exist. Run every page through Google's Rich Results Test before publishing to catch errors before they become invisible failures.

Should I use the @graph format or individual schema blocks?

The @graph format is preferred when combining multiple schema types on a single page. It groups all schema types into a single JSON-LD block, which is cleaner and reduces the chance of parsing conflicts. For a node page with BlogPosting, FAQPage, and BreadcrumbList, use one @graph block containing all three types.

How do I generate schema markup without writing it manually?

Ask Claude to generate the schema block for each page using a consistent template. Provide the page's headline, description, URL, FAQ questions and answers, and breadcrumb path. Claude will produce a correctly formatted JSON-LD block you can paste directly into your HTML head. This is how schema is generated at scale for an authority directory.

Related pages

Cindy Anne Molchany

Cindy Anne Molchany

Cindy is the founder of Perfect Little Business™ and creator of the Authority Directory Method™. She helps entrepreneurs. Coaches, consultants, and service providers. Build AI-discoverable authority systems that generate qualified leads without chasing. This site is built using the exact method it teaches.

vibecodeyourleads.com

See What AI Sees When It Looks at Your Website

Take the free AI Visibility Scan to discover your current positioning. Or explore the complete build system.

Take the Free AI Visibility Scan Learn About the Build System