Links with LI within

1

I have this structure:

<ul>
<li><a></a></li>
<li><a></a></li>
</ul>

Okay, what happens, is that sometimes I need to put the <a> link above the li and not inside, as it is in the structure. How do you do? I already used window.location , but wanted to know if there is any way to do it without using javascript .

    
asked by anonymous 22.08.2014 / 14:15

1 answer

6

Not recommended, and literally not correct you put something like:

<a><li></li></a>

So, as defined in the HTML standards rules, by w3c , inside the <ol> or <ul> tag %, we can only contain <li> tag.

What I suspect you want to do is to have the integer block 'clickable', so I recommend doing add the display: block property > in the css of tag <li> .

    
22.08.2014 / 14:38