checked="checked" not working in chrome

I was able to replicate this issue on Google Chrome Version 28.0.1500.95.

<table>
  <tr>
    <td>test</td>
    <input type="radio" name="foo" value="bar" checked="checked">
  </tr>
</table>

I broke the table by improperly nesting a radio button. This somehow causes Google Chrome to not mark the input radio as checked.

jsfiddle example - broken and jsfiddle example - working


checked="checked" works fine in Chrome. Make sure you are not having any other issues. Any invalid HTML. No inline element containing block-level elements?


@Abhay's answer worked for me, I dont know why people negative marking it. I had 2 radio groups sharing same name like below,

  <input type="radio" name="gender" value="male" checked> Male<br>
  <input type="radio" name="gender" value="female"> Female<br>
  <input type="radio" name="gender" value="other"> Other 

Then again at the bottom of the page,

  <input type="radio" name="gender" value="male" checked> Male<br>
  <input type="radio" name="gender" value="female"> Female<br>
  <input type="radio" name="gender" value="other"> Other 

So what happening was browser's getting ambiguity and it was selecting only the bottom one not the upper one.

Hope this will help someone.

Enjoy ;)

Tags:

Html

Checkbox