<html> <head> <title> Lists in HTML PowerPoint </title> </head> <body> How to create lists in HTML </body> </html>
Creating Lists in HTML 3 types of lists Unordered list Ordered list Bulleted items Ordered list Numbered items Definition List a list of items, with a description of each item
Unordered Lists in HTML The tag for a bulleted list is <ul> & </ul> Each item is surrounded with the open and close <li> tag (li = list item) Bullets can be changed to squares or circles with the optional code type=“square” or type=”circle” in the <ul> tag. Code View <ul> <li>Milk</li> <li>Eggs</li> </ul> -- Browser View Milk Eggs
Ordered Lists in HTML The tag for a numbered list is <ol> & </ol> Each item is surrounded with the open and close <li> tag (li = list item) List items will be numbered Numbers can be changed to a, A, i, or I with the optional code type=“a”, type=“A”, etc in the <ol> tag. Code View <ol> <li>George Washington</li> <li>John Adams</li> </ol> -- Browser View 1. George Washington 2. Johns Adam
Definition Lists in HTML The tag for this list is <dl> & </dl> Each term is surrounded with the <dt> tag and each description is surrounded with the <dd> tag Code View <dl> <dt>Electron</dt> <dd>- carries a negative electric charge</dd> <dt>Neutron</dt> <dd>- carries no electric charge</dd> </dl> -- Browser View Electron - carries a negative electric charge Neutron - carries no electric charge
Lists in HTML – REVIEW Ordered lists <ol> produce numbered lists Unordered lists <ul> produce bulleted lists Each item in an ordered list & unordered list is surrounded with the <li> tag Definition lists <dl> produce terms with definitions Each term in a definition list is surrounded with the <dt> tag and each description is surrounded with the <dd> tag.
Activity Practice Get a textbook for this course. On page 203 – Read through the information to clarify your knowledge of the three types of lists. Complete the “action” lessons for Unordered Lists (pg. 204), Ordered Lists (pg. 205), Definition Lists (pg. 206) & Line Break (pg. 207).