Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. Should HTML be included in the structured data (schema) markup for the main body content?

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Should HTML be included in the structured data (schema) markup for the main body content?

    Intermediate & Advanced SEO
    3
    3
    808
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • RosemaryB
      RosemaryB last edited by

      Lately we have been applying structured data to the main content body of our client's websites.  Our lead developer had a good question about HTML however.

      In JSON-LD, what is the proper way to embed content from a data field that has html markup (i.e. p, ul, li, br, tags) into mainContentOfPage. Should the HTML be stripped our or escaped somehow?

      I know that apply schema to the main body content is helpful for the Googlebot.  However should we keep the HTML?  Any recommendations or best practices would be appreciated.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Everett
        Everett last edited by

        As long as you're using the same Schema in both places I don't think it would hurt to have them both - JSON-LD in the HTML header and as structured data markup in the HTML where that entity exists on the page.

        You can play around with JSON-LD here to see what it would look like:
        http://json-ld.org/playground/

        1 Reply Last reply Reply Quote 0
        • RobertFisher
          RobertFisher last edited by

          Rosemary,

          People have a hard time with these questions because there can be more than one answer.

          --The answer is rough but I hope it makes sense.--

          I'd say it should be removed, although the best way to use that markup might be to mark up the actual html that is displayed rather than duplicating all of the "main content" inside of a JSON schema tag.

          Does it make sense for the JSON to look like below when you have the content already present on the page and could mark it up in the traditional tag format?

          |

          <scripttype="application ld+json"=""></scripttype="application>

          |
          | |

          {

          |
          | |

          "@context": "http://schema.org",

          |
          | |

          "@type": "WebSite",

          |
          | |

          "url": "https://www.example.com/",

          |
          | |

          "name" : "Example Group",

          |
          | |

          "alternateName" : "Example Enviro Group",

          |
          | |

          "potentialAction": {

          |
          | |

          "@type": "SearchAction",

          |
          | |

          "target": "https://www.example.com/?s={search_term_string}",

          |
          | |

          "query-input": "required name=search_term_string"

          |
          | |

          }

          "mainContentOfPage":"

          Lorem ipsum metus ullamcorper viverra. Aliquam

          Curabitur at lacus et quam scelerisque consequat. Vestibulum semper et ex quis commodo. Vestibulum lacinia ultricies neque et facilisis. Pellentesque feugiat luctus diam, et mollis elit posuere posuere. Nulla mattis libero lectus, at consequat sapien semper non. Duis lacinia mollis eros, in pulvinar enim interdum ac."

          |
          | |

          }

          |
          | | |

          Let me know if that helps... or not! Sorry for the layout issues, I think you will still get it.

          Robert

          1 Reply Last reply Reply Quote 3
          • 1 / 1
          • First post
            Last post

          Got a burning SEO question?

          Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


          Start my free trial


          Browse Questions

          Explore more categories

          • Moz Tools

            Chat with the community about the Moz tools.

          • SEO Tactics

            Discuss the SEO process with fellow marketers

          • Community

            Discuss industry events, jobs, and news!

          • Digital Marketing

            Chat about tactics outside of SEO

          • Research & Trends

            Dive into research and trends in the search industry.

          • Support

            Connect on product support and feature requests.

          • See all categories

          Related Questions

          • atiagr123

            How to update Schema markup code to all pages of my website ?

            Hi all i have a website with 1k+ pages and i have schema markup code for reviews and FAQ's, so need help in knowing how to update code for all pages in one go without using tag manager as updating to all pages manually is similar to impossible, let me know is there any way out to achieve the results and my website is built on word-press, awaiting for earliest reply......... Thanks

            Intermediate & Advanced SEO | | atiagr123
            2
          • PKI_Niles

            For FAQ Schema markup, do we need to include every FAQ that is on the page in the markup, or can we use only selected FAQs?

            The website FAQ page we are working on has more than 50 FAQs. FAQ Schema guidelines say the markup must be an exact match with the content. Does that mean all 50+ FAQs must be in the mark-up? Or does that mean the few FAQs we decided to put in the markup are an exact match?

            Intermediate & Advanced SEO | | PKI_Niles
            0
          • Alces

            JSON-LD schema markup for a category landing page

            I'm working on some schema for a client and have a question regarding the use of schema for a high-level category page. This page is merely the main lander for Categories. For example: https://www.examples.com/pages/categories And all it does is list links to the three main categories (Men's, Women's, Kid's) - it's a clothing store. This is the code I have right now. In short, simply using type @Itemlist and an array that uses @ListItem. Structured Data Testing Tool returns no errors with it, but my main question is this: Is this the _correct _way to do a page like this, or are there better options? Thanks.

            Intermediate & Advanced SEO | | Alces
            0
          • ColeBField

            Where does Movie Theater schema markup code live?

            What I am trying to accomplishI want what AMC has. When searching google for a movie at AMC near me, Google loads the movie times right onto the top of the first page. When you click the movie time it links to a pop up window that gives you the option to purchase from MovieTickets.com, Fandango or AMC.com.Info about my theaterMy theater hosts theater info and movie time info on their website. Once you click the time you want it takes you to a third party ticket fulfillment site via sub domain that I have little control over. Currently Fandango tickets show up in Google like AMCs but the option to buy on my theater site does not.Questions Generally, how do I accomplish this? Does the schema code get implemented on the third party ticket purchasing site or on my site? How can I ensure that the Google pop-up occurs so that users have a choice to purchase via Fandango or on my theaters website? TSt9g

            Intermediate & Advanced SEO | | ColeBField
            2
          • Jonathan.Smith

            Should I include URLs that are 301'd or only include 200 status URLs in my sitemap.xml?

            I'm not sure if I should be including old URLs (content) that are being redirected (301) to new URLs (content) in my sitemap.xml. Does anyone know if it is best to include or leave out 301ed URLs in a xml sitemap?

            Intermediate & Advanced SEO | | Jonathan.Smith
            0
          • 19958

            Schema for a discount

            Hi! I'm trying to implement schema for a discount and it doesn't seem to be working. Is this the correct code? NAME OF ORDER HERE are  $DISCOUNT HERE What am I missing? Thanks!

            Intermediate & Advanced SEO | | 19958
            0
          • BobAnderson

            Tabs and duplicate content?

            We own this site http://www.discountstickerprinting.co.uk/ and just a little concerned as I right clicked open in new tab on the tab content section and it went to a new page For example if you right click on the price tab and click open in new tab you will end up with the url
            http://www.discountstickerprinting.co.uk/#tabThree Does this mean that our content is being duplicated onto another page? If so what should I do?

            Intermediate & Advanced SEO | | BobAnderson
            0
          • Mark_Ch

            How to structure articles on a website.

            Hi All, Key to a successful website is quality content - so the Gods of Google tell me. Embrace your audience with quality feature rich articles on your products or services, hints and tips, how to, etc. So you build your article page with all the correct criteria; Long Tail Keyword or phrases hitting the URL, heading, 1st sentance, etc. My question is this
            Let's say you have 30 articles, where would you place the 30 articles for SEO purposes and user experiences. My thought are:
            1] on the home page create a column with a clear heading "Useful articles" and populate the column with links to all 30 articles.
            or
            2] throughout your website create link references to the articles as part of natural information flow.
            or
            3] Create a banner or impact logo on the all pages to entice your audience to click and land on dedicated "articles page" Thanks Mark

            Intermediate & Advanced SEO | | Mark_Ch
            0

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy

          Looks like your connection to Moz was lost, please wait while we try to reconnect.