microdata

Schema.org - How can you define an object across multiple pages?

孤人 提交于 2019-11-27 08:48:29
问题 Using schema.org markup, if I define many items with the same name across multiple pages, but with different sets of properties defined on each page, is each item only relevant within the scope of the page it is defined on, or is there a way to tie all of them items together to create a single, complete definition? 回答1: Syntax: itemid Microdata defines an itemid attribute: […] to give a global identifier for the item, so that it can be related to other items on pages elsewhere on the Web. The

How is Value determined for an Anchor Tag with Microdata?

被刻印的时光 ゝ 提交于 2019-11-27 07:51:06
问题 How do Google and others determine the value of an itemprop on an Anchor tag? <a href="foo.html" itemprop="barprop">Name Of Link</a> In the example above, is the itemprop's value the href attribute, much like how the link tag is parsed? Or is the value the innerHTML , as a standard block element is parsed? I've searched quite a bit and cannot find the answer. I'm open to all answers, but I'd very much like a source for the answers given so I can further investigate. Thanks in advance! 回答1:

How do I have an itemprop nested in one itemscope actually be applied to a different itemscope?

非 Y 不嫁゛ 提交于 2019-11-27 07:24:05
问题 TL;DR --> I want an itemprop nested in one itemscope to actually be applied to a different itemscope. How do I do that? Here's a a gist of the code I have (I've removed classes and other extraneous elements on the page to focus on what's important): <!-- CODE I HAD --> <div itemscope itemtype="http://schema.org/Product"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">79</span> <h1 itemprop="name">Someproductsoandso</h1>

Microdata vs. the data attribute in modular HTML5

柔情痞子 提交于 2019-11-27 07:15:56
问题 I am developing in PHP and am using some html wrappers (styled divs) around dynamic/variable content. In other words, I'm using a standard template multiple times and filling it with different HTML, creating similar looking "modules". I also am using jQuery to dynamically update the content based on user interaction. Each module requires some extra information to tell jQuery how to process the user interaction. I have been waffling between using microdata or data attributes to accomplish this

Microdata markup with 'mainEntityOfPage' for Google Article Rich Snippet

Deadly 提交于 2019-11-27 06:18:26
问题 The Microdata example of Google’s Article Rich Snippet contains this meta element with Schema.org’s mainEntityOfPage property: <meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article"/> When checking it with the Nu Html Checker, I get this error: Element meta is missing required attribute content . Adding an empty content attribute seems to solve this error. Is it correct to do this? 回答1: The Nu Html Checker is correct, Google’s

How to implement Schema.org on HTTPS pages?

余生颓废 提交于 2019-11-27 02:53:14
问题 Is it correct to statically set up Microdata’s itemtype attribute with HTTP value ( http://schema.org/WebPage ) on HTTPS pages or do I need to use HTTPS value ( https://schema.org/WebPage ) on all pages? Since both HTTP and HTTPS versions of the site are available, can I set it up to //schema.org/WebPage or not? 回答1: tl;dr: Use http URIs. In this answer on Webmasters SE I explained why you should favor http over https Schema.org URIs: The http URIs seem to be canonical, as the actual

True custom attributes (e.g. Microdata) in React

会有一股神秘感。 提交于 2019-11-27 02:37:05
问题 The site I am developing makes use of Microdata (using schema.org). As we are shifting development over to use React to render our views I have hit a blocker where React will only render attributes in the HTML spec however Microdata specifies custom attributes such as itemscope . As I'm relatively new to React and haven't had chance to fully understand the core just yet, my question is what would be the best way to extend the functionality of react.js to allow for defined custom attributes, e

HTML5 microdata: span content?

穿精又带淫゛_ 提交于 2019-11-27 02:11:56
I have read the HTML5 specification , the microdata specification , and the WHATWG HTML5 (with microdata) specification . These are well written and easy to understand. But now I read the schema.org Book specification , and came across snippets like the following: <span itemprop="price" content="6.99">$6.99</span> <span itemprop="inLanguage" content="en">English-language</span> <span itemprop="name" content="Tolkien, J. R. R. (John Ronald Reuel)"> J. R. R. Tolkien</span> Apparently (compare with the JSON version), the values of these microdata properties are the values of the content

How to set a microdata image property, without letting the browser download the image?

左心房为你撑大大i 提交于 2019-11-27 02:06:53
I have a website on which images are displayed. The images which are displayed are resized and then cached by the web application. But the cache is volatile. For the microdata I want to link to non-volatile images. My current solution for this is <img src="cache/image-resized.jpg" /> <img src="static/image.jpg" itemprop="image" style="display:none;"/> This works. Google interprets the microdata correctly and the resized image is displayed. But the users browser also downloads the static image, which is a large image. So how do I set a microdata image property, without letting the browser

Microdata, RDFa or JSON-LD Appropriate or best usage?

送分小仙女□ 提交于 2019-11-27 00:03:03
问题 I have been wondering which of those formats is "best"? Schema.org, Microdata, and RDFa are bit of a pain to implement. They can break validation and require quite an effort to put into documents. JSON-LD is, at last for me, a way better to implement structured data. But does it work? What level of support is there for it (at least by Google)? 回答1: Schema.org is a vocabulary that can, like any other vocabulary, be used in many forms. The website http://schema.org/ has examples using Microdata