140 likes | 290 Views
Lists & Tables. HTML Lists. There are many kinds of lists that can be created in HTML We will be covering Unordered List Ordered List Definition List. Unordered List. The items can be in any order Items are usually marked by bullets
E N D
HTML Lists • There are many kinds of lists that can be created in HTML • We will be covering • Unordered List • Ordered List • Definition List
Unordered List • The items can be in any order • Items are usually marked by bullets • <ul> & </ul> are the opening and closing tags for an unordered list
HTML Code Browser Display <ul> <li>SimCity</li> <li>Quake</li> <li>Bridge</li> </ul> • SimCity • Quake • Bridge
Ordered Lists • Used to show a sequence • Items are usually numbered • <ol> & </ol> are the opening and closing tags
Ordered List Browser Display <ol> <li>SimCity</li> <li>Quake</li> <li>Bridge</li> </ol> OL instead of UL • SimCity • Quake • Bridge Numbers instead of discs, circles or squares
Definition Lists • Used for glossaries, definitions etc. • Works well with any list that pairs a word or phrase with a longer description. • <DL>, <DT> & <DD> are the tags
Definition List Browser Display <dl> <dt>SimCity</dt> <dd>A great simulation game in which one build cities </dd> <dt>Quake</dt> <dd> One of the best of the shoot-em-up genre </dd> </dl> Term • SimCity • A great simulation game in which one build cities • Quake • One of the best of the shoot-em-up genre Definition
Lists vs. Tables • Lists are one way of presenting data in a an ordered or formal fashion • Tables provide another - more customizable - way of displaying ordered information on Web pages
HTML Code Browser Display <table border = "1" > <tr> <th>Indoor</th> <th>Outdoor</th> </tr> <tr> <td>Squash</td> <td>Cricket</td> </tr> </table>
HTML Code Browser Display <tableborder = "1" > <caption> My favorite sports </caption> <tr> <td>Squash</td> <td>Cricket</td> </tr> </table> My favorite sports Must be placed immediately after the<TABLE> tag