Adding Rich Snippet across multiple divs

2

I'm making a page that displays data for a person. At the beginning there is the name and a text, at the end there is the address, e-mail, etc.

I'm using Rich Snippet , but all the examples I find about it, show the entire structure in a single div that contains all the person's data, which is not my case.

My HTML looks something like this:

<html>

  <row> 
    ...
    nome da pessoal
  </row>

  <row>
    ...
  </row>

  <row>
    ...
  </row>

  <row>
    ...
  </row>

  <row>
    endereço, telefone, etc.
  </row>

</html>

I will not put it technically as it would be, because the question has to do with the architecture of Rich Snippet and not about the technical part of how it applies.

    <html>

      <div itemscope itemtype="http://schema.org/Person">
        <row> 
          ...
          <div itemprop="name"> nome da pessoal </div>
        </row>
      </div>

      <row>
        ...
      </row>

      <row>
        ...
      </row>

      <row>
        ...
      </row>

      <div itemscope itemtype="http://schema.org/Person">
        <row>
          <div itemprop="telephone"> telefone </div>
          <div itemprop="email"> [email protected] </div>
        </row>
      </div>

    </html>

Notice that within a single HTML I have two <div itemscope itemtype="http://schema.org/Person"> and that's the question:

Will they be interpreted as two different people or would I have to put everything inside a single DIV ?

If it's a single DIV , could I have it wrapping all HTML between the beginning and end of the person? (Since the entire page is contains information from only one staff)

    
asked by anonymous 21.11.2015 / 17:51

1 answer

3

Actually what you are trying to use is Microdata .

Rich Snippets is when you use Microdata through specific information in the HTML structure to make search engines "understand" the content of your site and improve its index in the results .

Answering your question, as far as I know, it is not possible to have your divs interpreted as a single person, since each is in a different context. It is necessary that all itemprop are in the same context as a single itemscope . Because of the way it is, there are two people. (Besides not smelling very good ...)

But what about the rest of the HTML that has nothing to do with the person's properties?

No problem! Only the% of% you indicated as divs of your itemprop will be interpreted as such.

I recommend you read this material to dig deeper into the subject about Microdata . As for Rich Snippets , do not forget to click on the link at the beginning of the reply and read carefully to make everything work properly.

Your code looks like this:

<html>

  <div itemscope itemtype="http://schema.org/Person">
    <row> 
      ...
      <div itemprop="name"> nome da pessoa </div>
    </row>

    <row>
      ...
    </row>

    <row>
      ...
    </row>

    <row>
      ...
    </row>

    <row>
      <div itemprop="telephone"> telefone </div>
      <div itemprop="email"> [email protected] </div>
    </row>
  </div>

</html>
    
22.11.2015 / 07:09