• majorAlexa

        See all notifications

        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
          • MozCon
          • Webinars, Whitepapers, & Guides
        • Blog
        • Why Moz
          • Digital Marketers
          • Agency Solutions
          • Enterprise Solutions
          • Small Business Solutions
          • 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.

          Let your business shine with Listings AI
          Moz Local

          Let your business shine with Listings AI

          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.

          NEW Keyword Suggestions by Topic
          Moz Pro

          NEW Keyword Suggestions by Topic

          Learn more
        • 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.

          • MozCon

            Save on Early Bird tickets and join us in London or New York City

          Unlock flexible pricing & new endpoints
          Moz API

          Unlock flexible pricing & new endpoints

          Find your plan
        • Blog
        • Why Moz
          • Digital Marketers

            Simplify SEO tasks to save time and grow your traffic.

          • 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.

          • 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
        • My Q&A
        • 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
        817
        Loading More Posts
        • Watching

          Notify me of new replies.
          Show question in unread.

        • Not Watching

          Do not notify me of new replies.
          Show question in unread if category is not ignored.

        • Ignoring

          Do not notify me of new replies.
          Do not show question in unread.

        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as question
        Locked
        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

              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

              • Collegis_Education

                Schema Markup Validator vs. Rich Results Test

                schema structured data

                I am working on a schema markup project. When I test the schema code in the Schema Markup Validator, everything looks fine, no errors detected. However, when I test it in the Rich Results Test, a few errors come back.
                What is the difference between these two tests? Should I trust one over the other?

                Intermediate & Advanced SEO | | Collegis_Education
                1
              • CongthanhThe

                How to find correct schema type

                Dear Moz members, I m currently working on schema optimizations of my website casinobesty.com which review online casino websites. I have a doubt which schema itemReviewed type I have to use in the review pages. Currently I m using type as "Game" but I m not sure it is correct. "description": "",
                "itemReviewed": {
                "@type": "Game",
                "name": "LeoVegas Casino",
                "url": "https://casinobesty.com/casino/leovegas-casino/"
                }, Thank you

                Intermediate & Advanced SEO | | CongthanhThe
                1
              • admiral99

                Should I use https schema markup after http-https migration?

                Dear Moz community, Noticed that several groups of websites after HTTP -> HTTPS migration update their schema markup from, example : {
                "@context": "http://schema.org",
                "@type": "WebSite",
                "name": "Your WebSite Name",
                "alternateName": "An alternative name for your WebSite",
                "url": "http://www.your-site.com"
                } becomes {
                "@context": "https://schema.org",
                "@type": "WebSite",
                "name": "Your WebSite Name",
                "alternateName": "An alternative name for your WebSite",
                "url": "https://www.example.com"
                } Interesting to know, because Moz website is on https protocol but uses http version of markup. Looking forward for answers 🙂

                Intermediate & Advanced SEO | | admiral99
                0
              • 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
              • 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
              • SorinaDascalu

                How do you archive content?

                In this video from Google Webmasters about content, https://www.youtube.com/watch?v=y8s6Y4mx9Vw around 0:57 it is advised to "archive any content that is no longer relevant". My question is how do you exactly do that? By adding noindex to those pages, by removing all internal links to that page, by completely removing those from the website? How do you technically archive content? watch?v=y8s6Y4mx9Vw

                Intermediate & Advanced SEO | | SorinaDascalu
                1
              • rarbel

                Schema.org and Testimonials

                Does anyone know which fields and code are necessary to embed a testimonial into a page using schema.org?

                Intermediate & Advanced SEO | | rarbel
                0
              • cprodigy29

                Where to link to HTML Sitemap?

                After searching this morning and finding unclear answers I decided to ask my SEOmoz friends a few questions. Should you have an HTML sitemap? If so, where should you link to the HTML sitemap from? Should you use a noindex, follow tag? Thank you

                Intermediate & Advanced SEO | | cprodigy29
                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
              • Digital Marketers
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority Checker
              • Local Citation 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.