Schema.org NewsArticle: invalid value for logo property

Your markup is valid HTML5+Microdata and you are using the Schema.org vocabulary appropriately. With “validator”, you probably refer to Google’s Structured Data Testing Tool. Note that errors shown in this tool don’t necessarily mean that your markup is wrong; they often mean that you won’t get a certain Google search result feature unless you provide … Read more

HTML5 microdata: span content?

Yes, this is wrong. Neither Microdata nor HTML5 define a content attribute for the span element. Several people wanted to use it, see for example the code in these questions: Hide Microdata property value in ‘content’ attribute? Categories for Product in schema.org? Is the “content” attribute valid for the <span> tag > if so is … Read more

Is there a microdata tag to designate whether a value is a number, string, or bool?

The Microdata specification only differs between these types of values, which get derived from the HTML5 markup: item (if an element has an itemprop and an itemscope attribute) absolute URL (if the itemprop is specified on an URL property element like a, video etc.) datetime (if the itemprop is specified on a time element) string, … Read more

Can Microdata be applied on any type of HTML element? [closed]

You can use every HTML5 element for Microdata … Microdata defines 5 new attributes for HTML5: itemid itemprop itemref itemscope itemtype Let’s see where they can be used. Section 5.2 says: Every HTML element may have an itemscope attribute specified. So every element can have itemscope. Further on it says: Elements with an itemscope attribute … Read more

Does Schema.org markup work if markup is dynamically built with JavaScript?

Google’s documentation only mentions that they can consume dynamically added structured data if the syntax JSON-LD is used: Also, Google can read JSON-LD data even when it is dynamically injected into the page’s contents, such as by Javascript code or embedded “widgets”. This does not necessarily mean that they can’t read it in case of … Read more

Using schema.org branchOf with itemref

About itemref: it has to be specified on elements with itemscope it is used to reference other properties (= itemprop in Microdata) So this means for you: move itemref to the Hotel move itemprop=”branchOf” to the Organization Minimal example: <div itemprop=”branchOf” itemscope itemtype=”http://schema.org/Organization” id=”schema-organization”> <h1 itemprop=”name”>The Hotel Chain</h1> </div> <div itemscope itemtype=”http://schema.org/Hotel” itemref=”schema-organization”> <h2 itemprop=”name”>Hotel … Read more

Microdata vs RDFa

Differences between Microdata and RDFa While there are many (technical, smaller) differences, here’s a selection of those I consider important (used my answer on Webmasters as a base). Specifications As W3C’s HTML WG found no volunteer to edit the Microdata specification, it is now merely a W3C Group Note (see history), which means that there … Read more