Updated: 2002-03-13; 2:07:23 AM.
Michael Zajac’s Radio Weblog
        

2002-02-24 SUN


Separating content & presentation

Content and presentation get separated at different levels.

  1. In Manila, the body text of each article lives in a database. Its structure is implied by the text structure (High-ascii characters are automatically converted to Latin entities, and URLs are automagically expanded into links. two carriage returns will be expanded to a <p> tag) and by literal html markup (I type <em> myself). I’m starting to use XHTML in some projects, and maybe someday it will be raw XML.
  2. The structure of a page is defined in a template, which has literal markup, as well as executable macros in UserTalk. I’m not talking about the structure of my body copy, here. I’m talking about where the list of site links, where the logo goes and the little copyright statement at the bottom. This is where it’s still okay to use tables for gross layout instead of CSS. Maybe someday this part will get replaced by XSLT.
  3. Finally, there’s a style sheet for the site. This defines the flimsiest top level of presentation, which is so vital to achieving the look in graphical browsers. The fonts and colours and rules for the boxes (I no longer nest tables when I can help it).

Here’s three levels of structure, and almost everyone’s doing it. This is why you can argue “tables vs CSS” or “database vs html” or “font tags vs structural HTML” until you’re blue in the face. Because there are three or more things to look at, not just two. The argument I keep hearing is just too simple to sum up the problem at hand.   1:43:45 AM    


Dave raises the stakes

On the topic of CSS, Dave Winer writes:

Why fart around with the relatively complex job of converting all those old minds to do it the way you want them to. Hard job. Rolling a big rock up a big hill. But there's already so much support for various XML formats. Every Radio weblog, for example, is available both in HTML and in XML. Render it any way you want. Let's party down. Totally Semantic Web type stuff. If you've been waiting for nirvana, wait no more.

Look at what Matt Bridges and Mark Pilgrim have written.

There’s lots of good stuff to think about there. I’ve got to agree with Mark, though.

I’ve cited Dave’s Scalable Content column before. In ’97 Dave set up a rendering of Scripting News aimed at Netscape 2 users. That’s gone now, but you can view an Avantgo version.

But by employing CSS on top of standards-compliant HTML, I could add my own rendering for device X. The key is not the CSS, it’s the HTML.

It’s the HTML!

I don’t care if you use CSS or not. I don’t care (much) if you use tables and invisible pixel images for layout. But for goodness’ sake, don’t define your body copy’s paragraphs using <br><br>. Don’t put the whole body into a <blockquote> just to give it right and left margins. Remember <h1> through <h6>?

It’s HTML. Remember when your first HTML lesson? Jeez.

  1:17:42 AM    


 
February 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    
Jan   Mar


Click here to visit the Radio UserLand website.

Click to see the XML version of this web page.


© Copyright 2002 Michael Zajac.
Last update: 2002-03-13; 2:07:23 AM.