August 22, 2003

Separation of Content and Presentation

We hear this all the time from those who would instruct us in the proper use of mark-up languages: separation of content and presentation.

Now, I understand the argument, and I agree that in many cases separation of content and presentation is good. In many cases, I prefer separation of content and presentation, because then I can fiddle with the presentation without having to change a lot of tags.

On the other hand, I think that the campaign to rid the world of mixed content and presentation is a lot like the campaign to rid the world of goto statements. Sometimes the use of goto is the cleanest way to write a section of code. goto is not always evil.

The mixing of content and presentation is not always a bad thing either. Separation of content and presentation requires a structured document. Otherwise, how would the content be meaningfully interpreted and the presentation applied? But we often write documents that have no formal structure. Two good examples are email and weblogs.

Posted by Doug Sauder at August 22, 2003 08:43 AM