Forum Moderators: open
Since I decided not to use Schema.org code at this point, I didn't try to learn how to use it in detail.
Maybe someone can post the correct code for the simplest form of a stand-alone link with the proper attributes.
<a href="http://example.com/">anchor text</a> The point I wanted to make is that the Schema.org code doesn't add any new information in a lot of cases where it is being used, or at least that's how it appears to me..
itemprop="url" standing alone adds nothing.
within the context of an itemscope of an itemtype it is one piece of a data structure.
according to schema.org, a URL isn't a "thing" it's a data type used to describe a "thing".
using microdata to mark up a stand-alone link is similar to mentioning that something is "blue" without mentioning what "it" is.
your example is incomplete as there is no itemscope, so you are correct that including the typical Schema.org attributes doesn't add any new information without also specifying which attributes describe what.
It sounds like misuse. I would like to see those pages - would you mind Sticky Mailing me the links?
Maybe someone can post the correct code for the simplest form of a stand-alone link with the proper attributes.
<a href="http://example.com/">anchor text</a>
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a itemprop="url" href="URL1"><span itemprop="name">Anchor Text1</span></a></li>
<li><a itemprop="url" href="URL2"><span itemprop="name">Anchor Text2</span></a></li>
<li><a itemprop="url" href="URL3"><span itemprop="name">Anchor Text3</span></a></li>
.
.
.
</ul>
</nav>
<nav>
<ul>
<li><a href="URL1">Anchor Text1</a></li>
<li><a href="URL2">Anchor Text2</a></li>
<li><a href="URL3">Anchor Text3</a></li>
.
.
.
</ul>
</nav>
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a href="URL1">Anchor Text1</a></li>
<li><a href="URL2">Anchor Text2</a></li>
<li><a href="URL3">Anchor Text3</a></li>
</ul>
</nav>
<table itemscope="itemscope" itemtype="http://schema.org/Person">
<tr><td>Name</td><td itemprop="name">aristotle</td></tr>
<tr><td>Site</td><td><a itemprop="url" href="example.com">aristotle's personal site</a></td></tr>
</table>
<table itemscope="itemscope" itemtype="http://schema.org/Person">
<tr><td>Name</td><td itemprop="name">graeme</td></tr>
<tr><td>Site</td><td><a itemprop="url" href="example.net">graeme's blog</a></td></tr>
</table>
The itemprop=url is saying that the href on that element is the URL for the navigation, which is clearly not true.
would you guys say that Schema.org used with addresses adds more information or is it not necessary? Would the use of the <address> tag be enough?
<ul itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<li><a href="URL1">Anchor Text1</a></li>
<li><a href="URL2">Anchor Text2</a></li>
<li><a href="/sitemap.html">Site map</a></li>
</ul>
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a href="URL1">Anchor Text1</a></li>
<li><a href="URL2">Anchor Text2</a></li>
<li><a href="URL3">Anchor Text3</a></li>
</ul>
</nav>
graeme wrote:
The urls in your version of the Person tables are sites belonging to the Person
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a href="URL1">Anchor Text1</a></li>
<li><a href="URL2">Anchor Text2</a></li>
<li><a href="URL3">Anchor Text3</a></li>
</ul>
</nav>
URL of the item.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Page</title>
<style type="text/css">
p {font-family: Arial, Tahoma, "Sans Serif"; font-size: 120%; text-indent: 24px}
li {font-family: Arial, Tahoma, "Sans Serif"; font-size: 120%}
h3 {font-family: Arial, Tahoma; font-size: 140%; text-align: center; margin-top: 8px; margin-bottom: 8px}
a:link, a:visited {font-weight: bold}
body {max-width: 900px; margin-left: auto; margin-right: auto; background-color: #F5FFFA; color: #000000}
</style>
</head>
<body>
<br /><br />
<h3>Site Navigation Menu</h3>
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a itemprop="url" href="/page1.html"><span itemprop="name">Page1</span></a></li>
<li><a itemprop="url" href="/page2.html"><span itemprop="name">Page2</span></a></li>
<li><a itemprop="url" href="/page3.html"><span itemprop="name">Page3</span></a></li>
<li><a itemprop="url" href="/page4.html"><span itemprop="name">Page4</span></a></li>
</ul>
</nav>
<br /><br />
</body>
</html>
Extracted structured data
Item
type: http: //schema.org/sitenavigationelement
property:
url: Page1
name: Page1
url: Page2
name: Page2
url: Page3
name: Page3
url: Page4
name: Page4
Extracted structured data
No data detected. Learn more
I checked to make sure that it passes the W3C html and css validators
As a newly-proposed feature of HTML, the <main> element is not yet supported widely. You are strongly urged to add the "main" ARIA role to any <main> element
I'm still waiting for someone to explain why the Schema.org SiteNavigationElement needs to be used at all, since the html5 <nav> tag basically can serve the same function.
1) Ads a completely unnecessary layer to document. It often ends up being wrapped around the HTML you would otherwise need (e.g. <nav><ul><li> .....) instead of just (<ul><li>
[edited by: phranque at 10:03 pm (utc) on Jan 5, 2014]
[edit reason] tos#19 [/edit]