Yes nested lists are perfectly valid, and your code looks like it would be perfectly valid. http://www.w3.org/wiki/HTML_lists#Nesting_lists
Best way to nest lists?
-
30-06-2022 - |
Question
I need to achieve some tricky layout and it would require some similar markup like this:
<ul>
<li class="active">
<a href="#"><?=lang('nuestros-hoteles')?></a>
<ul>
<li>
<ul>
<li>A
<ul>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
</ul>
</li>
</ul>
<ul>
<li>B
<ul>
<li><a href="#">1</a></li>
</ul>
</li>
</ul>
<ul>
<li>C
<ul>
<li><a href="#">1</a></li>
<li><a href="#">3</a></li>
<li><a href="#">3</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>...</li>
</ul>
Question is,
Would this be valid and or semantic?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow