Validating a null link in HTML -


this question has answer here:

is valid html?

<a href="#" id="whatever">home</a> 

i'm using id call jquery function id of "whatever." can't find says whether valid. i'm having debate whether is.

also, valid html have radio button group without 1 selected?

your html valid.

just suggestion, jquery function should prevent default behavior of anchor tag:

jquery("#whatever").click(function(evt) {     evt.preventdefault(); // prevent default anchor tag behavior      // need here }); 

this way prevent common "scroll-to-top" behavior when using href="#".


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -