The Dublin core spec is long, varied and complex. There are various tools that can be used to automatically generate appropriate metadata for your pages, but let’s assume you are creating them from scratch. Remember, you only need to worry about Dublin Core for XML-based content, such as XHTML and SVG; Dublin Core is not used in HTML5.
Dublin Core is written on a web page as descriptive meta tags, which share the same syntax:
<meta name="x" content="y" />
Dublin Core meta tag name
attribute values always start with DC
. However our first two lines will not be meta tags, but links, written in the head
section of our document, so that the browser and search engine can understand what follows if they do not already:
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
We will come across the link
tag again when we get to stylesheets. It is a way of using, or addressing, an external resource without physically creating a hyperlink to it. In this case, we are saying “If you (the browser, the search engine spider) don’t understand what follows, here’s the place to look up definitions that we are going to use to describe our content.”
The next three lines are DC meta tags, but remain unchanged in most cases:
<meta name="DC.language" scheme="DCTERMS.RFC1766" content="en" />
<meta name="DC.type" scheme="DCTERMS.DCMIType" content="text" />
<meta name="DC.format" content="text/html" />
These three lines basically say that our DC meta tag content is going to be in English text, as HTML. If you decide to write meta tags in a different language, change the two-letter extension to the first line to the appropriate language code (jp
for Japanese, for instance).
Finally, the meta tags that change in terms of their content. On the left, the name attribute value. On the right, what they should be set to.
Name | Description |
---|---|
DC.title | An expansion of the title of the document, typically longer and more informative. |
DC.date | Typically the creation date of the document, article, or resource, in the format yyyy-mm-dd. |
DC.creator | The creator of the document, article, or resource: typically, you. |
DC.publisher | The publisher of the content: typically the owning company (your client, for example). |
DC.contributor | A person, organization or service that contributed content to the document: a graphic designer, photographer, etc. |
DC.description | A short description of the document. It should be many things, but is usually a summarizing paragraph. |
DC.subject | A series of keywords, separated by commas. Typically no more than a dozen terms. |
Not all of these meta tags will be appropriate to every document, not will they be unique to every page on a site, although some, such as description
, subject
, and date
, should be attempted to be made so. For example, look at the source code for this page (CTRL-U, if you are using Firefox) and find the following line as an example:
<meta name="DC.creator" content="Dudley Storey">
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.