Forum Moderators: open

Message Too Old, No Replies

ordered lists with letters

is the type attribute valid?

         

Purple Martin

5:36 am on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi

A normal ordered list shows numbered items like this:

1. Banana
2. Mango

I want an ordered list with letters, like this:

a. Banana
b. Mango

So I set the OL element's type attribute to "a", and it looks perfect.

BUT when I use the W3C Validator, it tells me that I'm not allowed to use the type attribute in the OL element. The reference book on my shelf says I can, so am I allowed to use it or not?

btw, I'm using the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Thanks!

tedster

6:50 am on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The type attribute is deprecated, and not alowed in strict HTML 4.
What's valid is a CSS style, list-style-attribute:lower-alpha;

Purple Martin

7:04 am on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks.

I'm converting a printed document to HTML (boring!). The client wants plain valid HTML with no CSS or formatting of any kind: just correct and appropriate use of tags (h1, h2, p, ol, li, etc etc etc).

So I'll just have to ask them to make a choice between using a deprecated attribute and changing the appearance of the document.

tedster

7:31 am on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could also validate to the transitional doctype rather than the strict one.

BlobFisk

8:48 am on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




The client wants plain valid HTML with no CSS or formatting of any kind: just correct and appropriate use of tags (h1, h2, p, ol, li, etc etc etc).

That's seems like quite a misguided request. Using CSS helps to emphasise valid html, and keep it plain by seperating all styling from the html page.

You use the correct tags, but make typographical changes in your stylesheet...

sitebasics

2:18 pm on Jul 8, 2003 (gmt 0)

10+ Year Member



you may want to ask them why they don't want CSS -- they may think it's more complicated than it is

if you explain the situation, it seems to me that they might come around -- separating out display from content will give them greater flexibility, on down the line, if they decide to repurpose their content

Purple Martin

10:25 pm on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got no idea why the client wants just HTML and no CSS - I have to go through our account manager (who is rarely in the office), I have no direct contact with the client myself.

I'm guessing that they want plain HTML so that they can add a stylesheet themselves later, they just don't want to do the conversion monkey-work themselves. With that in mind, I'll leave it as a numbered ordered list, and let them worry about applying a stlye to it.

I agree with what you guys are saying, but I don't have the freedom to do what I want on this one.

Mohamed_E

10:33 pm on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think that tedster's suggestion (msg #4) was the best one.

There is a transitional DTD for an excellent reason: Many sites do not wish, at this stage, to meet all the restrictions of the strict DTD.

Rather than dump the alpha list, use the doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">