Why use Schema.org microdata to mark up web page elements?
I understand why and how to use Schema.org to add microdata to your site, this is not a question about that. The question is why Schema.org has support for certain things that can be marked up with simple HTML5. Among these are
Types
-
WebPage and WebSite
I can see why
WebPage
andWebSite
would be needed, for example, to reference the page/site of a certain organization in a link, but there's no need to mark up your own page with this—the<html>
tag does this. -
SiteNavigationElement
Why not just use
<nav>
? -
Table
Just use
<table>
.
properties
-
WebPage/mainContentOfPage
<main>
element -
WebPage/relatedLink
<link>
element inside<head>
Solution 1:
This answer is primarily about the WebPageElement
types (like SiteNavigationElement
).
For WebPage
, see my answer to the question Implicity of web page structure in Schema.org (tl;dr: it can be useful to provide WebPage
, even for the current page).
For WebSite
, similar reasons from the answer above apply. HTML doesn’t allow you to state something about the whole site (and, by the way, a Google rich result makes use of this type).
Schema.org is not restricted to HTML5.
Schema.org is a vocabulary which can be used with various syntaxes (like JSON-LD, Microdata, RDFa, Turtle, …), stand-alone or in various host languages (like HTML 4.01, XHTML 1.0/1.1, (X)HTML5, XML, SVG, …). So having other ways to specify that something is (or: is about; or: represents) a site-wide navigation, a table etc. is the exception rather than the rule.
But there can be reasons to use these types even in HTML5 documents, for example:
The HTML5 markup and the annotations from Microdata/RDFa are two "different worlds": a Microdata/RDFa parser is only interested in the annotations, and after successfully parsing a document, the underlying markup is of no relevance anymore (e.g., the information that something was specified in a
table
element is lost in the Microdata/RDFa layer).By using types like
WebPageElement
, you can specify metadata that is not possible to specify in plain HTML5. For example, theauthor
/license
/etc. of a table.You can use these types to specify data about something which does not exist on the current document, e.g., you could say on your personal website that you are the author of a table in Wikipedia.
That said, these are not typical use cases relevant for a broad range of authors. Unless you have a specific reason for using them, you might want to omit them. They are not useful for typical websites. Using them can even be problematic in some cases.
See also my Schema.org issue The purpose of WebPageElement and mainContentOfPage, where I suggested to deprecate WebPageElement
and the mainContentOfPage
property.
Solution 2:
Just use
<table>
.
You seem to be reading the title of the pages and no further. The <table>
tag doesn't have the dozens of special properties listed on that page like isFamilyFriendly
or license
or timeRequired
.
Schema.org microdata is intended to build a standard set of additional, semantic metadata that can be used by automated systems - search engine spiders, parser robots, etc. - to better understand the nature and features of the content.