Category: News

Class attributes are about more than styling

When people talk about microformats, they often have the same bit of confusion about the class attribute; it is often referred to as a “css class.”

I’m not criticizing anyone here, I just want to point out that there’s some confusing regarding the class attribute.

In the HTML 4 spec (from which XHTML is derived), classes are defined to have these purposes:

The class attribute, on the other hand, assigns one or more class names to an element; the element may be said to belong to these classes. A class name may be shared by several element instances. The class attribute has several roles in HTML:

  • As a style sheet selector (when an author wishes to assign style information to a set of elements).
  • For general purpose processing by user agents.

There’s a couple of points I’d like to highlight here:

First, notice that classes are multivalued, meaning that elements can have one or more, space-sepearted values.

Next, notice that class values are not just for styling. While this is certainly the most common and well-known use for class values, they are open “for general purpose processing by user agents,” which could easily include non-intrusive scipting and semantics. In fact, classes actually work best when treated as a mechanism for applying semantics, rather than just hooks for styling (see Tantek’s Class for Meaning, not for show).

For a more thorough primer on the use of class values, and how they relate to document structure, see Tantek‘s post, A Touch of Class, which though its 3 years old, is just as relevant today.

Technorati Tags:

Wiki Attack

We had a bit of trouble with our wiki this weekend- on Saturday, we recieved a spam attack from 164 different IP addresses, which deleted pretty much every page on our wiki.

We’ve restored the wiki and locked it down a bit (must be logged in to edit, only admins can create new accounts), but there may still be some inconsistencies or weirdness.

If anyone is working to combat said spammers, email me and I’ll send you the IP list.

Technorati Tags:

WebZine FollowUp

Update: I forgot to point something out about my slides- when viewing them, if you hit the little Ø character (in the controls in the bottom-right corner) to view an outline version of the presentation, which includes some notes, which should hopefully help the slides make more sense to those who weren’t present.

ryan talking

What an awesome weekend.

WebZine 2005 (my first WebZine) was a wonderful collection of technologists, activists, journalists and various other -ists. This mixture made for a an very fertile arena for discussions- discussions of everything from legal issues to obscure HTML markup (that was me!).

ryan talking

I think my presentation went over well. You can see the slides on line here. I’ve tried to add notes on some of the slides, so that those of you who weren’t able to show up in person could still get the grasp of what I was trying to communicate. However, if you find anything that seems confusing, please feel free to ask (either in the comments here or in one of our other discussion channels).
ryan talking

There are actually a few questions that came up in the presentation (thanks Cal and Simon!) that I need to take some time to explain in written from (because they’re important and someone dense topics). I’ll hopefully get to them in the next few days.

(Thanks to Scott Beale for the photos on the right.)

Tags

Microformats Recycle

As Tantek and I were working the other night at Maxfields, we came up with an an analogy for descibing the microformats principles.

Just to review, here are the principles we use for developing microformats:

  • solve a specific problem
  • start as simple as possible
  • design for humans first, machines second
  • reuse building blocks from widely adopted standards
  • modularity / embeddability
  • enable and encourage decentralized and distributed development, content, services

We noticed that the principles tend to follow the .

Here’s a possible breakdown we came up with:

  • Reduce

    • solve a specific problem
    • start as simple as possible
  • Reuse

    • design for humans first, machines second
    • reuse building blocks from widely adopted standards
  • Recycle

    • modularity / embeddability
    • enable and encourage decentralized and distributed development, content, services

When reducing, we try to attack a specific problem, make it as simple as possible and simplify the format until it seems too simple.

When reusing, we try to model solutions on existing human behaviors and reuse existing widely deploy standards, names and approaches.

When we’re recycling, we try to salvage portions of other standards and make use of implicit schemas (ie, patterns which have yet to be formalized).

So, it seems that Microformats are really a conservation movement- conserving time, effort, and intellectual capital.

Tags