SlideShare a Scribd company logo
1 of 49
Web Forms 2.0 New form elements & Attributes in HTML5 Estelle Weyl www.Standardista.com@estellevw
HTML 4 <Input> Types button checkbox file hidden image password radio reset submit text <input type="…
<Input> Types New in HTML5 color date  datetime datetime-local  email  month  number  range  search tel time  url week
<Input> Attributes in HTML4  name   disabled*   type  maxlength readonly size  value   alt src  height  width  checked* align * CSS pseudoclasses
New <Input> Attributes in HTML5  form readonly autocomplete  autofocus   list   pattern   required   placeholder  multiple  list  min  max  step formaction formenctype formmethod formtarget formnovalidate
Other Form Elements New  <datalist>  <output>  <meter>  <progress>  <keygen> Old  <form>  <fieldset>  <legend>  <textarea>  <label>  <select>  <option>  <optgroup>* * Optgroups are nestable in HTML5
<p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName" type="text" /> </p>
Attribute Soup! <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p> http://standardista.com/webkit/ch4/input.html
<label> <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p>
Placeholder Attribute <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p> 4
Graceful Degredation $("input[placeholder]").each(function(){ if($(this).val()==""){     $(this).val($(this).attr("placeholder"));     $(this).focus(function(){ if($(this).val()==$(this).attr("placeholder")) $(this).val("");     });     $(this).blur(function(){ if($(this).val()==""){          $(this).val($(this).attr("placeholder"));       }      });   } }); // on submit ensure: $(this).val() != $(this).attr("placeholder"))
Pattern Attribute <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p>
Required Attribute <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p>
Graceful Degredation		Without Touching HTML! // use regExp from pattern to validate! // if has attribute required, can not be empty.
Targeting In CSS		Without Touching HTML! :default :valid :invalid :in-range :out-of-range :required :optional :read-only :read-write input[type=checkbox] input[required] input:not([required])
Autofocus Attribute <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p>
Type Attribute <p>       <label for="inputID">Label: </label>       <input id="inputID" name="inputName"   placeholder="placeholder text"   pattern="{6,9}"   required      autofocus  type="text" /> </p>
HTML 4 <Input> Types button- checkbox. file* hidden image. password. radio reset- submit text
13 New <Input> Types in HTML5 color  url tel email number range search  date  datetime datetime-local month  time week
color <input type="color" …>
Color on Blackberry Color: <input type="color" id="txtColor" value="#FF0000"/>
color <input type="color"  pattern="#[a-fA-F0-9]{6}" <input id="color" name="color" type="color"       placeholder="#FFFFFF"        pattern="#(?:[0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})"       required /> http://standardista.com/webkit/ch4/color.html
URL <input type="url" …>
URL <input id="url" name="url" type="url" placeholder="http://www.x.com" pattern="^http(s)?://.*" required /> http://standardista.com/webkit/ch4/url.html
Datalist
<p>     <label for="url">Web Address: </label>     <input id="url" name="url"	type="url"  		placeholder="http://www.domain.com"  		required   		list="mydatalist"/ > </p> <datalist id="mydatalist">     <option value="http://www.standardista.com"/> <option value="http://www.apress.com" /><option value="http://www.evotech.net" /> </datalist>   http://standardista.com/webkit/ch4/datalist.html
<datalist id="mydatalist">  <option value="http://www.standardista.com" label="standardista" /> <option value="http://www.apress.com" label="apress" /> <option value="http://www.evotech.net" label="Evotech"/> </datalist>   http://standardista.com/webkit/ch4/datalist.html
<p> <label for="url">Web Address:</label> 	<input id="url"  name="url"  		type="url"  		placeholder="http://www.domain.com" 		list="datalist" /> </p> <datalist id="datalist">   <label>or select one from the following list: <select name="url4">	 <option value="http://www.standardista.com" /> <option value="http://www.apress.com" /> <option value="http://www.evotech.net" />  </select> </label> </datalist> http://standardista.com/webkit/ch4/datalist.html
Phone Numbers <input type="tel" …>
Phone Numbers <input type="tel" …>
Phone Numbers <label for="tel">Telephone: </label> <input id="tel" type="tel" name="tel" placeholder="XXX-XXX-XXXX"   pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}"    required /> http://standardista.com/webkit/ch4/phone.html
Email Addresses <label for="email">Email: </label> <input id="email" name="email" type="email" placeholder="you@domain.com"  multiple    required /> http://standardista.com/webkit/ch4/email.html
Email Addresses http://standardista.com/webkit/ch4/email.html
Number  <input name="n" type="number"/>  min  max  step http://standardista.com/webkit/ch4/number.html
 <inputid="nickels" name="nickels"  type="number"  placeholder="0, 5, 10 &hellip;"  pattern="[0-9]*[05]"    min="0"    max="1000"    step="5"    required /> http://standardista.com/webkit/ch4/number.html safari
 <inputid="nickels" name="nickels"  type="number"  placeholder="0, 5, 10 &hellip;"  pattern="[0-9]*[05]"    min="0"    max="1000"    step="5"    required /> Because all presentations are better  with cats and unicorns http://standardista.com/webkit/ch4/number.html
