Search code examples
htmlseoxhtmlmarkupsemantic-markup

Is unordered list necessary on the following example?


As it's valid markup, I have done the following;

<div class="list">                                    
            <a href="#">Link 1</a>
            <a href="#">Link 2</a>                
        </div>

My question is, does it have to be written as this;

<ul class="list">                                    
            <li><a href="#">Login to Broker Site</a></li>
            <li><a href="#">Register</a></li>           
        </ul>

what are the + and - of doing one than the other? And are these both correct according to semantic web?

Thanks.


Solution

  • It totally depends on the greater context, but seeing as it seems to be a navigational sub-menu, a ul is indeed the most semantically correct element to use.