2.2 Lists Flashcards
(10 cards)
What is the purpose of unordered list (<ul>) in HTML?
To display a bulleted list of items with no specific order.
What element is used for each item in a list?
<li> is used inside both ordered & unordered list.
</li>
How do you create an ordered list in HTML?
Use <ol><li>Item 1</li><li>Item 2 </li></ol> for a numbered list.
What does the type attribute in <ol> control?
It changes the numbering style (e.g, type=”A” gives A, B, C…).
What does the start attribute in <ol> do?
Specifies the starting number or letter for the list (e.g, Start=”5”).
What is a description list (<dl>) used for?
It creates a term-description pair list, often for definations.
What tags are used in a description list?
<dt> for the term, & <dd> for the description.
</dd></dt>
Can you nest items in list items?
Yes, you can nest <ul>, <ol>, or <dl> within <li> or <dd> elements.
Are lists block-level or inline-level elements?
Lists are block-level elements by default.
What is the default bullet style for <ul> in most browsers?
A solid disc (•)