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

    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.

    • 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 Apr 4, 2016, 9:10 PM

    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 Apr 10, 2016, 7:59 PM Apr 10, 2016, 7:59 PM

      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 Apr 5, 2016, 3:17 PM Apr 5, 2016, 3:12 PM

        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
        1 out of 3
        • First post
          1/3
          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 | Nov 21, 2019, 5:44 PM | atiagr123
          2
        • nchlondon

          Directory with Duplicate content? what to do?

          Moz keeps finding loads of pages with duplicate content on my website. The problem is its a directory page to different locations. E.g if we were a clothes shop we would be listing our locations: www.sitename.com/locations/london www.sitename.com/locations/rome www.sitename.com/locations/germany The content on these pages is all the same, except for an embedded google map that shows the location of the place. The problem is that google thinks all these pages are duplicated content. Should i set a canonical link on every single page saying that www.sitename.com/locations/london is the main page? I don't know if i can use canonical links because the page content isn't identical because of the embedded map. Help would be appreciated. Thanks.

          Intermediate & Advanced SEO | Sep 30, 2016, 8:16 AM | nchlondon
          0
        • NeatIT

          6 .htaccess Rewrites: Remove index.html, Remove .html, Force non-www, Force Trailing Slash

          i've to give some information about my website Environment 1. i have static webpage in the root. 2. Wordpress installed in sub-dictionary www.domain.com/blog/ 3. I have two .htaccess , one in the root and one in the wordpress
          folder. i want to www to non on all URLs Remove index.html from url Remove all .html extension / Re-direct 301 to url
          without .html extension Add trailing slash to the static webpages / Re-direct 301 from non-trailing slash Force trailing slash to the Wordpress Webpages / Re-direct 301 from non-trailing slash Some examples domain.tld/index.html >> domain.tld/ domain.tld/file.html >> domain.tld/file/ domain.tld/file.html/ >> domain.tld/file/ domain.tld/wordpress/post-name >> domain.tld/wordpress/post-name/ My code in ROOT htaccess is <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews RewriteEngine On
          RewriteBase / #removing trailing slash
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)/$ $1 [R=301,L] #www to non
          RewriteCond %{HTTP_HOST} ^www.(([a-z0-9_]+.)?domain.com)$ [NC]
          RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] #html
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^([^.]+)$ $1.html [NC,L] #index redirect
          RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
          RewriteRule ^index.html$ http://domain.com/ [R=301,L]
          RewriteCond %{THE_REQUEST} .html
          RewriteRule ^(.*).html$ /$1 [R=301,L]</ifmodule> The above code do 1. redirect www to non-www
          2. Remove trailing slash at the end (if exists)
          3. Remove index.html
          4. Remove all .html
          5. Redirect 301 to filename but doesn't add trailing slash at the end

          Intermediate & Advanced SEO | Jul 18, 2020, 4:14 AM | NeatIT
          0
        • RosemaryB

          Need a layman's definition/analogy of the difference between schema and structured data

          I'm currently writing a blog post about schema.  However I want to set the record straight that schema is not exactly the same as structured data, although both are often used interchangeably.  I understand this schema.org is a vocabulary of global identifiers for properties and things.   Structured data is what Google officially stated as "a standard way to annotate your content so machines can understand it..." Does anybody know of a good analogy to compare the two? Thanks!

          Intermediate & Advanced SEO | Apr 29, 2016, 4:03 PM | RosemaryB
          0
        • AMHC

          Removing duplicate content

          Due to URL changes and parameters on our ecommerce sites, we have a massive amount of duplicate pages indexed by google, sometimes up to 5 duplicate pages with different URLs. 1. We've instituted canonical tags site wide. 2. We are using the parameters function in Webmaster Tools. 3. We are using 301 redirects on all of the obsolete URLs 4. I have had many of the pages fetched so that Google can see and index the 301s and canonicals. 5. I created HTML sitemaps with the duplicate URLs, and had Google fetch and index the sitemap so that the dupes would get crawled and deindexed. None of these seems to be terribly effective. Google is indexing pages with parameters in spite of the parameter (clicksource) being called out in GWT. Pages with obsolete URLs are indexed in spite of them having 301 redirects. Google also appears to be ignoring many of our canonical tags as well, despite the pages being identical. Any ideas on how to clean up the mess?

          Intermediate & Advanced SEO | Jun 15, 2015, 3:08 PM | AMHC
          0
        • Whebb

          Structured Data + Meta Descriptions

          Hey All, Was just looking through some google pages on best practices for meta descriptions and came across this little tidbit. "Include clearly tagged facts in the description. The meta description doesn't just have to be in sentence format; it's also a great place to include structured data about the page. For example, news or blog postings can list the author, date of publication, or byline information. This can give potential visitors very relevant information that might not be displayed in the snippet otherwise. Similarly, product pages might have the key bits of information—price, age, manufacturer—scattered throughout a page. A good meta description can bring all this data together. For example, the following meta description provides detailed information about a book. " This is the first time I have seen suggested use of structured data in meta descriptions.  Does this totally replace a regular meta description or will it work in conjunction with the regular meta description? If I provide both structured data and text, will the SERP display text and the structured data the way it was previously displayed? Or will the 150 -160 character limit take precedence and just cut off all info after that?

          Intermediate & Advanced SEO | Dec 11, 2014, 11:00 PM | Whebb
          0
        • HiteshBharucha

          Duplicate content on subdomains.

          Hi Mozer's, I have a site www.xyz.com and also geo targeted sub domains www.uk.xyz.com, www.india.xyz.com and so on. All the sub domains have the content which is same as the content on the main domain that is www.xyz.com. So, I want to know how can i avoid content duplication. Many Thanks!

          Intermediate & Advanced SEO | Oct 12, 2016, 11:33 PM | HiteshBharucha
          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 | Dec 12, 2012, 1:22 AM | SorinaDascalu
          1

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

        Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

        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.