Assign an initial value to radio button as checked

Rinkal Bhanderi picture Rinkal Bhanderi · Jan 17, 2011 · Viewed 175.4k times · Source

How do I assign the value of a radio button initially as checked in HTML?

Answer

polarblau picture polarblau · Jan 17, 2011

You can use the checked attribute for this:

<input type="radio" checked="checked">