Please note that it was found in vav links that had unordered lists like below.
<li class="current"><a href="index-2.html">Simple slider</a></li>
<li><a href="home_full_slider.html">Fullwidth slider</a></li>
Delete it and forget you ever saw it. Inline JS is junk anyway, and has no business sitting in place of a proper URL.
Thanks guys, but can you guys tell me keeping empty href is better or href with # ? Or doesn't matter!?
If you click a link with an empty href you get an error, while clicking a link with # as the href value just jumps you to the top of the page, so the latter is better.
Hm, I thought that was the case, but thought I'd better test it, and it wasn't so—no error message when the href is empty. But still ...
... the real question is—why have a link on your page with either of these? If the link has nowhere to go, it shouldn't be a link.
Just for temporary use. For demo templates. You know that.
I always use #, because I've gotten errors in the past having nothing in there.
You know that.
No, I meant you know why people use # .
Yes, but not just for demo purposes. Too often it ends up in the finished code, for the reason I mentioned.
In that case there shouldn't be empty links.. I'm with you on that.
This topic is now closed. New replies are no longer allowed.