That Standards Guy



Search

About

That Standards Guy is the online persona of Karl Dawson, a web developer living and working in Ipswich, England.

I'm a member of the Guild of Accessible Web Designers and the Web Standards Group and team member at Accessites—an awards site to recognise accessible and usable websites.

I specialise as a front-end developer and worry about the minutae of semantic (X)HTML and CSS, accessibility, microformats, typographic rhythm and grid design. I also care about the user experience and remind myself constantly of visitor site goals when working with clients and their aims.

That Standards Guy is proudly powered by WordPress using my own “StrictlyTSG v3.0” theme. Site Policies.

Stay up to date via the RSS feed. What’s RSS?

Archive for March, 2006

From the Top: The Meta Element

The meta element provides web document authors the ability to provide information about the document rather than the content itself. In the sixth article in my series “From the Top”, I continue to explore what we may wish to include between the head tags. This article is not a discussion on Search Engine Optimisation (SEO) techniques although the guidelines offered may help (and ethically so) in that regard.

The Meta Element

Generally, specifying meta data includes declaring a property value and a content value. For example, in the head of this document you will find the following meta information:

<meta name="author" content="Karl Dawson" />

In the above example, the name attribute is identifying a property of “author” with the value of that property defined in the content attribute. Allowable attributes include:

  • name
  • content
  • lang
  • dir
  • scheme
  • http-equiv

Whereas the name attribute may be substituted with the http-equiv attribute, the content attribute is always present in a meta tag because its value is the meta data. Also note that the meta tag is self-closing with either /> or > for Extensible Hypertext Markup (XHTML) or Hypertext Markup Language (HTML) respectively.

The Name and Content Attributes - working as a pair

The name attribute identifies the property whose value is specified by the value of the following content attribute.

Popular property values include:

  • keywords
  • description
  • generator
  • author
  • copyright

A meta tag describing keywords, for example <meta name="keywords" content="keyword1, keyword2, etc"> is often included to provide search engines with keywords to find your website. However, due to the amount of abuse from keyword spamming many search engines ignore this meta tag and instead rely on weighting a page for relevancy to a search term based on the actual content of the page. Additionally, if you repeat a keyword too many times your site will be penalised and given a lower ranking. To cover your bases you might still want to include a list of keywords but don’t get too hung up on them. Choose 15 to 20 keywords from your title, content headings and opening paragraphs to assist, but not harm your search engine ranking.

Often accompanying a keyword meta tag, a description meta tag provides search engines and directories with a summary of the page. Write a short, unique 25 word description of no more than perhaps 160 to 180 characters (including whitespace). This blog utilises a WordPress plugin to take the first few sentences of the article — essentially the introduction, to automatically do this. If your content management system (CMS) or blog publishing system has a similar feature then you may wish to adopt a similar approach (or write one for a bespoke development of course).

An example from the home page of this blog:

<meta name="description" content="personal blog on web standards and accessibility by Karl Dawson" />

The generator meta tag is needless fluff as far as I’m concerned but for this blog I’ve left it in place — all it does is indicate what program was used to create the blog (WordPress). If anyone can provide any benefits of this to visitors or authors (other than idle curiosity) please leave a comment below.

Author and copyright meta tags are probably useful, especially for articles and tutorials written to blogs where your name doesn’t form part of the website’s name. Again, from this site an example would look like:

<meta name="author" content="Karl Dawson" />
<meta name="copyright" content="Copyright That Standards Guy - Theme and Mods Mike Cherim - http://green-beast.com/. All rights reserved." />

Where the content attribute’s value is a Universal Resource Identifier (URI) you may prefer to use a link tag instead of a meta tag:
<meta name="DC.identifier" content="http://www.ietf.org/rfc/rfc1866.txt"> becomes…
<link rel="DC.identifier" type="text/plain" href="http://www.ietf.org/rfc/rfc1866.txt">

The Lang and Dir Attributes — describing the meta data some more

At this point it is probably worthwhile to mention the lang and dir attributes. The lang attribute assists speech synthesizers to apply language-dependent pronunciation rules on the value of the content attribute. This would be useful, for example, if the primary language of your website was English but a page author had a French name. In this case you would modify the author meta tag as follows:

<meta name="author" lang="fr" content="Thierry Henry" />

For a fuller description of these attributes be sure to read an earlier article on content language.

The Scheme Attribute

Just like the lang and dir attributes, the scheme attribute assists user agents by providing context to correctly interpret meta data. Our American cousins for example write their dates different to us Brits (and everyone else too?) so “10-3-06″ may mean either 10 March 2006 or 3 October 2006. To eliminate any ambiguity you would set the value of the scheme attribute as “Day-Month-Year”. For example an article written on the aforementioned date could have the following meta tag:

<meta scheme="Day-Month-Year" name="date" content="10-3-06" />

The scheme attribute can also provide non-critical, helpful information to user agents by giving a contextual reference to a property value.
The World Wide Web Consortium (W3C) give the following example of an International Standard Book Number (ISBN) being applied to a web page about a book:

<meta scheme="ISBN" name="identifier" content="0-8230-2355-9" />

Values for the scheme attribute depend on the property name and the associated profile.
A popular meta data profile would be that of the Dublin Core Metadata Initiative (DCMI).

“The [DCMI] is an organization dedicated to promoting the widespread adoption of interoperable meta data standards and developing specialized meta data vocabularies for describing resources that enable more intelligent information discovery systems”.

The HTTP-EQUIV Attribute

The http-equiv attribute may be used in place of the name attribute to create HTTP header responses. Allowable values include Content-Type, Expires, Set-Cookie, Refresh or PICS-Label.

  • Content-Type — Authors may use a meta tag to define default information for a document such as the default scripting language, default style sheet language and the document character encoding — with the latter being the most popular of the three. Many argue that the information contained in a content-type meta tag such as <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> should be written directly into the HTTP header but when a page is viewed offline it may be beneficial to have this information available to the user agent.
  • Expires — An http-equiv of value expire indicates that a document will expire on the date set in the content attribute. When the date passes, the user agent should load a new copy from the server rather than use a copy from its cache.
  • Set-Cookie — This sets the name and value for a persistent cookie in the following format <meta http-equiv="Set-Cookie" content="value=n;expires=date; path=url"> where value is the name of the cookie, “n” is the value to be set into the cookie. If expires=date; is omitted then the cookie will be deleted when the browser closes (a session cookie).
  • Refresh — Never use refresh as this makes the page inaccessible to some users. Even if you only intend to deliver overall level A compliance this is important and easy to achieve. If it is necessary to automatically forward a visitor to a different page use a server-side redirect.

Platform for Internet Content Selection (PICS) labeling

This is an infrastructure that associates meta data with Internet content. Originally developed for parents and teachers to control what children could view on the Internet it also allows for other uses of labeling such as intellectual property rights management. With filtering and other ratings sites using this system it could be beneficial to include such meta data in future projects. Safe Surf and the Internet Content Rating Association (ICRA) are two such self-certifying rating systems with the latter recommended in the UK Cabinet Office’s web developer’s handbook. It should be noted that the ICRA moved away from the use of the PICS system in 2005 but ICRAplus does still recognise such labeling.

The recommended method of distributing the PICS label is to include it in the HTTP header but failing that you can either maintain a label bureau on your own web server (or use an external host such as Cyber Patrol) or use an http-equiv meta tag. An example label from this blog looks like:

<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.thatstandardsguy.co.uk" r (SS~~000 1))'>

Other meta tags

There are two other meta tags that you may wish to consider using also. The first is designed to stop the image toolbar controls in Internet Explorer from showing when you hover over an image. Essentially it provides a mechanism to expand an image to full size or to save the image without opening the context menu options. It can be easily argued that interfering with the user agent is the route to the dark side but some people will want to use it to maintain their designed look. The second tag prevents Microsoft products from auto-generating “smart tags” on your web pages. These tags would underline key words on your web pages much like a spell checker would and create a link to Microsoft approved (paid for) advertising. I don’t think Internet Explorer 6 shipped with this “feature” so if anyone can expand on this please leave a comment. Below is each tag:

<meta http-equiv="imagetoolbar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="true" />

Conclusion

Meta data is used to describe the document itself rather than the content within. Include well-written meta tags for keywords and description for search engines and their result pages and consider other meta tags, using profiles like Dublin Core that add useful information about the web page.

Next in “From the Top”

In the next article I will be looking at how to include links to other documents and files in the head section of your web pages.

