WTF is the Start-Attribute Deprecated?

Published Wednesday, December 05, 2007 in (X)HTML, Semantics, Web Standards

I make sure my markup is always 100% valid XHTML 1.0 strict. I hate it when my little Tidy-icon isn't green and happy but yellow, or even worse, red from use of invalid or deprecated elements or attributes.

I recently added pagination to most of my sub-content widgets which you may have noticed, but it doesn't make much sense that the first article in the list of top rated articles on page 2 has the number 1 in front of it. Here's where the start-attribute comes in.

The start-attribute allows you to specify at what number an ordered list should start. This is exactly what I need in this situation but for some fooked up reason the start-attribute is no longer valid in strict doctypes.

I decided to ignore the fact that it is not valid XHTML 1 strict and use it anyway. I only use it in the case where the list doesn't start at 1 (so you'll never see a start="1" in the code) which means the first page is still error-free. But should you navigate to page 2 of any sub-content widget with javascript disabled you will experience invalid (X)HTML. I say with javascript disabled, because if you have js enabled that content is fetched with ajax and inserted with js so your validator won't notice the invalidity of the code.

I've read that instead of the start-attribute you're meant to use CSS-counters. I've only played around with them once before and for the #top-rated-articles ol to be different from page to page I would have to add a class specifying which page the list is on. Why is that better than a real attribute that does exactly that? And what about user-agents that don't support CSS? Should they not get the same information? Of course they should.


Bookmark It

  • del.icio.us
  • Digg
  • Furl
  • Google
  • Technorati
  • Ma.gnolia
  • BlinkList
  • Blogmarks
  • Rojo
  • StumbleUpon

Comments

3 comments so far, why don't you post one too?

Coffinboy

Wednesday, December 05, 2007 | View all comments by Coffinboy

I noticed this some months ago and it really pissed me off. This attribute was really useful, and as you say neither JavaScript or CSS is a good way of fixing this.

Brent

Monday, March 17, 2008 | View all comments by Brent

I agree, there's no reason this attribute should be deprecated, it's very useful. Anyone know a way to emulate it's behavior?

brent @ mimoymima.com

Andreas

Monday, March 17, 2008 | View all comments by Andreas

It's possible with CSS and explained at W3.org, but I think the real question is; why should user-agents that don't support CSS not get the same information as those that do?

If you turn off CSS you should still know that, for example, you are viewing article 10 and not 2 (as it would've been without the start-attribute in my recent articles).

Also, to be able to start the counter at different numbers from page to page you would require a class in the <ol> so you don't even get rid of any unnecessary attributes.


Comments closed

Comments are closed



Post It

From June 02 to April 23

  1. Mogrify is what you're looking for if you want to convert multiple images to multiple other images in ImageMagick
  2. Tommorrow, finally, the inFamous demo will be friggin availble on PSN!! Suweeeeeeeeet
  3. Fuck canvas is cool, I've started playing around with old 3D-shit again :)

May 2012

S M T W T F S
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 29 30 31


Recent Comments

  1. quick quid on Bye, bye exscale!:
    jhtmpl...
  2. cheap viagra on Bye, bye exscale!:
    nsikku...
  3. payday loans on Bye, bye exscale!:
    ixrhvy...
  4. buy cialis on Bye, bye exscale!:
    lqlokhr...

Style Switcher

The style switcher allows you to change the look and feel of exscale.se.
Only CSS and JavaScript are changed. The XHTML stays the same.

For more information about the styles, check the styles page.


Categories


Random Quote

Men det är ju ost och salt i ett! - Henke - om möss passion för ostbågar


Random Images




Answer This!

Do you find the "scroll-pagination" annoying? (If you don't know what it is, scroll to the bottom of the first-page)


Blog Roll