Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML Forms – Interactive HTML – Web 2.0. HTML – New types for input – Degrades gracefully for browsers that do not support the html 5 input types www.w3schools.com/html/html_forms.asp.

Similar presentations


Presentation on theme: "HTML Forms – Interactive HTML – Web 2.0. HTML – New types for input – Degrades gracefully for browsers that do not support the html 5 input types www.w3schools.com/html/html_forms.asp."— Presentation transcript:

1 HTML Forms – Interactive HTML – Web 2.0

2 HTML – New types for input – Degrades gracefully for browsers that do not support the html 5 input types www.w3schools.com/html/html_forms.asp – Master the basics – For all others use a reference

3 Basics Form http://www.w3schools.com/tags/tag_form.asp http://www.w3schools.com/tags/tag_form.asp – … – A form can contain s such as text fields, checkboxes, radio-buttons, submit buttons – also lists,,,, and s Textbox http://www.w3schools.com/tags/tag_input.asp http://www.w3schools.com/tags/tag_input.asp – – short text input (word.. sentence) single-line input Textarea http://www.w3schools.com/tags/tag_textarea.asp http://www.w3schools.com/tags/tag_textarea.asp – – Can handle multi-line input, paragraph(s), memo

4 attributes Virtually everything needs a (unique) name attribute (there is an exception) – <form name=‘myform’ … – <input name=‘firstname’ … Needed to extract form data Value – <input value=‘initial’ … can be used to specify a default initial value on input elements

5 – type attribute specifies input method <input type=‘text’ renders a normal textbox <input type= ‘password’ renders a password field <input type= ‘radio’ renders a radio button – Use a common name value to group – Selecting one deselects others in the same group (same name) <input type=‘checkbox’ <input type=‘submit’ value=‘submit’ – Defines a submit button – Usually sends form data to server

6 New input types for html 5 – Color – Date – Email – Month – Number – Range – url – Week Unsupported types degrade to normal text fields

7 More Form elements Select (dropdown) list A B C Value attribute indicates what is sent to the server. Selected attribute can be used to set a default

8 Non-Essential Form Elements +


Download ppt "HTML Forms – Interactive HTML – Web 2.0. HTML – New types for input – Degrades gracefully for browsers that do not support the html 5 input types www.w3schools.com/html/html_forms.asp."

Similar presentations


Ads by Google