Friday, August 8, 2008

Authoring Web-Standards Pages: Like Setting Type in the Days of Gutenberg...

I've just spent the last few days working to build a set of Web pages which are authored to W3C standards (HTML 4.01 and CSS 2.1) They're now up on my website:

I've done some HTML authoring before, of course. But I always stayed away from anything but the simplest hand-coding. When I wanted to do something more complex (typographically speaking), I'd fire up a publishing tool, which would let me do things in a visual way and then translate what I'd done into code.

This time - at least at first - I didn't really care about the code itself. I was creating the pages in order to show off how Embedded OpenType (EOT) font embedding could be used to really enhance readability on the Web, by allowing Web designers to use high-quality commercial fonts on their pages, even though readers would not have those fonts installed.

It worked like a charm - at least as far as my goals of showing off the technology were concerned. I even apologized for the code when I posted the pages, and explained that they were merely a vehicle to show EOT actually working.

I wanted to post the pages quickly, to coincide with an announcement by font vendor Ascender Corporation that it was supporting Embedded OpenType (EOT) and launching a new website:

I'd have liked to have posted a Web-standards set of pages, too, but there just wasn't time. My colleague Chris Wilson tried to warn me. He even coded up the first page. But we couldn't get them done in time for the announcement, so I decided to go with what I had.

Reactions were wildly different. One or two people were really helpful - one offered to give up some of his time to convert the pages to cleaner Standards-compatible code. But some were downright rude. Don't they get it? If you disagree with someone, but you're civil about it, there's a good chance they'll listen to your argument.

Anyway, I'd already decided that I needed a set of identical Web-standards pages up there. While the offer to make them for me was very generous, it wouldn't do much to improve my personal level of understanding. So I thought it was time to get my hands dirty. I bought a pile of HTML and CSS books, then set about deconstructing Chris's page until I'd figured out how it worked. (If you want to learn how to paint, the best way is to study the work of a master...)

You can't use any really visual tool to do this work - they all end up inserting chunks of their own code, which is inefficient and impossible to understand.

Chris recommended I use Notepad, the basic text editor that comes with Windows. I also tried FrontPage, which worked fine as long as you stuck to the HTML view. I found life a lot easier with line numbers, so Chris told me to try Notepad++, and that's what I ended up using.

It's a good tool, and it's available free on:

Chris's other suggestion was to use Visual Studio, but that's way too heavy-duty for me - I am only an egg (from Robert Heinlein: Stranger in a Strange Land - See BOOKS I RECOMMEND).

My first page was a struggle, as you'd expect. But it was a great feeling when I finally got it to do what I wanted. It was even better when the W3Cs HTML validator service passed it (after I'd tidied up - it caught a couple of orphaned opening and closing tags first time around).

After that, my coding for each of the subsequent pages got steadily quicker.

I think Web standards are great. I've been a big supporter inside Microsoft. They still need to be evolved to support really great typography, because the Web is without doubt the publishing medium that will replace paper, and should be capable of doing anything you can do with paper (especially as screens get better).

My experience with authoring standards-compatible pages by hand - and the fact that there isn't any other acceptable way - really got me thinking.

We're back in the days of Gutenberg. In those days, all text had to be set by hand. It was a job for the real expert - not something any regular person could ever do. One of the world's great type designers, Herman Zapf, told a conference a few years ago that no-one has ever yet succeeded, despite all the technology developed since, in setting type as well as Gutenberg.

The key to Gutenberg's setting was that he used many more ligatures than are in common use today. A ligature (from the Latin root meaning to bind) is a special character which creates a new composite binding together two or more letters in order to make them fit better together. The most common examples are ff, fi, ffl, ffi, etc.

Most typefaces today have only a handful of ligatures. But Gutenberg cast many additional ones which ensured a tight and aesthetically pleasing fit of groups of two, three, four or more letters.

We see character sets in typefaces being extended all the time to support more languages. OpenType has given us the ability to create many more ligatures. But we're not yet using that capability to its full potential.

Hand-coding standards-compatible Web pages is just like setting type by hand. If I want a true apostrophe, for instance, I have to type " ’ ", or paste it in. True double or single quotes, em-dashes - they all have to be hand-coded.

How sick is that?

Hand-setting of type was a huge bottleneck in the printing process. It took about 400 years (until Victorian times) before machines like the Linotype and Monotype typecasters were able to take over most of the load.

Of course, access to machines like that was pretty much limited to professional publishing concerns.

The typewriter made it possible for almost anyone to put print on paper - pretty ugly, limited, monospaced print, it's true, but it was great leap forward.

Since the advent of the personal computer in the 1970s we've seen steady progress in the quality of printed material ordinary non-experts can produce. Dot-matrix and daisy-wheel printers have been replaced by laser and inkjet printers. Regular word-processing software like Microsoft Word can turn out very professional documents. The desktop publishing revolution of the 1980s brought software which can do just about anything you want. And you don't have to be an expert to use any of these - templates and default settings will give you professional results.

And here we are with the Web. It's the most important publishing medium in human history. Because for the first time it democratizes both the production AND distribution of high-quality content. And you can read it on a screen, keep it up to date, re-purpose it, etc.

But it's clear to me that we're still missing a huge piece of technology: an authoring tool which can be used by anyone without expert knowledge( i.e. the ability to hand-code) which produces standards-compatible, professional-quality Web pages.

That's the Desktop Publishing revolution of the 21st Century, and it's still waiting to happen..