Should HTML be included in the structured data (schema) markup for the main body content?
-
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!
-
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/ -
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
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.
Related Questions
-
Content suggestions from MOZ
Hello, I checked moz content suggestions and for one of my keywords “Burgundy bike tours”. It gives me expressions such as “Burgundy France” and “Burgundy wine”. My question is whether I should include the exact expression “Burgundy wine” in a sentence or if include burgundy somewhere in my text and wine somewhere else if it is fine ? PS : What is the real difference between marketmuse and moz ? and why do they sometimes give different suggestions ?
Intermediate & Advanced SEO | | seoanalytics0 -
Would you consider this thin content?
Just wondering what the community thinks about the following URLS and whether they are essentially thin content that should be handled through a canonical, noindex or a parameter filtering system: https://www.adversetdisplay.co.uk/products/3x1-popup-exhibition-stand https://www.adversetdisplay.co.uk/products/3x2-popup-exhibition-stand https://www.adversetdisplay.co.uk/products/3x3-popup-exhibition-stand https://www.adversetdisplay.co.uk/products/3x4-popup-exhibition-stand https://www.adversetdisplay.co.uk/products/3x5-popup-exhibition-stand
Intermediate & Advanced SEO | | ColinDocherty0 -
Do Structured Data Errors Hurt Your Rankings
Hi, I noticed we had a 161 structured data erros. Almost all of them said "Update missing." I included screenshorts. Are these hurting me? If so, what can I do to fix them? Thanks, Ruben UfzeAFi YjLhimj
Intermediate & Advanced SEO | | KempRugeLawGroup0 -
Tumbnail in schema.org videoobjet
I have some problems understand hay should we do the url on your image page to replace tumbnail.jpg Ejemple. <spanitemprop="name">Jane Doe</spanitemprop="name"> <imgsrc="janedoe.jpg"itemprop="image"></imgsrc="janedoe.jpg"itemprop="image"> Adapting to my site Dario Vieira Pereira
Intermediate & Advanced SEO | | maestrosonrisas
This seems to be correct and it works But my problem is when i want to do a videoobjet I can not make the tumbnail to appear on the video to show: ejemple: Vídeo: Instalaciones clínica dental Barcelona Propdental Video de las instalaciones de la nueva clínica dental Barcelona de Propdental. Tour virtual por las instalaciones del dentista. Can anyone helpme on what am i doing wrong because i cannot understand what is missing on my videoobjet schema with google ejemples0 -
Duplicate Page Content - Shopify
Moz reports that there are 1,600+ pages on my site (Sportiqe.com) that qualify as Duplicate Page Content. The website sells licensed apparel, causing shirts to go into multiple categories (ie - LA Lakers shirts would be categorized in three areas: Men's Shirts, LA Lakers Shirts and NBA Shirts)It looks like "tags" are the primary cause behind the duplicate content issues: // Collection Tags_Example: : http://www.sportiqe.com/collections/la-clippers-shirts (Preferred URL): http://www.sportiqe.com/collections/la-clippers-shirts/la-clippers (URL w/ tag): http://sportiqe.com/collections/la-clippers-shirts/la-clippers (URL w/ tag, w/o the www.): http://sportiqe.com/collections/all-products/clippers (Different collection, w/ tag and same content)// Blog Tags_Example: : http://www.sportiqe.com/blogs/sportiqe/7902801-dispatch-is-back: http://www.sportiqe.com/blogs/sportiqe/tagged/elias-fundWould it make sense to do 301 redirects for the collection tags and use the Parameter Tool in Webmaster Tools to exclude blog post tags from their crawl? Or, is there a possible solution with the rel=cannonical tag?Appreciate any insight from fellow Shopify users and the Moz community.
Intermediate & Advanced SEO | | farmiloe0 -
Encoding Apostrophes in HTML
One question I have recently been pondering is that the use of apostrophes in ALT attributes and anchor text seems to cause some erratic results from the 'Fetch as BingBot' tool... GWT doesn't color code the results so i only notice it with BingBot, although i can't necessarily tell that it causes any negative effects. My rankings on Bing are erratic though so who knows... Should I encode apostrophes as ' when i use them in html? Or will it not really matter?
Intermediate & Advanced SEO | | SEO-Pump.com0 -
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 | | HiteshBharucha0 -
Main Keyword penalized. And now?
Hello SEO comunity. In one of the sites that I work, our team won numerous keywords in the first searching results. Unfortunately, on june we lost the most important site keyword. It was a general Word, very disputed, that generated a lot of traffic to us. The problem: it droped from third to fifty position. I’d like your help to identify the possible punishments and than find the solutions. What could happened? Where do we start? Is there any checklist to verify the punishments? What do you suggest to me? PS: We always do a clean job, getting away form the blackhat techniques; We didn’t received any notification from Google; During two year, the keyword was in the first ten positions. Actually, I'm looking for an explanation for what happened to me, to get my top10 again. Thanks
Intermediate & Advanced SEO | | webg0