How to implement Schema.org properties in meta data?
up vote
1
down vote
favorite
Schema.org describes how to implement object properties using the meta
tag but the examples given are properties with primitive types such as Text
or Boolean
. Let's say I want to display a grid of images and each image is of type ImageObject
. The copyrightHolder
property itself is either an Organization
or Person
. If I want to include the organization legal name, how would I do that using only meta data?
With "regular" HTML elements I would write:
<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<span itemprop="legalName">ACME Inc.</span>
</span>
This obviously doesn't look right:
<meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc.">
</meta>
The only thing that comes into mind is using a set of hidden span
s or div
s.
html schema.org microdata
add a comment |
up vote
1
down vote
favorite
Schema.org describes how to implement object properties using the meta
tag but the examples given are properties with primitive types such as Text
or Boolean
. Let's say I want to display a grid of images and each image is of type ImageObject
. The copyrightHolder
property itself is either an Organization
or Person
. If I want to include the organization legal name, how would I do that using only meta data?
With "regular" HTML elements I would write:
<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<span itemprop="legalName">ACME Inc.</span>
</span>
This obviously doesn't look right:
<meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc.">
</meta>
The only thing that comes into mind is using a set of hidden span
s or div
s.
html schema.org microdata
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Schema.org describes how to implement object properties using the meta
tag but the examples given are properties with primitive types such as Text
or Boolean
. Let's say I want to display a grid of images and each image is of type ImageObject
. The copyrightHolder
property itself is either an Organization
or Person
. If I want to include the organization legal name, how would I do that using only meta data?
With "regular" HTML elements I would write:
<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<span itemprop="legalName">ACME Inc.</span>
</span>
This obviously doesn't look right:
<meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc.">
</meta>
The only thing that comes into mind is using a set of hidden span
s or div
s.
html schema.org microdata
Schema.org describes how to implement object properties using the meta
tag but the examples given are properties with primitive types such as Text
or Boolean
. Let's say I want to display a grid of images and each image is of type ImageObject
. The copyrightHolder
property itself is either an Organization
or Person
. If I want to include the organization legal name, how would I do that using only meta data?
With "regular" HTML elements I would write:
<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<span itemprop="legalName">ACME Inc.</span>
</span>
This obviously doesn't look right:
<meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc.">
</meta>
The only thing that comes into mind is using a set of hidden span
s or div
s.
html schema.org microdata
html schema.org microdata
edited 2 days ago
unor
64.8k17132234
64.8k17132234
asked 2 days ago
smares
386318
386318
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:
link
(withitemprop
) for values that are URLs
meta
(withitemprop
) for values that aren’t URLs
div
/span
(withitemscope
) for items
So your example could look like this:
<div itemscope itemtype="http://schema.org/ImageObject">
<div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc." />
</div>
</div>
If you want to provide the whole structured data in the head
element (where div
/span
aren’t allowed), see this answer. If you only want to provide a few properties in the head
element, you can make use of the itemref
attribute.
That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).
add a comment |
up vote
0
down vote
I was reading Getting Started again and noticed 2b that states
When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.
So I assume it would be fine to just use
<meta itemprop="copyrightHolder" content="ACME Inc.">
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:
link
(withitemprop
) for values that are URLs
meta
(withitemprop
) for values that aren’t URLs
div
/span
(withitemscope
) for items
So your example could look like this:
<div itemscope itemtype="http://schema.org/ImageObject">
<div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc." />
</div>
</div>
If you want to provide the whole structured data in the head
element (where div
/span
aren’t allowed), see this answer. If you only want to provide a few properties in the head
element, you can make use of the itemref
attribute.
That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).
add a comment |
up vote
1
down vote
accepted
Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:
link
(withitemprop
) for values that are URLs
meta
(withitemprop
) for values that aren’t URLs
div
/span
(withitemscope
) for items
So your example could look like this:
<div itemscope itemtype="http://schema.org/ImageObject">
<div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc." />
</div>
</div>
If you want to provide the whole structured data in the head
element (where div
/span
aren’t allowed), see this answer. If you only want to provide a few properties in the head
element, you can make use of the itemref
attribute.
That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:
link
(withitemprop
) for values that are URLs
meta
(withitemprop
) for values that aren’t URLs
div
/span
(withitemscope
) for items
So your example could look like this:
<div itemscope itemtype="http://schema.org/ImageObject">
<div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc." />
</div>
</div>
If you want to provide the whole structured data in the head
element (where div
/span
aren’t allowed), see this answer. If you only want to provide a few properties in the head
element, you can make use of the itemref
attribute.
That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).
Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:
link
(withitemprop
) for values that are URLs
meta
(withitemprop
) for values that aren’t URLs
div
/span
(withitemscope
) for items
So your example could look like this:
<div itemscope itemtype="http://schema.org/ImageObject">
<div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc." />
</div>
</div>
If you want to provide the whole structured data in the head
element (where div
/span
aren’t allowed), see this answer. If you only want to provide a few properties in the head
element, you can make use of the itemref
attribute.
That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).
answered 2 days ago
unor
64.8k17132234
64.8k17132234
add a comment |
add a comment |
up vote
0
down vote
I was reading Getting Started again and noticed 2b that states
When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.
So I assume it would be fine to just use
<meta itemprop="copyrightHolder" content="ACME Inc.">
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
add a comment |
up vote
0
down vote
I was reading Getting Started again and noticed 2b that states
When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.
So I assume it would be fine to just use
<meta itemprop="copyrightHolder" content="ACME Inc.">
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
add a comment |
up vote
0
down vote
up vote
0
down vote
I was reading Getting Started again and noticed 2b that states
When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.
So I assume it would be fine to just use
<meta itemprop="copyrightHolder" content="ACME Inc.">
I was reading Getting Started again and noticed 2b that states
When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.
So I assume it would be fine to just use
<meta itemprop="copyrightHolder" content="ACME Inc.">
answered 2 days ago
smares
386318
386318
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
add a comment |
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
1
1
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).
– unor
2 days ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410354%2fhow-to-implement-schema-org-properties-in-meta-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown