demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 3.8K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Dublin Core Metatags

seo / metatags

Estimated reading time: 2 minutes, 41 seconds

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.

Dublin Core Meta Tags
NameDescription
DC.titleAn expansion of the title of the document, typically longer and more informative.
DC.dateTypically the creation date of the document, article, or resource, in the format yyyy-mm-dd.
DC.creatorThe creator of the document, article, or resource: typically, you.
DC.publisherThe publisher of the content: typically the owning company (your client, for example).
DC.contributorA person, organization or service that contributed content to the document: a graphic designer, photographer, etc.
DC.descriptionA short description of the document. It should be many things, but is usually a summarizing paragraph.
DC.subjectA 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">
comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.