Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Separation of Style, Structure & Content


Marcia - 1:17 pm on Aug 15, 2008 (gmt 0)


How about looking at this, including naming conventions, from the point of view of context regardless of the aesthetics or location in the visible page or source HTML code.

If you've ever had to do maintenance on a site that has the CSS willy-nilly all over the stylesheet (like Dreamweaver puts it when you modify a style element), you can then know that context is king.

<div id=masthead"> is the top, visually. What else can it mean? It could include the logo, the shopping cart info (view cart/check out), byline and top navigation.

<div id="pagefooter"> is obviously something at the bottom of the page. Where else is a foot? It can include copyright, date of last update, sitewide navigation links, etc. And it can be different and differently named for homepage and information pages, section main pages or section detail pages - styled differently accordingly.

<div id="sidebar"> is on the side. What else could it mean? It can be the "side" section with navigation and whatever else, either on the right or left; take your choice and change it easily, without changing hard coded HTML on dozens, hundreds, thousands or millions of pages.

Where ever it is in the code, properly annotated and coded in the CSS, anyone can go in and make modifications. It matters not one lick whether the pages are sequential as related to the sequences in the stylesheet (which can have multiple types of organization), or using CSS-P, or where they are visually to the visitor.

It's all about context and maintainability.

Added:

As an addendum, does anyone want to comment on the maintainability of content? Content can be hard coded onto web pages or be accessed via a database. Just to nit-pick about terminology, does that have anything to do with style or structure (I think not), or does anyone think otherwise?

[edited by: Marcia at 1:29 pm (utc) on Aug. 15, 2008]


Thread source:: http://www.webmasterworld.com/css/3721842.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com