http://standardista.com/webkit/ch4/number.html
Range <input id="range" name="range" type="range" placeholder="0 to 10" pattern="[0-9]|10" min="0" max="10" step="1" required /> http://standardista.com/webkit/ch4/range.html
Search <input id="search" name="search" type="search"   placeholder="search terms" required /> http://standardista.com/webkit/ch4/search.html
Date Time <Input> Types date 			2010-08-26 datetime 		2010-08-26 19:00 datetime-local	2010-08-26 19:00 month 			2010-08 time	19:00 week			2010-W34
Date Time <Input> Types date 			http://www.standardista.com/webkit/ch4/date.html datetimehttp://www.standardista.com/webkit/ch4/datetime.html datetime-localhttp://www.standardista.com/webkit/ch4/datetime-loca.html month 		http://www.standardista.com/webkit/ch4/month.html Timehttp://www.standardista.com/webkit/ch4/time.html weekhttp://www.standardista.com/webkit/ch4/month.html
Other Attributes Form Autofocus Autocomplete
Other Elements <meter> <progress> <keygen> <output>
Test Everything http://standardista.com/sandbox/html5formelements.html
Thanks @estellevw http://www.standardista.com http://evotech.net/blog
Credits Ma1974http://www.flickr.com/photos/ma1974/358477814/ Cornifyhttp://cornify.com

More Related Content

What's hot

html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attributePriyanka Rasal
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML FormNosheen Qamar
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML formsNadine Cruz
 
New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5Zahra Rezwana
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio videoSaad Sheikh
 
Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Roobon Habib
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Php Form
Php FormPhp Form
Php Formlotlot
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 formH K
 
html for beginners
html for beginnershtml for beginners
html for beginnersKIIZAPHILIP
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheetHARUN PEHLIVAN
 

What's hot (20)

HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html Guide
Html GuideHtml Guide
Html Guide
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML Form
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html form tag
Html form tagHtml form tag
Html form tag
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
 
New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
 
Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Fiverr html5 test answers 2020
Fiverr html5 test answers 2020
 
Web I - 04 - Forms
Web I - 04 - FormsWeb I - 04 - Forms
Web I - 04 - Forms
 
Html form
Html formHtml form
Html form
 
Html forms
Html formsHtml forms
Html forms
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Php Form
Php FormPhp Form
Php Form
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
 
5.1 html lec 5
5.1 html lec 55.1 html lec 5
5.1 html lec 5
 
html for beginners
html for beginnershtml for beginners
html for beginners
 
4.1 html lec 4
4.1 html lec 44.1 html lec 4
4.1 html lec 4
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheet
 

Viewers also liked

Web Forms The Right Way
Web Forms The Right WayWeb Forms The Right Way
Web Forms The Right WayIdo Green
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleEstelle Weyl
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentEstelle Weyl
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptJonathan Stark
 
AWS Summit Berlin 2012 Talk on Web Data Commons
AWS Summit Berlin 2012 Talk on Web Data CommonsAWS Summit Berlin 2012 Talk on Web Data Commons
AWS Summit Berlin 2012 Talk on Web Data CommonsHannes Mühleisen
 
Sistema de drenaje pleural
Sistema de drenaje pleuralSistema de drenaje pleural
Sistema de drenaje pleuralchentu
 
Aspiracion de secresiones en circuito cerrado
Aspiracion de secresiones en circuito cerradoAspiracion de secresiones en circuito cerrado
Aspiracion de secresiones en circuito cerradoRosario Vera
 
Aspiracion de secreciones
Aspiracion de secrecionesAspiracion de secreciones
Aspiracion de secrecionesRolando DoMu
 
Information Architecture On A Large Scale
Information Architecture On A Large ScaleInformation Architecture On A Large Scale
Information Architecture On A Large Scaledglazkov
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
2013 11 mobile eating the world
2013 11 mobile eating the world2013 11 mobile eating the world
2013 11 mobile eating the worldBenedict Evans
 
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujo
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo FlujoCuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujo
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujoguestf254dcbf
 
Oxigenoterapia
OxigenoterapiaOxigenoterapia
OxigenoterapiaNico Sitja
 
Web Form Design Best Practices
Web Form Design Best Practices Web Form Design Best Practices
Web Form Design Best Practices Luke Wroblewski
 
Aspiracion de secreciones
Aspiracion de secrecionesAspiracion de secreciones
Aspiracion de secrecionesDavid Manuel
 

Viewers also liked (20)

Web Forms The Right Way
Web Forms The Right WayWeb Forms The Right Way
Web Forms The Right Way
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at Google
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScript
 
AWS Summit Berlin 2012 Talk on Web Data Commons
AWS Summit Berlin 2012 Talk on Web Data CommonsAWS Summit Berlin 2012 Talk on Web Data Commons
AWS Summit Berlin 2012 Talk on Web Data Commons
 
Sello de agua y toracotomia
Sello de agua y toracotomia Sello de agua y toracotomia
Sello de agua y toracotomia
 
Sistema de drenaje pleural
Sistema de drenaje pleuralSistema de drenaje pleural
Sistema de drenaje pleural
 
Aspiracion de secresiones en circuito cerrado
Aspiracion de secresiones en circuito cerradoAspiracion de secresiones en circuito cerrado
Aspiracion de secresiones en circuito cerrado
 
Aspiracion de secreciones
Aspiracion de secrecionesAspiracion de secreciones
Aspiracion de secreciones
 
sello de agua
sello de aguasello de agua
sello de agua
 
Information Architecture On A Large Scale
Information Architecture On A Large ScaleInformation Architecture On A Large Scale
Information Architecture On A Large Scale
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
2013 11 mobile eating the world
2013 11 mobile eating the world2013 11 mobile eating the world
2013 11 mobile eating the world
 
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujo
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo FlujoCuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujo
Cuidado Enfermeria Oxigenoterapia Sistemas Alto Y Bajo Flujo
 
Exposicion Oxigenoterapia
Exposicion OxigenoterapiaExposicion Oxigenoterapia
Exposicion Oxigenoterapia
 
Oxigenoterapia
OxigenoterapiaOxigenoterapia
Oxigenoterapia
 
Oxigenoterapia
OxigenoterapiaOxigenoterapia
Oxigenoterapia
 
Web Form Design Best Practices
Web Form Design Best Practices Web Form Design Best Practices
Web Form Design Best Practices
 
Aspiracion Secreciones
Aspiracion SecrecionesAspiracion Secreciones
Aspiracion Secreciones
 
Aspiracion de secreciones
Aspiracion de secrecionesAspiracion de secreciones
Aspiracion de secreciones
 

Similar to HTML5 Web Forms

KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7phuphax
 
Quick Referance to WML
Quick Referance to WMLQuick Referance to WML
Quick Referance to WMLNitin Saswade
 
Forum Presentation
Forum PresentationForum Presentation
Forum PresentationAngus Pratt
 
Lecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITPLecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITPyucefmerhi
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0wangjiaz
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Securitymussawir20
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsAtlassian
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?goodfriday
 
Everything You Always Wanted To Know About XML But Were Afraid To Ask
Everything You Always Wanted To Know About XML But Were Afraid To AskEverything You Always Wanted To Know About XML But Were Afraid To Ask
Everything You Always Wanted To Know About XML But Were Afraid To AskRichard Davis
 
Grddl In A Nutshell V1
Grddl In A Nutshell V1Grddl In A Nutshell V1
Grddl In A Nutshell V1Fabien Gandon
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIsPamela Fox
 
From "Username and Password" to InfoCard
From "Username and Password" to InfoCardFrom "Username and Password" to InfoCard
From "Username and Password" to InfoCardgoodfriday
 
Terms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedTerms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedclintongormley
 

Similar to HTML5 Web Forms (20)

KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
 
Lecture3
Lecture3Lecture3
Lecture3
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
Quick Referance to WML
Quick Referance to WMLQuick Referance to WML
Quick Referance to WML
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
 
Lecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITPLecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITP
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
 
JQuery 101
JQuery 101JQuery 101
JQuery 101
 
ASP_NET Features
ASP_NET FeaturesASP_NET Features
ASP_NET Features
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Security
 
Zend framework 04 - forms
Zend framework 04 - formsZend framework 04 - forms
Zend framework 04 - forms
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial Gadgets
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
 
Everything You Always Wanted To Know About XML But Were Afraid To Ask
Everything You Always Wanted To Know About XML But Were Afraid To AskEverything You Always Wanted To Know About XML But Were Afraid To Ask
Everything You Always Wanted To Know About XML But Were Afraid To Ask
 
Grddl In A Nutshell V1
Grddl In A Nutshell V1Grddl In A Nutshell V1
Grddl In A Nutshell V1
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIs
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
From "Username and Password" to InfoCard
From "Username and Password" to InfoCardFrom "Username and Password" to InfoCard
From "Username and Password" to InfoCard
 
Terms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedTerms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explained
 

Recently uploaded

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

HTML5 Web Forms

  • 1. Web Forms 2.0 New form elements & Attributes in HTML5 Estelle Weyl www.Standardista.com@estellevw
  • 2.
  • 3. HTML 4 <Input> Types button checkbox file hidden image password radio reset submit text <input type="…
  • 4. <Input> Types New in HTML5 color date datetime datetime-local email month number range search tel time url week
  • 5. <Input> Attributes in HTML4 name disabled* type maxlength readonly size value alt src height width checked* align * CSS pseudoclasses
  • 6. New <Input> Attributes in HTML5 form readonly autocomplete autofocus list pattern required placeholder multiple list min max step formaction formenctype formmethod formtarget formnovalidate
  • 7. Other Form Elements New <datalist> <output> <meter> <progress> <keygen> Old <form> <fieldset> <legend> <textarea> <label> <select> <option> <optgroup>* * Optgroups are nestable in HTML5
  • 8. <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" type="text" /> </p>
  • 9. Attribute Soup! <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p> http://standardista.com/webkit/ch4/input.html
  • 10. <label> <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p>
  • 11. Placeholder Attribute <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p> 4
  • 12. Graceful Degredation $("input[placeholder]").each(function(){ if($(this).val()==""){ $(this).val($(this).attr("placeholder")); $(this).focus(function(){ if($(this).val()==$(this).attr("placeholder")) $(this).val(""); }); $(this).blur(function(){ if($(this).val()==""){ $(this).val($(this).attr("placeholder")); } }); } }); // on submit ensure: $(this).val() != $(this).attr("placeholder"))
  • 13. Pattern Attribute <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p>
  • 14. Required Attribute <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p>
  • 15. Graceful Degredation Without Touching HTML! // use regExp from pattern to validate! // if has attribute required, can not be empty.
  • 16. Targeting In CSS Without Touching HTML! :default :valid :invalid :in-range :out-of-range :required :optional :read-only :read-write input[type=checkbox] input[required] input:not([required])
  • 17. Autofocus Attribute <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p>
  • 18. Type Attribute <p> <label for="inputID">Label: </label> <input id="inputID" name="inputName" placeholder="placeholder text" pattern="{6,9}" required autofocus type="text" /> </p>
  • 19. HTML 4 <Input> Types button- checkbox. file* hidden image. password. radio reset- submit text
  • 20. 13 New <Input> Types in HTML5 color url tel email number range search date datetime datetime-local month time week
  • 22. Color on Blackberry Color: <input type="color" id="txtColor" value="#FF0000"/>
  • 23. color <input type="color" pattern="#[a-fA-F0-9]{6}" <input id="color" name="color" type="color" placeholder="#FFFFFF" pattern="#(?:[0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})" required /> http://standardista.com/webkit/ch4/color.html
  • 25. URL <input id="url" name="url" type="url" placeholder="http://www.x.com" pattern="^http(s)?://.*" required /> http://standardista.com/webkit/ch4/url.html
  • 27. <p> <label for="url">Web Address: </label> <input id="url" name="url" type="url" placeholder="http://www.domain.com" required list="mydatalist"/ > </p> <datalist id="mydatalist"> <option value="http://www.standardista.com"/> <option value="http://www.apress.com" /><option value="http://www.evotech.net" /> </datalist>   http://standardista.com/webkit/ch4/datalist.html
  • 28. <datalist id="mydatalist"> <option value="http://www.standardista.com" label="standardista" /> <option value="http://www.apress.com" label="apress" /> <option value="http://www.evotech.net" label="Evotech"/> </datalist>   http://standardista.com/webkit/ch4/datalist.html
  • 29. <p> <label for="url">Web Address:</label> <input id="url" name="url" type="url" placeholder="http://www.domain.com" list="datalist" /> </p> <datalist id="datalist"> <label>or select one from the following list: <select name="url4"> <option value="http://www.standardista.com" /> <option value="http://www.apress.com" /> <option value="http://www.evotech.net" /> </select> </label> </datalist> http://standardista.com/webkit/ch4/datalist.html
  • 30.
  • 31. Phone Numbers <input type="tel" …>
  • 32. Phone Numbers <input type="tel" …>
  • 33. Phone Numbers <label for="tel">Telephone: </label> <input id="tel" type="tel" name="tel" placeholder="XXX-XXX-XXXX" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" required /> http://standardista.com/webkit/ch4/phone.html
  • 34. Email Addresses <label for="email">Email: </label> <input id="email" name="email" type="email" placeholder="you@domain.com" multiple required /> http://standardista.com/webkit/ch4/email.html
  • 36. Number <input name="n" type="number"/> min max step http://standardista.com/webkit/ch4/number.html
  • 37. <inputid="nickels" name="nickels" type="number" placeholder="0, 5, 10 &hellip;" pattern="[0-9]*[05]" min="0" max="1000" step="5" required /> http://standardista.com/webkit/ch4/number.html safari
  • 38. <inputid="nickels" name="nickels" type="number" placeholder="0, 5, 10 &hellip;" pattern="[0-9]*[05]" min="0" max="1000" step="5" required /> Because all presentations are better with cats and unicorns http://standardista.com/webkit/ch4/number.html
  • 40. Range <input id="range" name="range" type="range" placeholder="0 to 10" pattern="[0-9]|10" min="0" max="10" step="1" required /> http://standardista.com/webkit/ch4/range.html
  • 41. Search <input id="search" name="search" type="search" placeholder="search terms" required /> http://standardista.com/webkit/ch4/search.html
  • 42. Date Time <Input> Types date 2010-08-26 datetime 2010-08-26 19:00 datetime-local 2010-08-26 19:00 month 2010-08 time 19:00 week 2010-W34
  • 43. Date Time <Input> Types date http://www.standardista.com/webkit/ch4/date.html datetimehttp://www.standardista.com/webkit/ch4/datetime.html datetime-localhttp://www.standardista.com/webkit/ch4/datetime-loca.html month http://www.standardista.com/webkit/ch4/month.html Timehttp://www.standardista.com/webkit/ch4/time.html weekhttp://www.standardista.com/webkit/ch4/month.html
  • 44.
  • 45. Other Attributes Form Autofocus Autocomplete
  • 46. Other Elements <meter> <progress> <keygen> <output>

