{"id":1700,"date":"2009-06-18T23:23:08","date_gmt":"2009-06-18T21:23:08","guid":{"rendered":"http:\/\/notizblog.org\/?p=1700"},"modified":"2023-03-01T16:41:32","modified_gmt":"2023-03-01T15:41:32","slug":"microdata-semantisches-html5","status":"publish","type":"post","link":"https:\/\/notiz.blog\/2009\/06\/18\/microdata-semantisches-html5\/","title":{"rendered":"Microdata &#8211; Semantisches HTML5"},"content":{"rendered":"\n<p>Der Inhalt wure an die <a href=\"https:\/\/notiz.blog\/2009\/10\/10\/microdata-update-und-usability-studie\/\">neusten \u00c4nderungen der Microdata-Spezifikation<\/a> angepasst. Letztes Update 30.01.2010.\n<\/p>\n\n\n\n<p>In dem Punkt, dass HTML semantischer werden muss, ist sich die Web-Welt einig, nur das &#8222;Wie&#8220; ist noch nicht ganz klar. Aus <a href=\"http:\/\/lists.whatwg.org\/htdig.cgi\/whatwg-whatwg.org\/2009-May\/019602.html\">verschiedenen Gr\u00fcnden<\/a> (die alle sehr, sehr technisch sind) ist die <abbr title=\"Web Hypertext Application Technology Working Group\"><a href=\"https:\/\/whatwg.org\/\">WHATWG<\/a><\/abbr>-Community bzw. <a href=\"https:\/\/ln.hixie.ch\/\">Ian Hickson<\/a> im speziellen, nicht sehr begeistert von dem bisherigen De-facto-Standard <a href=\"https:\/\/en.wikipedia.org\/wiki\/RDFa\"><abbr title=\"Resource Description Framework - in - attributes\">RDFa<\/abbr><\/a> und hat deshalb vor ein paar Wochen <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/microdata.html\">Microdata<\/a> als eine m\u00f6gliche Alternative vorgestellt.<\/p>\n\n\n\n<p>Microdata-Objekte bestehen eigentlich <em>nur<\/em> aus einer Vielzahl von Key\/Value-Paaren. Ein <em>Object<\/em> wird durch einen umschlie\u00dfenden HTML-Tag mit einem <code>itemscope<\/code>-Attribut gekennzeichnet und hat mehrere <em>Properties<\/em> ausgezeichnet durch <code>itemprop<\/code>-Attribute.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">itemscope<\/span>&gt;<\/span>\n <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Mein Name ist <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"name\"<\/span>&gt;<\/span>Matthias<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code-Sprache:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Microdata ist f\u00fcr mich die gelungene Weiterentwicklung der <a href=\"http:\/\/microformats.org\/\">Microformats-Idee<\/a> unter Ber\u00fccksichtigung von RDFa und prinzipiell lassen sich auch beide Standards mit Microdata umsetzen. Wie generell von HTML5 gewohnt, kann man auch Microdata auf viele verschiedene Weisen benutzen ohne den Standard zu verletzen.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Microdata im Microformats-Stil<\/h4>\n\n\n\n<p>Um z.B. eine <a href=\"http:\/\/microformats.org\/wiki\/hcard\">hCard<\/a> mit Microdata abzubilden muss man eigentlich nur die bisher verwendeten <code>class<\/code> durch <code>itemprop<\/code>-Attribute zu ersetzen und mit <code>itemtype<\/code> das Format festlegen.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">itemscope<\/span> <span class=\"hljs-attr\">itemtype<\/span>=<span class=\"hljs-string\">\"http:\/\/microformats.org\/profile\/hcard\"<\/span>&gt;<\/span>\n <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"fn\"<\/span>&gt;<\/span>Matthias Pfefferle<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"photo\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"avatar.png\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"Avatar\"<\/span> \/&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code-Sprache:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>HTML5 und Microdata bieten au\u00dferdem eine ganze Reihe weiterer Tags und Attribute die alle bisherigen Microformats-Probleme beheben sollten. Aber darauf werde ich in einem extra Artikel noch detaillierter darauf eingehen.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Microdata im RDFa-Stil<\/h4>\n\n\n\n<p><code>item<\/code> und <code>itemprop<\/code> k\u00f6nnen aber auch durch URIs (\u00e4hnlich wie RDFa) ausgezeichnet werden und w\u00fcrden sich dadurch relativ leicht (durch z.B. <abbr title=\"Gleaning Resource Descriptions from Dialects of Languages\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/GRDDL\">GRDDL<\/a><\/abbr>) in klassisches <abbr title=\"Resource Description Framework\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Resource_Description_Framework\">RDF<\/a><\/abbr> konvertieren lassen.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">itemscope<\/span> <span class=\"hljs-attr\">itemtype<\/span>=<span class=\"hljs-string\">\"http:\/\/www.w3.org\/2001\/vcard-rdf\/3.0#\"<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"http:\/\/www.w3.org\/2001\/vcard-rdf\/3.0#fn\"<\/span>&gt;<\/span>\n    Matthias Pfefferle\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"http:\/\/www.w3.org\/2001\/vcard-rdf\/3.0#photo\"<\/span>\n       <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"avatar.png\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"Avatar\"<\/span> \/&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code-Sprache:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h4 class=\"wp-block-heading\">Fazit<\/h4>\n\n\n\n<p>Trotz <a href=\"https:\/\/notiz.blog\/2009\/05\/16\/html5-wird-kein-rdfa-unterstuetzen\/\">anf\u00e4nglicher Skepsis<\/a> bin ich immer begeisterter von dem neuen HTML5 Draft! Microdata f\u00fchlt sich einfach viel mehr nacht HTML an&#8230; <\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">itemscope<\/span> <span class=\"hljs-attr\">itemtype<\/span>=<span class=\"hljs-string\">\"http:\/\/microformats.org\/profile\/hcard\"<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"url\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/notiz.blog\"<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">itemprop<\/span>=<span class=\"hljs-string\">\"fn\"<\/span>&gt;<\/span>Matthias Pfefferle<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code-Sprache:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>&#8230;als RDFa.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">xmlns:foaf<\/span>=<span class=\"hljs-string\">\"http:\/\/xmlns.com\/foaf\/0.1\/\"<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">typeof<\/span>=<span class=\"hljs-string\">\"foaf:Person\"<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">property<\/span>=<span class=\"hljs-string\">\"foaf:name\"<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\">\"foaf:homepage\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/notiz.blog\"<\/span>&gt;<\/span>\n      Matthias\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code-Sprache:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Trotzdem hoffe ich, dass man sich doch noch irgendwie einigen kann und sich vielleicht in der Mitte trifft. Zwei neue HTML-Spezifikationen (XHTML2 &amp; (X)HTML5) sind schon verwirrend genug, da brauchen wir nicht auch noch zwei unterschiedliche <em>Semantik-HTML<\/em>-Standards<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Der Inhalt wure an die neusten \u00c4nderungen der Microdata-Spezifikation angepasst. Letztes Update 30.01.2010. In dem Punkt, dass HTML semantischer werden muss, ist sich die Web-Welt einig, nur das &#8222;Wie&#8220; ist noch nicht ganz klar. Aus verschiedenen Gr\u00fcnden (die alle sehr, sehr technisch sind) ist die WHATWG-Community bzw. Ian Hickson im speziellen, nicht sehr begeistert von [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[2],"tags":[5171,700,815,164,183,649,527,536],"class_list":{"0":"post-1700","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-web","7":"tag-fediblog","8":"tag-html5","9":"tag-microdata","10":"tag-microformats","11":"tag-mikroformate","12":"tag-posh","13":"tag-rdfa","14":"tag-semantic-html","15":"h-entry","16":"hentry"},"_links":{"self":[{"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/posts\/1700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/comments?post=1700"}],"version-history":[{"count":5,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/posts\/1700\/revisions"}],"predecessor-version":[{"id":22520,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/posts\/1700\/revisions\/22520"}],"wp:attachment":[{"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/media?parent=1700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/categories?post=1700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notiz.blog\/wp-api\/wp\/v2\/tags?post=1700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}