Preselected Radio Example : radio « Form « HTML / CSS






Preselected Radio Example

 
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>Preselected Radio Example</title>
  </head>
  <body>
    <form method="get" action="radiobuttons.html">
      <p>   
        <input type="radio" name="timeslot" id="morning" value="morning" checked="checked"/>
        <label for="morning">In the morning</label>
        <br/>
        <input type="radio" name="timeslot" id="afternoon" value="afternoon"/>
        <label for="afternoon">In the afternoon</label>
        <br/>
        <input type="radio" name="timeslot" id="evening" value="evening"/>
        <label for="evening ">In the evening</label> 
      </p>      
      <input type="submit"/>
    </form>
  </body>
</html>

   
  








Related examples in the same category

1.input type = "radio" creates a radio button
2.radio button
3.Set input radio button background color and color
4.Creates a radio button
5.Labelling Radio Buttons
6.Use table to layout the radio buttons
7.Radio Button