Editor's Notes

  1. Stylizable
  2. Unchecked checkboxes are omitted from the data submitted by the form.   Might be worth clarifying that &quot;unchecked checkboxes are omitted from the data submitted by the form.&quot; This wording makes it sound like any unchecked checkbox prevents form data submission. It caught me off guard when I read that.File does not work on iPhone / iPod /iPadWhen using password, use post.Image = like sumbitButton = nothing -&gt; needs js to do anythingReset can lead to bad User experience
  3. Unchecked checkboxes are omitted from the data submitted by the form.   Might be worth clarifying that &quot;unchecked checkboxes are omitted from the data submitted by the form.&quot; This wording makes it sound like any unchecked checkbox prevents form data submission. It caught me off guard when I read that.File does not work on iPhone / iPod /iPadWhen using password, use post.Image = like sumbitButton = nothing -&gt; needs js to do anythingReset can lead to bad User experience
  4. Unchecked checkboxes are omitted from the data submitted by the form.   Might be worth clarifying that &quot;unchecked checkboxes are omitted from the data submitted by the form.&quot; This wording makes it sound like any unchecked checkbox prevents form data submission. It caught me off guard when I read that.File does not work on iPhone / iPod /iPadWhen using password, use post.Image = like sumbitButton = nothing -&gt; needs js to do anythingReset can lead to bad User experience
  5. Hexadecimal 6 char or keyword color only