Monday 12 April 2010

Teaching an Old Dog New Tricks

I first built a website in the last millennium. The World Wide Web was still new and exciting, and I had no difficulty learning HTML (HyperText Mark-up Language) because I had spent most of the previous couple of decades coding text for typesetting financial and other complex text. The browser of choice was Netscape Navigator and Microsoft Explorer had not yet been introduced. Netscape's version 1.3 introduced the capability of using frames, whereby you can but text and pictures from different files in separate parts of the screen. You could thus, for example, put your navigation buttons in a narrow frame on the left of the screen and this would remain visible while you scrolled down a long piece of text on the right-hand side. Within a frame you would position pieces of text with the aid of tables, which could if necessary be nested within each other to produce the desired effect.

If, pace Harold Wilson, a week in politics is a long time, a decade on the Web is an eon. Web page design and its attendant coding has changed significantly. For a start, frames and tables are now deprecated by the WWWC (World Wide Web Consortium), for valid and lengthy reasons: in brief, don't use them any more.

Coding is now returning to its roots in the SGML (Standard Generalised Mark-up Language) protocols around in the Seventies and Eighties, in that a code such as <h1> described what a chunk of text is, such as a first-level heading, rather than what it should look like, such as 24 point Bodoni Bold. These stylistic instructions can now be – and should be – contained in a separate CSS (Cascading Style Sheets) file, which gives the typographical instructions for the entire site.

Up till now I have been building all my dozen or more sites in a way that suite me. For example, I would put the codes in upper case, <H1> rather than the recommended <h1>, because that is what I was used to when coding text for CompuGraphic typesetting terminals when I was running a business. Likewise, I didn't bother with putting the CSS variables in quotes, happily keying font: Bodoni MT; rather than font: "Bodoni MT";

All this must now change, for three reasons. Firstly, I am preparing to hand over the last of the Buckingham websites that I developed after moving here from Richmond to other people, enabling me to focus on my university course. Secondly, I want to build a new site which tells the story of how technology has changed the way biography gets written, as an adjunct to my university course. It therefore seems sensible that I bite the bullet and learn to code the new way with Cascading Style Sheets. Thirdly, I've just put myself forward as a candidate for the webmastership of the National Printing Heritage Trust: I am promoting my candidacy by saying that the revised site will use the latest approved methodology and will be easily maintainable when the time comes for me to pass on the baton to younger hands.

Wish me luck, as I grapple with my O'Reilly manuals!

No comments:

Post a Comment