Skip to content Skip to sidebar Skip to footer

Why
  • Is Kept Open Without A
  • Html Nested Lists

    I posted a question and everyone said things that i was not really asking I will try to be more clear next time. I was told that when nesting lists you must leave a
  • wit
  • Solution 1:

    A list of a list of things.

    Each thing is represented by a list item.

    The nested list is such a thing. It has to be part of a list item so that it can be in another list.

    It might be easier to understand if you fix the errors in your example and indent it properly.

    li {
      background: #faa;
      padding: 2px;
      margin-top: 2px;
      margin-bottom: 2px;
    }
    lili {
      background: #afa;
    }
    lilili {
      background: #aaf;
    }
    lililili {
      background: white;
    }
    <ul><li>Louis</li><li>Louis
        <ol><li>Louis</li><li>Louis
            <ul><li>Louis</li><li>Louis
                <ol><li>Louis</li><li>Louis</li></ol></li></ul></li></ol></li></ul>

    The end tag for a list item can always be omitted. Some tags are simply optional in HTML. The element will be ended when the parser hits a end end tag for the list or a start tag for the next list item.

    Post a Comment for "Why
  • Is Kept Open Without A
  • Html Nested Lists"