H44: Using label elements to associate text labels with form controls

HTML Snippet Code
Scenario 1: Scenario Name

label association is not provided for form fields

01. No label association for text field


02. No label association for checkbox

03. No label association for group of radio buttons

Select Gender

04. No label association for input file

05. No label association for text area


06. No label association for select


<h1 style="font-size:22px"> label association is not provided for form fields</h1> <form> <h2 style="font-size:18px"> 01. No label association for text field</h2> <label>First Name: </label><input type="text" name="fname"><br> <label>Last Name: </label><input type="text" name="lname"> <h2 style="font-size:18px">02. No label association for checkbox</h2> <input type="checkbox" name="computerskills" checked="checked"> <label>HTML</label> <h2 style="font-size:18px">03. No label association for group of radio buttons</h2> <fieldset> <legend> Select Gender</legend> <input type="radio" name="gender" value="Male" /><label>Male</label> <input type="radio" name="gender" value="female"/><label>Female</label><br/> </fieldset> <h2 style="font-size:18px">04. No label association for input file</h2> <label >Attach the documents</label><input type="file" value="browse the document" /> <h2 style="font-size:18px">05. No label association for text area</h2> <label>Provide the address</label></br> <textarea rows="4" cols="15"></textarea> <h2 style="font-size:18px">06. No label association for select</h2> <label>Account type</label><br/> <select> <option>Admin</option> <option>User</option> </select> </form>