Horje
How to add HTML <input type="radio"> | HTML Code

Radio buttons let a user select only one of a limited number of choices.

Definition and Usage

The <input type="radio"> defines a radio button.

Radio buttons are normally presented in radio groups (a collection of radio buttons describing a set of related options). Only one radio button in a group can be selected at the same time.

Note: The radio group must share the same name (the value of the name attribute) to be treated as a group. Once the radio group is created, selecting any radio button in that group automatically deselects any other selected radio button in the same group. You can have as many radio groups on a page as you want, as long as each group has its own name.

Note: The value attribute defines the unique value associated with each radio button. The value is not shown to the user, but is the value that is sent to the server on "submit" to identify which radio button that was selected.

Tip: Always add the <label> tag for best accessibility practices!


Browser Support

Syntax

<input type="radio">


index.html
Example: HTML
<input type="radio" id="html" name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css" name="fav_language" value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="javascript" name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label> 

Output should be:

How to add HTML <input type="radio">




Read Full::
HTML Tag Code
Category:
HTML Code
Sub Category:
HTML Tag Code
Uploaded:
1 month ago
Uploaded by:
Admin
Views:
4

Related Articles
How to add HTML <input> Tag
How to add HTML <input> accept Attribute
How to add HTML <input> accept file_extension Attribute
How to add HTML <input> accept audio/* Attribute
How to add HTML <input> accept video/* Attribute
How to add HTML <input> accept image/* Attribute
How to add HTML <input> accept media_type Attribute
How to add HTML <input> alt Attribute
How to add HTML <input> autocomplete Attribute
How to add HTML <input> autocomplete on Attribute
How to add HTML <input> autocomplete off Attribute
How to add HTML <input> autocomplete address-line1 Attribute
How to add HTML <input> autocomplete address-line2 Attribute
How to add HTML <input> autocomplete address-line3 Attribute
How to add HTML <input> autocomplete address-level1 Attribute
How to add HTML <input> autocomplete address-level2 Attribute
How to add HTML <input> autocomplete address-level3 Attribute
How to add HTML <input> autocomplete address-line4 Attribute
How to add HTML <input> autocomplete street-address Attribute
How to add HTML <input> autocomplete country Attribute
How to add HTML <input> autocomplete country-name Attribute
How to add HTML <input> autocomplete postal-code Attribute
How to add HTML <input> autocomplete name Attribute
How to add HTML <input> autocomplete additional-name Attribute
How to add HTML <input> autocomplete family-name Attribute
How to add HTML <input> autocomplete give-name Attribute
How to add HTML <input> autocomplete honoric-prefix Attribute
How to add HTML <input> autocomplete name Attribute
How to add HTML <input> autocomplete nickname Attribute
How to add HTML <input> autocomplete organization-title Attribute
How to add HTML <input> autocomplete username Attribute
How to add HTML <input> autocomplete new-password Attribute
How to add HTML <input> autocomplete new-password Attribute
How to add HTML <input> autocomplete current-password Attribute
How to add HTML <input> autocomplete bday Attribute
How to add HTML <input> autocomplete bday-day Attribute
How to add HTML <input> autocomplete bday-month Attribute
How to add HTML <input> autocomplete bday-year Attribute
How to add HTML <input> autocomplete sex Attribute
How to add HTML <input> autocomplete one-time-code Attribute
How to add HTML <input> autocomplete organization Attribute
How to add HTML <input> autocomplete cc-name Attribute
How to add HTML <input> autocomplete cc-given-name Attribute
How to add HTML <input> autocomplete cc-additional-name Attribute
How to add HTML <input> autocomplete cc-family-name Attribute
How to add HTML <input> autocomplete cc-number Attribute
How to add HTML <input> autocomplete cc-exp Attribute
How to add HTML <input> autocomplete cc-exp-month Attribute
How to add HTML <input> autocomplete cc-exp-year Attribute
How to add HTML <input> autocomplete cc-csc Attribute
How to add HTML <input> autocomplete cc-type Attribute
How to add HTML <input> autocomplete transaction-currency Attribute
How to add HTML <input> autocomplete transaction-amount Attribute
How to add HTML <input> autocomplete language Attribute
How to add HTML <input> autocomplete url Attribute
How to add HTML <input> autocomplete email Attribute
How to add HTML <input> autocomplete photo Attribute
How to add HTML <input> autocomplete tel Attribute
How to add HTML <input> autocomplete tel-country-code Attribute
How to add HTML <input> autocomplete tel-national Attribute
How to add HTML <input> autocomplete tel-area-code Attribute
How to add HTML <input> autocomplete tel-local Attribute
How to add HTML <input> autocomplete tel-local-prefix Attribute
How to add HTML <input> autocomplete tel-local-suffix Attribute
How to add HTML <input> autocomplete tel-extension Attribute
How to add HTML <input> autocomplete impp Attribute
How to add HTML <input> autofocus Attribute
How to add HTML <input> checked Attribute
How to add HTML <input> dirname Attribute
How to add HTML <input> disabled Attribute
How to add HTML <input> form Attribute
How to add HTML <input> formaction Attribute
How to add HTML <input> formenctype Attribute
How to add HTML <input> formmethod Attribute
How to add HTML <input> formmethod get Attribute
How to add HTML <input> formmethod post Attribute
How to add HTML <input> formnovalidate Attribute
How to add HTML <input> formtarget Attribute
How to add HTML <input> formtarget _blank Attribute
How to add HTML <input> formtarget _self Attribute
How to add HTML <input> formtarget _parent Attribute
How to add HTML <input> formtarget _top Attribute
How to add HTML <input> formtarget framename Attribute
How to set HTML <input> height Attribute
How to set HTML <input> list Attribute
How to add HTML <input> max Attribute
How to add HTML <input> max number Attribute
How to add HTML <input> max date Attribute
How to add HTML <input> maxlength Attribute
How to add HTML <input> min Attribute
How to add HTML <input> min number Attribute
How to add HTML <input> min date Attribute
How to add HTML <input> minlength Attribute
How to add HTML <input> multiple Attribute
How to add HTML <input> name Attribute
How to add HTML <input> pattern Attribute
How to add HTML <input> pattern Specific characters Attribute
How to add HTML <input> pattern uppercase and lowercase letter Attribute
How to add HTML <input> pattern characters @,.;''#$%^&8 Attribute
How to add HTML <input> pattern characters [^'\x22]+
How to add HTML <input> pattern characters http:// or https://
How to add HTML <input> placeholder Attribute
How to add HTML <input> popovertarget Attribute
How to add HTML <input> popovertargetaction Attribute
How to add HTML <input> popovertargetaction hide Attribute
How to add HTML <input> popovertargetaction show Attribute
How to add HTML <input> popovertargetaction toggle Attribute
How to add HTML <input> readonly Attribute
How to add HTML <input> required Attribute
How to add HTML <input> size Attribute
How to add HTML <input> src Attribute
How to add HTML <input> step Attribute
How to add HTML <input> type Attribute
How to add HTML <input> type button Attribute
How to add HTML <input> type checkbox Attribute
How to add HTML <input> type color Attribute
How to add HTML <input> type date Attribute
How to add HTML <input> type datetime-local Attribute
How to add HTML <input> type email Attribute
How to add HTML <input> type file Attribute
How to add HTML <input> type hidden Attribute
How to add HTML <input> type image Attribute
How to add HTML <input> type month Attribute
How to add HTML <input> type number Attribute
How to add HTML <input> type password Attribute
How to add HTML <input> type radio Attribute
How to add HTML <input> type range Attribute
How to add HTML <input> type reset Attribute
How to add HTML <input> type search Attribute
How to add HTML <input> type submit Attribute
How to add HTML <input> type tel Attribute
How to add HTML <input> type text Attribute
How to add HTML <input> type time Attribute
How to add HTML <input> type url Attribute
How to add HTML <input> type week Attribute
How to add HTML <input type="button">
How to add HTML <input type="checkbox">
How to add HTML <input type="color">
How to add HTML <input type="date">
How to add HTML <input type="datetime-local">
How to add HTML <input type="email">
How to add HTML <input type="file">
How to add HTML <input type="hidden">
How to add HTML <input type="image">
How to add Align input image (with CSS) on Submit Button
How to add HTML <input type="month">
How to add HTML <input type="number">
How to add HTML <input type="password">
How to add HTML <input type="radio">
How to add HTML <input type="range">
How to add HTML <input type="reset">
How to add HTML <input type="search">
How to add HTML <input type="submit">
How to add HTML <input type="tel">
How to add HTML <input type="text">
How to add HTML <input type="time">
How to add HTML <input type="url">
How to add HTML <input type="week">
How to add HTML <input> value Attribute
How to add HTML <input> width Attribute

More Articles
What is HTML <!--...--> Tag HTML Tag Code
What is HTML <!DOCTYPE> Declaration HTML Tag Code
What is HTML Elements and Doctypes HTML Tag Code
What is HTML <a> Tag HTML Tag Code
What is HTML <abbr> Tag HTML Tag Code
What is HTML <address> Tag HTML Tag Code
What is HTML <applet> Tag HTML Tag Code
What is HTML <area> Tag HTML Tag Code
What is HTML <article> Tag HTML Tag Code
What is HTML <aside> Tag HTML Tag Code
What is HTML <audio> Tag HTML Tag Code
What is HTML <b> Tag HTML Tag Code
What is HTML <base> Tag HTML Tag Code
What is HTML <basefont> Tag HTML Tag Code
What is HTML <bdi> Tag HTML Tag Code
What is HTML <bdo> Tag HTML Tag Code
What is HTML <big> Tag HTML Tag Code
What is HTML <blockquote> Tag HTML Tag Code
What is HTML <body> Tag HTML Tag Code
What is HTML <br> Tag HTML Tag Code
What is HTML <button> Tag HTML Tag Code
What is HTML <canvas> Tag HTML Tag Code
What is HTML <caption> Tag HTML Tag Code
What is HTML <center> Tag HTML Tag Code
What is HTML <cite> Tag HTML Tag Code
What is HTML <code> Tag HTML Tag Code
What is HTML <col> Tag HTML Tag Code
How to create HTML <colgroup> Tag HTML Tag Code
What is HTML <data> Tag HTML Tag Code
What is HTML <datalist> Tag HTML Tag Code
What is HTML <dd> Tag HTML Tag Code
What is HTML <del> Tag HTML Tag Code
What is HTML <details> Tag HTML Tag Code
What is HTML <dfn> Tag HTML Tag Code
What is HTML <dialog> Tag HTML Tag Code
What is HTML <dir> Tag HTML Tag Code
What is HTML <div> Tag HTML Tag Code
What is HTML <dl> Tag HTML Tag Code
What is HTML <dt> Tag HTML Tag Code
What is HTML <em> Tag HTML Tag Code
What is HTML <embed> Tag HTML Tag Code
What is HTML <fieldset> Tag HTML Tag Code
What is HTML <figcaption> Tag HTML Tag Code
What is HTML <figure> Tag HTML Tag Code
What is HTML <font> Tag HTML Tag Code
What is HTML <footer> Tag HTML Tag Code
What is HTML <form> Tag HTML Tag Code
What is HTML <frame> Tag HTML Tag Code
What is HTML <frameset> Tag HTML Tag Code
What is HTML <h1> to <h6> Tags HTML Tag Code
What is HTML <head> Tag HTML Tag Code
What is HTML <header> Tag HTML Tag Code
What is HTML <hgroup> Tag HTML Tag Code
What is HTML <hr> Tag HTML Tag Code
What is HTML <html> Tag HTML Tag Code
What is HTML <i> Tag HTML Tag Code
What is HTML <iframe> Tag HTML Tag Code
What is HTML <img> Tag HTML Tag Code
What is HTML <input> Tag HTML Tag Code
What is HTML <ins> Tag HTML Tag Code
What is HTML <kbd> Tag HTML Tag Code
What is HTML <label> Tag HTML Tag Code

Share on: