First step will use / use simple semantic law. In the case of (X) HTML5, you must create the appropriate outline using the section , article , aside and nav section content elements and use the header and footer to separate the metadata content from the main content; also think about line level semantics like time (publication date), dfn (definitions), abbr (abbreviations / abbreviations), etc. And use the meta - name and rel values ββthat are defined in the specification.
the second step would be to use metadata attribute values ββthat are not defined in the specification but are registered in certain places (therefore they are valid for use), for example, name keywords for meta elements and rel values ββfor a / area / link elements .
The third step is to increase the markup using semantic, machine-readable annotations. There are three general ways to do this :
- Microformats (using predefined
class and rel values) - RDFa (using attributes and URIs)
- Microdata (using attributes and URIs)
RDFa and Microdata are similar (both extensible and rather complex), while microformats are simpler (but not so expressive / extensible). I wrote a short answer on programmers about the differences and a more detailed answer about the differences between Microdata and RDFa .
In the case of RDFa or Microdata, your main task is to find dictionaries / ontologies that can describe / classify your content. Such dictionaries can be created by everyone (you can even create them yourself), but it is often recommended to use well-known / popular ones, for example, so that search engines can use your annotations (a popular example: Schema.org ).
In the case of Microformats, you will need to find a Microformat (on the wiki on microformats.org ) that suits your needs. If there is none for your case, you can offer a new Microformat (but it will take some time until it is accepted if at all).
Is HTML5 a smart choice if I want to be so picky about metadata, or should I use an XML document?
You can also use XHTML5 if you need / need XML support. If you "use" only the HTML code (X) defined in the specification and no additional XML schemas / dictionaries, it does not matter from a semantic point of view if you use HTML (5) or XHTML (5).
unor Oct 13 '12 at 1:30 2012-10-13 01:30
source share