views:

45

answers:

2

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.

+3  A: 

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.

Pekka
+1  A: 

The clue is in the class name you chose.

As you see it as a list then use a list. This is a lot more semantic and is helpful for screen readers, which will then treat the contents as a list of links.

graham