1 / 8

HTML 5 Tutorial

HTML 5 Tutorial. Chapter 8 Form Elements. New Form Element. HTML5 has several new elements and attributes for forms. New form types : datalist keygen output. Browser Support. Browser support for the new input type :. datalist Element.

Download Presentation

HTML 5 Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML 5 Tutorial Chapter 8 Form Elements

  2. New Form Element HTML5 has several new elements and attributes for forms. New form types : datalist keygen output

  3. Browser Support Browser support for the new input type :

  4. datalist Element The datalist element specifies a list of options for an input field. The list is created with option elements inside the datalist. To bind a datalist to an input field, let the list attribute of the input field refer to the id of the datalist : Webpage: <input type="url" list="url_list" name="link" /><datalist id="url_list"><option label="W3Schools" value="http://www.w3schools.com" /><option label="Google" value="http://www.google.com" /><option label="Microsoft" value="http://www.microsoft.com" /></datalist>

  5. keygen Element The purpose of the keygen element is to provide a secure way to authenticate users. The keygen element is a key-pair generator. When a form is submitted, two keys are generated, one private and one public. The private key is stored on the client, and the public key is sent to the server. The public key could be used to generate a client certificate to authenticate the user in the future. Currently, the browser support for this element is not good enough to be a useful security standard.

  6. keygen Element Example : <form action="demo_form.asp" method="get">Username: <input type="text" name="usr_name" />Encryption: <keygen name="security" /><input type="submit" /></form>

  7. output Element The output element is used for different types of output, like calculations or script output. Example : <output id="result" onforminput="resCalc()"></output>

  8. Reference Hickson, I. (Eds.). (2011). HTML Living Standar. Retrieved from http://www.whatwg.org/specs/web-apps/current-work/multipage/ World Wide Web Consortium. (n.d.). HTML 5 Tutorial. Retrieved from http://www.w3schools.com/html5/default.asp

More Related