是否可以在<a> tag

时间:2016-01-18 06:27:25

标签: html css

I currently have html code that wraps my li tags in my a tags like so:

<ul>
    <a href='#'><li>Home</li></a>
    <a href='#><li>Gallery</li></a>
</ul>

It works perfectly, but Is this semantically correct? is there any negative implication of writing my html like this?

1 个答案:

答案 0 :(得分:-1)

你可以尝试这个:

<ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Gallery</a></li>
</ul>