Articles → HTML → Difference Between Id And Name In HTML

Difference Between Id And Name In HTML



<!DOCTYPE html>
<html lang="en" xmlns="">

        <meta charset="utf-8" />

            <input type="text" name="test" value="1" />
            <input type="radio" name="Gender" value="Male" />Male
            <input type="radio" name="Gender" value="Female" /> Female
            <input type="submit" value="Click Me" /> </form>


Try It

Picture showing the sample web page displayed on the browser
Click to Enlarge

Picture showing the value of selected radio button passed as querystring in the URL
Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Thursday, July 13, 2017


Your Email Id  
Query/FeedbackCharacters remaining 250