Grail Test Page: List Item Handling
Let's start with a plain list.
This is text before the first item.
- Item one.
- Item two.
- Item three. Here's a nested list:
- One.
- Two.
- More nesting:
More text after the nested list in the same item.
- Another item. This one has a
horizontal rule.
- This item contains a <BLOCKQUOTE>.:
This is a block quote. It contains a
horizontal rule.
- Item four.
- Item five contains a <P> tag:
This is after the <P>.
- Item six.
Let's try ordered lists.
- One.
- Two.
- Three. Nested ordered list:
- Ahh.
- Behh.
- Four. Nested unordered list:
- Mocha.
- Vanilla.
- Goat cheese.
- Nested ordered list:
- One.
- Two.
- Chocolate.
- Five. Are you bored yet?
A unordered list with a dingbat.
- This <UL> uses the attribute DINGBAT=ftp.
- Why &ftp;? Just for fun.
- This list item uses a different
dingbat.
- DINGBAT shouldn't change the subsequent items, the way TYPE
does. The TYPE ugliness originates with a commercial browser
vendor.
Another list:
- This is an ordered list with a mix of short & long list items.
- This one is short.
- This one is not short. It is fairly long even though it has
almost nothing to say. This is needed because we want a test
case with something that is highly likely to wrap to the next
line. If this doesn't wrap around to form multiple lines, make
the window of your user agent narrower.
- This one should be numbered ``5'' even though it's the
fourth item in the list. This tests the VALUE attribute.
- This doesn't specify a value, and should be item 6.
Here is a separate ordered list, with START=3:
- This is an item.
- Here's another item.
Here is another ordered list, with SEQNUM=10 and TYPE="[i]".
- This is an item.
- Here's another item.
Here is another ordered list, with SEQNUM=10, START=5, and COMPACT.
This list has a heading:
- This is an item.
- Here's another item.
- This item includes TYPE=square in the <LI> tag,
just for good measure.
- This accepts the default TYPE for this item. Showing this item
with the square instead of a number is ugly, but conforms to
the practices of other browsers in handling TYPE.
Here is another ordered list, with TYPE=disc.
- This is an item.
- Here's another item with a nested list:
- Here's the first item.
- And another.
- And back to the first list, with TYPE=square.
Another list, with the PLAIN attribute:
This is a list item outside a list.
This is a long list item outside a list. There isn't any good
reason to use such a construct, and it is clearly invalid HTML,
but some fools actually write HTML like this. We want Grail to
handle this at least somewhat gracefully, so we've included a
test case to show that it does. Hopefully.
This list item is outside a list construct but uses the
VALUE attribute with ``1'' for the value.
This is an orphaned list item as well, but uses
DINGBAT=summary. Dingbats get tossed if not in a real list since
add_label_data() gets bypassed.
Definition List
Definition lists have been a problem in past versions of Grail.
When a definition list was nested inside the <DT> element
(illegal in HTML 2.0, but its out there), the left margin of the
nested list was not correctly indented.
Some text before the list...
- Term
- Definition
- Nested Term
- Nested Definition
More of first definition.
- Another Term
- Nested Term
- Nested Definition
- Definition
...and after.