473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how do I emulate the start attribute of ol tag deprecated in XHTML

how do I emulate the start attribute of ol tag deprecated in
XHTML (strict)?

Is it easily possible or only possible with great difficulty?

Jul 20 '05 #1
3 2675
Zenobia wrote:
how do I emulate the start attribute of ol tag deprecated in
XHTML (strict)?


In theory, you use CSS counters.

In practise you use XHTML 1.0 Transitional, or not split lists into multiple
parts.

There has been some debate about this as regards XHTML 2 on the www-html
mailing list lately. One suggestion was an attribute that would link lists
together.

e.g.

<ol id="myList">
<li>Foo</li>
<li>Foo</li>
</ol>

<foo>

<ol continutes="myList">
<li>Foo</li>
<li>Foo</li>
</ol>

.... although I might be misremembering.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #2
On Sat, 17 Apr 2004 18:50:27 +0100, David Dorward
<do*****@yahoo.com> wrote:
Zenobia wrote:
how do I emulate the start attribute of ol tag deprecated in
XHTML (strict)?


In theory, you use CSS counters.

In practise you use XHTML 1.0 Transitional, or not split lists into multiple
parts.

There has been some debate about this as regards XHTML 2 on the www-html
mailing list lately. One suggestion was an attribute that would link lists
together.

e.g.

<ol id="myList">
<li>Foo</li>
<li>Foo</li>
</ol>

<foo>

<ol continutes="myList">
<li>Foo</li>
<li>Foo</li>
</ol>

... although I might be misremembering.


I will use transitional XHTML because counters haven't been
implemented in IE6.

As a matter of curiosity, does the counter apply to the OL or
the LI tag? I guess it must apply the OL otherwise the
counter-reset attribute won't make sense.

Eg. In theory, is this what I could do with a browser that
supports counters?

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<style type="text/css">
ol:before {counter-reset: letr 1; content: counter(letr,
lower-roman) ". "}
ol.refs:before {counter-reset: letr 3; content:
counter(letr, lower-roman) ". "}
</style>
</head>
<body>
<h3>Notes:</h3>
<ol>
<li>One</li>
<li>Two</li>
</ol>
<h3>References:</h3>
<ol class="refs">
<li>Three</li>
<li>Four</li>
</ol>
</body>
</html>

Jul 20 '05 #3
Zenobia wrote:
I will use transitional XHTML because counters haven't been
implemented in IE6.
Or anywhere except Opera
As a matter of curiosity, does the counter apply to the OL or
the LI tag?
To whatever you want, but given you are numbering the <li>s, you would use
the counter on the <li>s.
I guess it must apply the OL otherwise the
counter-reset attribute won't make sense.
If you wanted to start the counter from 1 each time, you would apply the
reset to the <ol>.
Eg. In theory, is this what I could do with a browser that
supports counters?

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<style type="text/css">
ol:before {counter-reset: letr 1; content: counter(letr,
lower-roman) ". "}
ol.refs:before {counter-reset: letr 3; content:
counter(letr, lower-roman) ". "}
</style>


I've never used counters (as they aren't much practical use on the web), but
no. You let the counter continue counting for the second list, rather then
explicitly setting it to the value it would have counted to already.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: piraticman | last post by:
Hi. I have some code for a javascript jump menu... It validated with HTML 4.0 but now does not validate with XHTML strict 1.0. I have used name atributes in my code which aparantly are not...
2
by: fleemo17 | last post by:
I ran a web page through a WAI validator, and it came back saying "Failure - Document uses one or more deprecated elements or attributes. The document contains the element: IMG with the deprecated...
19
by: Bert Lancaster | last post by:
I'm not actually using it on the web but can anyone tell me why the ID attribute on a <style> tag causes an error in the W3C validator for an XHTML 1.1 document? It doesn't have a problem for a...
11
by: Jasbird | last post by:
Has the name attribute deprecated? I ask this because ASP.NET 2 warns me against using it, says that it has been deprecated and doesn't use it (on the client) when creating a radio button list....
1
by: C.W.Holeman II | last post by:
I have an xmlns attribute that produces an XHTML validation error and I do not understand why it is considered an error.The file displays as expected on Firefox and IE7. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.