O with occluded right edge to appear also as a C Open Web Components Guides Docs Blog Toggle darkmode

list

<ul> and <ol> must only directly contain <li>, <script> or <template> elements.

Rule Details

Examples of incorrect code for this rule:

html` 
<ul>
  <div></div>
  <li></li>
</ul
`;

Examples of correct code for this rule:

html` 
<ul>
  <li></li>
</ul
`;
html` 
<ul>
  <li>
    <ul>
      <li></li>
    </ul>
  </li>
</ul
`;
html` 
<ol>
  <li></li>
</ol
`;

Further Reading