80 likes | 97 Views
Learn how to create radio buttons and dropdown list boxes in HTML forms. Understand the attributes and tags required to build these form objects.
E N D
HTML Programming • Basic HTML • Form
Form’s Object Radio buttons • Only one of the options / answers can be selected at a time. • Radio buttons are created using <input> tag , setting type attribute to radio. • Each radio buttons has a same name.
Form’s Object radiobutton.html <html><head></head><body> <form name=“latihan"> c language,object oriented(java) .....can be considered as: <br><br> <input type="radio" name="radiobutton" value=“Networking"> networking <br> <input type="radio" name="radiobutton" value=“Programming Language" checked> programming language <br> <input type="radio" name="radiobutton" value=“Operating System"> operating system <br><input type=submit ></form></body></html>
Form’s Object radiobutton.html
Form’s Object Dropdown List boxes • Dropdown list boxes are created using <select> and <option> tags. • The <select> tag that creates the list box encloses a number of <option> tags. the <option> tags each contain the text that corresponds to an item on the dropdown list.
Form’s Object listboxes.html <html><head></head><body> <form name=“latihan"> what price of laptop are you looking to buy ? <br> <br> <select name="price"> <option selected>RM 3000- RM 3500</option> <option>RM 3500-RM 4000</option> <option>RM 4000-RM 4500</option> </select> <br><br> <input type=submit> </form></body></html>
Form’s Object listboxes.html