– Allows a short hint to be displayed inside. the form element[r]
Trang 11
Trang 22
Trang 33
Trang 4Creating forms in HTML
• Textbox
• Password Field
• Hidden Field
• Checkbox
• Radio Button
• Text Area
• Select List
• Submit Button
• Reset Button
4
Trang 5• HTML5 enhancements in form
5
Trang 6• HTML5 enhances the forms in two
ways
6
Trang 7• Required attribute:
– tells the browser to only submit the form if the field in question is filled out
provided by the user
required >
7
Trang 8Input type Required attribute
Trang 9Error message
Trang 10• Placeholder attribute:
– Allows a short hint to be displayed inside the form element
– tell the user what data should be entered
in that field
10