Cùran's life
A Debian Developer's observations

2nd March 2011 16:20 (GMT)
Embedding license information in a XHTML-valid way

When you want to offer creative work, or at least your blog posts, under a license which gives the receivers a lot of freedoms, you'll sooner or later come across the Creative Commons licenses. And after you've selected a license of your liking, you'll be presented with a little XHTML snippet. Nice. What's not so nice is, that you'll break the validity of your website as soon as you put that snippet somewhere on your homepage. What to do?

Easy. Ask the W3C for help (ok, don't call them, just use a search engine). Since Tim Berners-Lee is promoting the semantic web for some time now, there must be some conformant way to add the information, which hopefully is also supported by standard-compliant browsers. The answer is a W3C recommendation. The recommendation talks only about XHTML 1.1, but there's also a XHTML 1.0 DOCTYPE (If you don't care about IE, you can use the XHTML 1.1 variant, at least the last time I checked, IE failed miserable with XHTML 1.1. Admittedly, it has been a while since I looked this up.). Just put:



at the top of your document. Depending on what RDF namespaces you want to use (and how often), you can add more namespaces than the default one to your html tag. So a template for a "XHTML 1.0 + RDFa" document might look like:




  
    An XHTML 1.0 + RDFa standard template
    
  

  
     

Your HTML content here

[Website Title] by [Author's Name] is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License unless noted otherwise.

When you're finished, you can start adding licensing information (and other relations) to your website as this little blog is doing.

Permalink | creativecommons, licensing, meta, xhtml.

License: Creative Commons Attribution-ShareAlike 3.0 Unported License | Imprint (Impressum) | Privacy Policy (Datenschutzerklärung) | Compiled with Chronicle v4.6

Archives

Tags
Feed
Support my Debian work!
Validated