[thelist] Markup for a Quiz

Rosalie Sennett rsennett at brainlink.com
Fri Dec 24 00:11:58 CST 2004


Definition lists will not not give you the letters and numbers. You need
Ordered lists. You must nest them so that your questions will continue
numerically and the answers will keep starting over.

The nesting works like this:

<style type="text/css">
<!--
#olQuestion {
	list-style-type: decimal;
}
#olAnswerList li {

	list-style-type: upper-alpha;
}


-->
</style>
</head>

<body>

<ol id="olQuestion">
	Some text about chapter 1
		<li>Question Text</li>
			<ol id="olAnswerList">
				<li>First Choice<li>
				<li>Second Choice</li>
				</li>Third Choice</li>
			</ol>
<br />
	Stuff about chapter 2
		<li>Question Text</li>
			<ol id="olAnswerList">
				<li><li>
				<li></li>
				</li></li>
				<li></li>
			</ol>
</ol>

</body>
</html>

There are a bout a zillion ways to identify each distinct ol... and if you
want to mess with browser compatibility (ie. Stinks) then you can get
creative and start referencing which child or grand child... but I like the
sledge hammer approach... and use an id. Technically, the id's are supposed
to be unique within the page, but this works fine.

I'm sure people will pipe in with other ways to target the nested lists...

rose

-----------------
c:/dos
c:/dos/run
run/dos/run
>>
-----------------
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org [mailto:thelist-
> bounces at lists.evolt.org] On Behalf Of Steve Axthelm
> Sent: Friday, December 24, 2004 12:06 AM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Markup for a Quiz
> 
> >What I want is something
> >like this:
> >
> >Course Exam
> >Chapter 1
> >Some text about Chapter 1
> >   1. Question Text
> >         A. Some answer
> >         B. Some answer
> >         C. Some answer
> [snip]
> >Any suggestions as to the most (semantic|accessible|elegant) markup for
> >this?
> 
> Definition lists perhaps?
> 
> 
> -Steve
> 
> --
> Steve Axthelm
> steveax at pobox.com
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !




More information about the thelist mailing list