Forms - part 2
<form> This creates a list that looks like the image shown. You will notice that there are 6 options but only three are displayed at a time, this is because I set "size=3". You will also notice that "One" is automatically selected when the page is loaded, this is because I specified "selected" in the <option> tag for that option. Another attribute that I set without telling you about is "multiple" in the <select> tag. If this is selected it allows your visitors to choose more than one option by pressing the SHIFT or CTRL keys while selecting. That basically sums up selection lists. They may seem a bit difficult at first - if so, read back over this section until you understand - now go practice: open up notepad and make some select lists of your own - save with a *.html or *.htm extension and check it out in your browser. A CHECKBOX <input type="checkbox" name="check" value="yes" checked> name: sets the name of the checkbox value: this is the same as the value option that I explained for selection lists checked: if this is set then the box will already be checked when it is loaded So that's selection lists and checkboxes. How about a sample code: <html> This form doesn't do anything really, it's just a practice, check out the page at http://www.usheen.com/suite101/form.html Now you can practice by making your own sample pages. This article wasn't so short after all. I hope it didn't feel too disjointed - my brain is slightly tired at the moment. If you want you could read my other complete forms tutorial @ http://www.usheen.com/html/tut9.html
Please rate the article below
The copyright of the article Forms - part 2 in HTML Lessons is owned by Oisin Prendiville. Permission to republish Forms - part 2 in print or online must be granted by the author in writing.
Go To Page: 1 2 Articles in this Topic Discussions in this Topic |