Tuesday, 12 October 2010

IDAT 102

Html
The Second Lesson:

Today we learnt how to script forms, a form is where you enter a name and password or it could be a search bar, or you could press a radio button or a check box forms are user input boxes.

Radio Buttons
The first form I looked at was the radio button, this is the button where you pick from a list already made for you its like a tick box where you pick male or female as shown in the example. They were named after the physical buttons used on older car radios to select preset stations.
To create a radio button i used the script:
<form>
<input type="radio" name="sex" value="male"/>male<br/>
<input type="radio" name="sex" value="female"/>female<br/>
</form>
This script says the input type is a radio which is a radio button the name is the title of the list which is sex and the value is either Male or Female and this code produces this radio button's below.



When one of the buttons was pressed the other buttons would pop out leaving the pressed button the only button pushed in.

Text Field
The second form is a text field form this is where you can write your name or usernames and passwords in they are use on most sign up websites today, also when you are on a pc its where you put your password to login to your computer.
The text field form script is:
<form>
first name: <input type="text" name="firstname" /><br/>
last name:<input type="text" name="lastname"/><br/>
</form>
This is the form, text field and the input type is text, and the name next to where you put text is first name and last name the <br/> is a line break and its kind of like the enter key on the keyboard.

 ^This is the text field form^

No comments:

Post a Comment