Book Image

Practical Web Development

By : Paul Wellens
Book Image

Practical Web Development

By: Paul Wellens

Overview of this book

Table of Contents (23 chapters)
Practical Web Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
10
XML and JSON
Index

Lists


In almost every document, you will find the need to sum up a number of items in a list. In HTML you have the choice between an unordered list (think bullets) and an ordered list (think numbers). The HTML elements for these lists are <ul> and <ol>.

This example produces a list of colors:

<h2>Colors</h2>
<ul>
<li>red</li>
<li>green</li>
<li>blue</li>
</ul>

This will generate a list of colors, each preceded by a (round) bullet. Replacing <ul>/</ul> by <ol>/</ol> will give you a numbered list. Attributes existed to specify the shape of the bullet but these are long gone. Bullet styles are specified in CSS these days. You can even use an image file for the bullet.

A third list element that is worth looking into is <dl> or data list.