/    Sign up×
Community /Pin to ProfileBookmark

Ordered Lists… help!!

Aaagh. I’m trying to make a website I’m working on conform to HTML 4.01 Strict.

I’ve got an ordered list which starts at 3 (rather than 1), and I had used <li value=”3″> to get this to work, but this doesn’t seem to be allowed in HTML 4.01.

How do I make the list start at 3 without using the “value” or “start” commands??

Thanks.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@soccer362001Nov 19.2003 — Just a stupid question. Why do you want to start with 3?
Copy linkTweet thisAlerts:
@DaveSWNov 19.2003 — hmm I guess everyone loves lists that start at 3... LOL

<html>

<head>

<title>Untitled</title>

<style type="text/css">

<!--

.hidden {

visibility:hidden;

font-size:1px;

line-height:1px;

}

-->

</style>

</head>

<body>

<ol>

<li class="hidden">hello</li>

<li class="hidden">hello</li>

<li>Number 3...</li>

</ol>

</body>

</html>
Copy linkTweet thisAlerts:
@CharlesNov 19.2003 — [font=georgia]The proper way is to use [url=http://www.w3.org/TR/REC-CSS2/generate.html#counters]CSS2 and Counters[/url].

[font=monospace]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="Content-Script-Type" content="text/javascript">

<title>Example</title>

<style type="text/css">

<!--

ol {counter-reset:item 3}

li {display:block}

li:before {content:counter(item) ". "; counter-increment:item}

-->

</style>

<ol>

<li>Fee</li>

<li>Fie</li>

<li>Foe</li>

<li>Fum</li>

</ol>[/font]

You will find, however, that bad browsers do not understand counters - even though the CSS2 Specification came out in 1998. And as MSIE is one of those bad browsers, this is a good place to give up and use the Transitional DTD.[/font]
Copy linkTweet thisAlerts:
@sabbath180authorNov 19.2003 — Thanks for your help.

The reason I want the list to start at 3 is because it covers two pages. Items 1 and 2 are on the previous page. I'm not just some weirdo who must make all his lists begin at 3! lol.

?

I tried the counter method, but of course I'm using MSIE, so it didn't work.

I think I'll go with the hidden method because that seems to work. Will it work in all browsers?

If not, then is it OK to use the Transitional DTD for this page, while the rest use the Strict DTD?

Thanks again, you've been a big help.
Copy linkTweet thisAlerts:
@CharlesNov 19.2003 — [font=georgia]It's a far, far, better thing to use the Transitional DTD, and you don't have to use the same DTD throughout a site. [i]From the Web COntent Accessibility Guidelines 1.0[/i]

[b]6.1 Organize documents so they may be read without style sheets. For example, when an HTML document is rendered without associated style sheets, it must still be possible to read the document. [Priority 1][/b]

[i]http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-order-style-sheets[/i]

[b]3.6 Mark up lists and list items properly. [Priority 2][/b]

[i]http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-list-structure[/i][/quote]
[/font]
×

Success!

Help @sabbath180 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...