Thursday, August 7, 2014

Rich Snippets Tutorial for beginners

Good content is good for great SEO but content need to be understand by search engine, not just by people.search engines can't  understand Text based content , they just match it with search queries. But here is solution which make your content more readable not only for humans but also for search engines. The solution is 'Rich snippets' and here's we understand how to use it.

There are a few formats you can use for your rich snippets :

Microformats : the oldest and the simplest of the three.

RDFa : This one is based on W3C's RDF data model

Microdata : This is Ian Hickson's counter-proposal to RDFa. In spirit, it is an extensible version of microformats.

My recommendation would be to go with microdata and forget that the other two exist.all search engines prefer 'microdata'.

How to mark up your content using microdata

1 . itemscope and itemtype

Imagine you have a page about the movie Avatar, Your HTML code might look something like this:

code :
By adding itemscope, you are specifying that the HTML contained in the <div>...</div> block is about a particular item.

code :

You can specify the type of item using the itemtype attribute immediately after the itemscope.

code :

This specifies that the item contained in the div is in fact a Movie, as defined in the schema.org type hierarchy. Item types are provided as URLs, in this case http://schema.org/Movie.



2. itemprop

To provaide additional information such as actors, director, ratings we use the itemprop attribute

code :

Note : additional <span>...</span> tags added

3. Embedded items

In Some cases the value of an item property can itself be another item with its own set of properties. In our example director of the movie is an item of type Person and the Person has the properties name and birthDate. To specify that the value of a property is another item, we begin a new itemscope immediately after the corresponding itemprop.

code :

0 comments:

Post a Comment