Further Reading

The Complete “From the Top” Series

 

PAS 78: UK Accessibility Milestone

Yesterday, 8 March saw the launch of the Publicly Available Specification (PAS) 78 from the Disability Rights Commission (DRC) in collaboration with the British Standards Institute (BSI). This PAS outlines good practice in commissioning websites that are accessible to and usable by disabled people.

Initially written by Julie Howell from the Royal National Institute for the Blind (RNIB), contributions were made by the BBC, the UK Cabinet Office, IBM, the University Professionals Association and Tesco.com the PAS is more for people who commission websites rather than the developers coding it. Hopefully this will call out the charlatan web design firms who claim accessible site builds as the specification includes what a commissioner should look out for.

Tesco and Legal and General noted significant return on investment (ROI) as a happy side-effect. For Legal and General (quoted from Bruce Lawson’s report) the side-effects included:

  • A 30% increase in natural search-engine traffic
  • “significant improvement” in Google rankings “for all target keywords”
  • 75% reduction in time for page to load
  • Browser-compatibility (not a single complaint since)
  • Accessible to mobile devices
  • Time to manage content “reduced from average of five days to 0.5 days per job”
  • Savings of £200K annually on site maintenance
  • 95% increase in visitors getting a life insurance quote
  • 90% increase in Life insurance sales online
  • 100% return on investment in less than 12 months.

The specification also highlights:

  • The importance of real user testing, including disabled groups.
  • Not relying on automated testing tools — read my earlier article on the subject.
  • Building accessibility into the design rather than attempting to retrofit a solution.
  • The need for a comprehensive website accessibility policy.
  • The use of web and accessibility standards and the use of proprietary formats such as Flash and PDF (Portable Document Format) files.

It’s a shame that the “Publicly Available” PAS 78 document will set you back £30 because whereas this won’t bother commercial organisations it may dissuade small businesses from learning more and it will limit public discussion by business and developer communities. For those with the budget you can find the order details on the BSI website.

Discussion elsewhere:

Update:
PAS78 is now available free of charge from the Disability Rights Commission (DRC) website.

Blog Design Solutions Book Review

This book starts with the basics and explains just what a blog is, the associated terminology and other technologies that you can use to create a blog to be proud of. The second chapter talks about setting up a local test environment with PHP, mySQL and Apache for Windows and Mac users and finishes with setting up your blog database with phpMyAdmin. Now, if this level of technology use gives you the heeby-jeebies - then fear not. It is so well written, with plenty of screenshots you will finish chapter 2 with a big grin and a muttered “that wasn’t bad at all”. The few pages with screenshots on backing up your database was very welcomed by me - far too often in an online tutorial we hear “back up your database” with no explanation of how or provided with a link to another tutorial. Thank You.

Now, with the foundation in place, the bulk of the book looks at each of the major (self-hosted) blogging systems. If you are buying this book because you don’t have your own blog or want something more configurable than a hosted solution like blogger.com, then do take the time to read each of the following chapters to see which one captures your imagination (or wallet if ExpressionEngine catches the eye). With that freshly created local test environment you can download and install each type to see which system works best for you.

If you already have a blog using one of these systems the value of this book may be lessened for you because you may feel that the three other chapters are not applicable. That was my initial impression. But no, read those other chapters! Firstly, the well-written chapters may well sway you to switch technologies and secondly, without getting bogged down in the code samples too much, there are some nice little gems of information regarding Cascading Style Sheets (CSS), design and image usage buried not too deeply.

The book rounds off with a chapter on creating your own publishing system - a scary thought to be sure but with flow diagrams, screenshots, a logical approach and well-written text you’ll be out the other side of the project by the end of the day. The only prerequisite I would say is that you do need to be comfortable with markup and CSS already - this isn’t a book to teach you those skills, it’s introducing you to PHP and mySQL in a very hands-on, example driven style.

Not an “essential” (5 star) book for your bookshelf, but if you are about to take the plunge into the world of blogging or want to get more out your system this is an excellent book.

Buy now from Amazon.co.uk, Amazon.com, Amazon.ca, Amazon.de, Amazon.fr or Amazon.co.jp

Post categories

Archives

Popular articles

Elsewhere

I’m promoting

Patronage: It ain't just for the Medicis. The Joe Clark Micropatronage project