In the last article we learned:
- Some input fields in forms
- Important attributes to enhance input fields
The <select> Element
This defines the drop-down list in HTML form. Inside of <select> element each drop-down option is added using <option> element. If you want an option to be selected by default, then add selected attribute to it. You can also change a number of visible items instead of the default one by specifying size attribute in the <select> tag. To enable the user to add multiple options, use multiple attributes in the <select> tag. The user has to select multiple options using holding down Ctrl in Windows or Command in Mac.
The <textarea> Element
This defines multi-line input field that is text area. Following attributes are used:- rows : Visible number of lines in textarea
- cols : Visible width of the text area
That's all for forms and we have covered pretty much everything you will ever need in forms. I am stopping today on this and Tommorrow we will start with something new and interesting in HTML that you will surely love to add in your web pages to enhance them.
Till the #keepCoding.
Comments
Post a Comment