Remove double bullets in nested list

前端 未结 4 1936
北海茫月
北海茫月 2021-01-18 00:55

Nested list have double bullets. One for the li and another for the child list.

example

    
  • item
4条回答
  •  别那么骄傲
    2021-01-18 01:30

    quick hack: remove the list item:

    • item
    • item
      • item
      • item
      • item

    if you don't close the tags the browser will render it correctly, that is without the extra bullet. Note: this is valid html since you don't need to close

  • tags.

    JSFIDDLE with both examples

    source: Google

    "as opposed to XHTML, even when delivered with the MIME type text/html – allows authors to omit certain tags."

    from google:

    if you have a list of items marked up as <li>List item</li>, you could instead just write <li>List item...

    Omitting optional tags keeps your HTML formally valid...

提交回复
热议问题