Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is div itemtype? I have a review site what can be the value of itemtype for my site?

Tags:

html

microdata

If i use <div> tag itemprop="review" itemscope itemtype="http://mydomainname.com/Review" itemtype then do i need to create a page named review on my site?

like image 707
Vijay Kr Vishwakarma Avatar asked Sep 10 '12 04:09

Vijay Kr Vishwakarma


People also ask

What is Itemtype?

The global attribute itemtype specifies the URL of the vocabulary that will be used to define itemprop 's (item properties) in the data structure. itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active.

What's an example of the Itemtype attribute?

Item-type attributes are attributes that are applicable only to items of the same type. For example, collar size and sleeve size are attributes specific to shirts and waist and length attributes are specific to pants.

What is Itemprop used for?

The itemprop global attribute is used to add properties to an item. Every HTML element can have an itemprop attribute specified, and an itemprop consists of a name-value pair. Each name-value pair is called a property, and a group of one or more properties forms an item.

What is the purpose of microdata?

Microdata is part of the WHATWG HTML Standard and is used to nest metadata within existing content on web pages. Search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users.


1 Answers

I'd suggest you read this tutorial on HTML5 microdata. Here's an excerpt from that document about itemtype:

The itemscope attribute us used to indicate that the element it is placed on and it’s children represent a microdata item. The itemscope should be paired with an itemtype attribute that defines the microdata vocabulary in use.

<p itemscope itemtype="http://www.data-vocabulary.org/Organization/"> ...

Additional data ...

Microdata vocabularies can be nested and can be dependent on one another. For example, the organization microdata vocabulary also contains an address as a member. The itemtype url can point to anything. Think of it as just a unique character string that various programs have agreed that when they see that specific ID, they know how to parse and look for the itemprop tags in the sub-elements to extract the meaning needed from the document.

There are predefined itemtype values or you can create your own. They may be URLs, but do not have to be.

Here are some other references on the topic (there are many more in a Google search for "html5 microdata":

http://net.tutsplus.com/tutorials/html-css-techniques/html5-microdata-welcome-to-the-machine/

http://diveintohtml5.info/extensibility.html

http://www.tutorialspoint.com/html5/html5_microdata.htm

like image 70
jfriend00 Avatar answered Oct 12 '22 12:10

jfriend00