Showing posts with label How to create Radio buttons in Html script. Show all posts
Showing posts with label How to create Radio buttons in Html script. Show all posts

Tuesday, 29 November 2011

HTML Tutorial - 4

How to create Radio buttons in Html script ?


Solution :
Step 1: Go to Notepad.
Step 2: Copy the HTML script below to the notepad.


<html>
<body>

<form action="">
<input type="radio" name="Gender" value="male" /> Male<br />
<input type="radio" name="Gender" value="female" /> Female
</form>

<p><b>Note:</b> When a user clicks on a radio-button, it becomes checked, and all other radio-buttons with equal name become unchecked.</p>

</body>
</html>

 
Step 3: Now save the file with .html format.
Step 4: Close the notepad and now open the saved file in your default browser .

That's it ! 
You will see in the browser to select any one option as in below picture.

When you select any one option your browser will show like this !

Newest