These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:11 pm Advanced search

Microdata does have something like @content and @resource?

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Microdata does have something like @content and @resource?

Postby celso » Sat May 15, 2010 11:17 pm

Hi!!!! I am master student of IME and my thesis is about semantic annotations and i have a question about HTML5 microdata:

Microdata does have something like a @content and @resource of RDFa?

Because for some cases can be necessary...

Thanks,
Celso
celso
<h6>
 
Posts: 4
Joined: Sat May 15, 2010 11:03 pm

Postby TabAtkins » Mon May 17, 2010 4:04 pm

Yes.

If you need to provide the content of a triple directly, rather than extracting it from the page as normal, you should put the @itemprop on a <meta> or a <link>.

That is, use <meta itemprop=foo content="My content here"> or <link itemprop=foo href="http://www.example.com">.
TabAtkins
<h6>
 
Posts: 3
Joined: Mon May 17, 2010 4:01 pm

Postby celso » Mon May 17, 2010 9:04 pm

TabAtkins wrote:Yes.


That is, use <meta itemprop=foo content="My content here"> or <link itemprop=foo href="http://www.example.com">.


Thanks !!! But... i can use this outside <head></head> ? It's valid?
celso
<h6>
 
Posts: 4
Joined: Sat May 15, 2010 11:03 pm

Postby philipj » Wed May 19, 2010 6:07 am

Yep, meta and link allow for this.

meta:
If the itemprop attribute is present: where metadata content is expected.
If the itemprop attribute is present: where phrasing content is expected.

link:
If the itemprop attribute is present: where phrasing content is expected.

In other words, you can use them inside body. I believe validator.nu already allows this, try it! Note that some legacy browsers move meta to head while parsing, so if you have scripts operating on this data you should be aware of this.
philipj
<h6>
 
Posts: 3
Joined: Mon May 11, 2009 11:52 am

Postby celso » Wed May 19, 2010 3:08 pm

Thanks Philip !!!
I will try a example and post here
And... i will test in http://foolip.org/microdatajs/live/ too :D
celso
<h6>
 
Posts: 4
Joined: Sat May 15, 2010 11:03 pm

Postby celso » Thu May 20, 2010 8:23 pm

Code: Select all

<section id="annotation" itemscope itemtype="http://microformats.org/profile/hcard">
<meta itemprop="name" content="Celso">
<meta itemprop="nickname" content="Celsinho">
<p itemprop="knows" itemscope itemtype="http://microformats.org/profile/hcard">
  <meta itemprop="name" content="Maria Claudia">
  <meta itemprop="nickname" content="Yoko">
</p>
<p itemprop="knows" itemscope itemtype="http://microformats.org/profile/hcard">
  <meta itemprop="name" content="Ana Maria Moura">
</p>
</section>



Try this: http://bit.ly/bFeCm3
celso
<h6>
 
Posts: 4
Joined: Sat May 15, 2010 11:03 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests