Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Definition Lists

September 17, 2001

Lastly, definition lists are also used in Curl, which work in a slightly different way to the other two types of list. In HTML you would use the <dl> (definition list), <dt> (definition term) and <dd> (definition description) elements. The <dl> element is the outermost container and it contains a set of terms and related descriptions for each terms.

Definition lists are used when you wish to create a set of bullets using a different text term for each separate one. It typically worked this way in HTML:

<dl>
	<dt>HTML</dt>
	<dd>Hyper text markup language</dd>
	<dt>JavaScript</dt>
	<dd>Client-side Scripting Language</dd>
	<dt>Flash</dt>
	<dd>Tool for writing multimedia extensions</dd>
	<dt>Curl</dt>
	<dd>The replacement for all of the above!</dd>
</dl>

Curl has its own syntax that works similarly to HTML:

{definition-list
	{term ...}
	{definition ...}
}

The definition-list format is used like the <dl> element to encompass all of the terms and descriptions. The expressions contained within are used to define the terms and descriptions.

If we wanted to translate the above example into Curl, we would do the following:

|| definitionlist.curl
{curl 1.7 applet}
{applet license = "development"}
{definition-list
	{term HTML}
	{definition Hyper text markup language}
	{term JavaScript}
	{definition Client-side Scripting Language}
	{term Flash}
	{definition Tool for writing multimedia extensions}
	{term Curl}
	{definition The replacement for all of the above!}
}

This would define four separate terms, each with its own description. The above code will display like this in a browser window:

The definition-list format is also capable of taking any of the character options, such as color or font-weight to alter the appearance of the list:

{definition-list color="blue",
	{term HTML}
	{definition Hyper text markup language}
	etc ...

This would alter the appearance of the whole list. If you wanted it to only apply to individual items, such as single heading, then you would only need to alter the term format as follows:

{definition-list
	{term color="blue",HTML}
	{definition Hyper text markup language}
	etc ...

Lists
Early Adopter Curl
Table Text Formats


Up to => Home / Authoring / Languages / Curl / Early




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers