Horje

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

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=">



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


Related Articles
What is HTML <!--...--> Tag HTML Tag
What is HTML <!DOCTYPE> Declaration HTML Tag
What is HTML Elements and Doctypes HTML Tag
What is HTML <a> Tag HTML Tag
What is HTML <abbr> Tag HTML Tag
What is HTML <acronym> Tag HTML Tag
What is HTML <address> Tag HTML Tag
What is HTML <applet> Tag HTML Tag
What is HTML <area> Tag HTML Tag
What is HTML <article> Tag HTML Tag
What is HTML <aside> Tag HTML Tag
What is HTML <audio> Tag HTML Tag
What is HTML <b> Tag HTML Tag
What is HTML <base> Tag HTML Tag
What is HTML <basefont> Tag HTML Tag
What is HTML <bdi> Tag HTML Tag
What is HTML <bdo> Tag HTML Tag
What is HTML <big> Tag HTML Tag
What is HTML <blockquote> Tag HTML Tag
What is HTML <body> Tag HTML Tag
What is HTML <br> Tag HTML Tag
What is HTML <button> Tag HTML Tag
What is HTML <canvas> Tag HTML Tag
What is HTML <caption> Tag HTML Tag
What is HTML <center> Tag HTML Tag
What is HTML <cite> Tag HTML Tag
What is HTML <code> Tag HTML Tag
What is HTML <col> Tag HTML Tag
How to create HTML <colgroup> Tag HTML Tag
What is HTML <data> Tag HTML Tag
What is HTML <datalist> Tag HTML Tag
What is HTML <dd> Tag HTML Tag
What is HTML <del> Tag HTML Tag
What is HTML <details> Tag HTML Tag
What is HTML <dfn> Tag HTML Tag
What is HTML <dialog> Tag HTML Tag
What is HTML <dir> Tag HTML Tag
What is HTML <div> Tag HTML Tag
What is HTML <dl> Tag HTML Tag
What is HTML <dt> Tag HTML Tag
What is HTML <em> Tag HTML Tag
What is HTML <embed> Tag HTML Tag
What is HTML <fieldset> Tag HTML Tag
What is HTML <figcaption> Tag HTML Tag
What is HTML <figure> Tag HTML Tag
What is HTML <font> Tag HTML Tag
What is HTML <footer> Tag HTML Tag
What is HTML <form> Tag HTML Tag
What is HTML <frame> Tag HTML Tag
What is HTML <frameset> Tag HTML Tag
What is HTML <h1> to <h6> Tags HTML Tag
What is HTML <head> Tag HTML Tag
What is HTML <header> Tag HTML Tag
What is HTML <hgroup> Tag HTML Tag
What is HTML <hr> Tag HTML Tag
What is HTML <html> Tag HTML Tag
What is HTML <i> Tag HTML Tag
What is HTML <iframe> Tag HTML Tag
What is HTML <img> Tag HTML Tag
What is HTML <input> Tag HTML Tag
What is HTML <ins> Tag HTML Tag
What is HTML <kbd> Tag HTML Tag
What is HTML <label> Tag HTML Tag
What is HTML <legend> Tag HTML Tag
What is HTML <li> Tag HTML Tag
What is HTML <link> Tag HTML Tag
What is HTML <main> Tag HTML Tag
What is HTML <map> Tag HTML Tag
What is HTML <mark> Tag HTML Tag
What is HTML <menu> Tag HTML Tag
What is HTML <meta> Tag HTML Tag
What is HTML <meter> Tag HTML Tag
What is HTML <nav> Tag HTML Tag
What is HTML <noframes> Tag HTML Tag
What is HTML <noscript> Tag HTML Tag
What is HTML <object> Tag HTML Tag
What is HTML <ol> Tag HTML Tag
What is HTML <optgroup> Tag HTML Tag
What is HTML <option> Tag HTML Tag
What is HTML <output> Tag HTML Tag
What is HTML <p> Tag HTML Tag
What is HTML <param> Tag HTML Tag
What is HTML <picture> Tag HTML Tag
What is HTML <pre> Tag HTML Tag
What is HTML <progress> Tag HTML Tag
What is HTML <q> Tag HTML Tag
What is HTML <rp> Tag HTML Tag
What is HTML <rt> Tag HTML Tag
What is HTML <ruby> Tag HTML Tag
What is HTML <s> Tag HTML Tag
What is HTML <samp> Tag HTML Tag
What is HTML <script> Tag HTML Tag
What is HTML <search> Tag HTML Tag
What is HTML <section> Tag HTML Tag
What is HTML <select> Tag HTML Tag
What is HTML <small> Tag HTML Tag
What is HTML <source> Tag HTML Tag
What is HTML <span> Tag HTML Tag
What is HTML <strike> Tag HTML Tag
What is HTML <strong> Tag HTML Tag
What is HTML <style> Tag HTML Tag
What is HTML <sub> Tag HTML Tag
What is HTML <summary> Tag HTML Tag
What is HTML <sup> Tag HTML Tag
What is HTML <svg> Tag HTML Tag
What is HTML <table> Tag HTML Tag
What is HTML <tbody> Tag HTML Tag
What is HTML <td> Tag HTML Tag
What is HTML <template> Tag HTML Tag
What is HTML <textarea> Tag HTML Tag
What is HTML <tfoot> Tag HTML Tag
What is HTML <th> Tag HTML Tag
What is HTML <thead> Tag HTML Tag
What is HTML <time> Tag HTML Tag
What is HTML <title> Tag HTML Tag
What is HTML <tr> Tag HTML Tag
What is HTML <track> Tag HTML Tag
What is HTML <tt> Tag HTML Tag
What is HTML <u> Tag HTML Tag
What is HTML <ul> Tag HTML Tag
What is HTML <var> Tag HTML Tag
What is HTML <video> Tag HTML Tag
How to add HTML <wbr> Tag HTML Tag

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin



Share on: