SlideShare a Scribd company logo
NEW FORM ELEMENTS,
ATTRIBUTES & TYPES
1/31/2015 1
Introduction
1/31/2015 2
 HTML5 web forms introduced new form elements, input types,
attributes ,and other features.
 Many features using in our interfaces: form validation, combo boxes,
placeholder text, and the like.
 Marking up forms easier on the developer, also better for the user.
Evaluation
Forms section of HTML5 was titled Web Forms 2.0 that added new types for
forms.
Started by Opera and edited by Opera employee Ian Hickson, was submitted
to the W3C in early 2005.
Combined with Web Applications 1.0 to create the basis of Web Hypertext
Application Technology Working Group (WHATWG) HTML5 specification.
1/31/2015 3
What are forms?
HTML forms are used to collect user input.
Html form contains form elements.
Example:
<form>
.
form elements
.
</form>
Now Lets look at:
HTML5 New Form Elements
HTML5 New Form Attributes
HTML5 New Element Types
1/31/2015 4
Criteria
HTML5 form element must be complete to the following criteria:
 It must include pleasant and working UI.
 able to use CSS to style the element, especially the UI that we generate.
 This includes any pre-defined pseudo-selectors (invalid, required, icon
etc.)
 It should be fully accessible.
1/31/2015 5
New Form Element
HTML5 added the following form elements:
1. <datalist>
2. <keygen>
3. <output>
1/31/2015 6
New Form Element
1. <datalist>
 The <datalist> element specifies a list of pre-defined options for an <input> element.
 The list is created with <option> elements inside the <datalist>
<form action=“demo.html” method=“get”>
Webpage: <input type=“url” list=“url_list” name=“link” />
<datalist id=“url_list”>
<option label=“W3School” value=http://www.w3schools.com />
<option label=“Googlel” value=http://www.google.com />
<option label=“Yahool” value=http://www.yahoo.com />
</datalist>
<input type=“submit”/>
</form>
1/31/2015 7
New Form Element
2. <keygen>
 The <keygen> Defines a key-pair key-pair generator field used for forms.
 When the form submitted, the private key is stored locally, and the public key is
sent to the server.
 The purpose of the <keygen> element is to provide a secure way to authenticate
users.
<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security">
<input type="submit">
</form>
1/31/2015 8
New Form Element
3. <output>
 The <output> tag represents the result of a calculation.
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
1/31/2015 9
Attributes of the <datalist> element
Attribute Description
contenteditable Specifies whether the content of an element is editable or
not
contextmenu Specifies a context menu for an element. The context menu
appears when a user right-clicks on the element.
hidden Specifies that an element is not yet, or is no longer, relevant.
draggable Specifies whether an element is draggable or not.
dropzone Specifies whether the dragged data is copied, moved, or linked,
when dropped
spellcheck Specifies whether the element is to have its spelling and
grammar checked or not.
Translate Specifies whether the content of an element should be
translated or not
1/31/2015 10
 Attribute: id
<form action="action_page.php">
<input list="browsers" name="browser">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
</datalist>
<input type="submit">
</form>
 Result:
Example
1/31/2015 11
Attributes of <keygen> element
1/31/2015 12
Attribute value Description
autofocus autofocu
s
Specifies that a <keygen> element
should automatically get focus when the
page loads
challenge challenge Specifies that the value of the <keygen>
element should be challenged when
submitted
disabled disabled Specifies that a <keygen> element
should be disabled
form form_id Specifies one or more forms the
<keygen> element belongs to
keytype rsa
dsa
ec
Specifies the security algorithm of the
key
name name Defines a name for the <keygen>
element
 Attribute: name
<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security" autofocus>
<input type="submit">
</form>
 "Encryption" field automatically get focus when the page loads:
 The autofocus attribute of the keygen tag is not supported in Firefox.
Example
1/31/2015 13
Attributes of the <output> element
Attribute Value Description
for element_id Specifies the relationship between the
result of the calculation, and the elements
used in the calculation
form form_id Specifies one or more forms the output
element belongs to
name name Specifies a name for the output element
1/31/2015 14
Example
 Attribute: form, name, for
<form action="demo_form.asp" id="numform"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" name="a" value="50">100
+<input type="number" id="b" name="b" value="50">
<br><br>
<input type="submit">
</form>
<output form="numform" name="x" for="a b"></output>
 Result:
 The form attribute of the output element is not supported in any of the major bowsers.
1/31/2015 15
HTML5 gives us input types that provide for more data-specific UI elements
and
native data validation. HTML5 has a total of 13 new input types:
1. search
2. email
3. url
4. tel
5. datetime
6. date
7. month
1/31/2015 16
Types of the <input> element
8. week
9. time
10. datetime-local
11. number
12. range
13. color
TYPE = SEARCH
 <input type> search
The search type is used for search fields
Search type is only supported in Chrome, Opera, and
safari.
Search Google: <input type="search" name="googlesearch" />
1/31/2015 17
TYPE = EMAIL
 <input type> email
The email type (type="email") is used for specifying one or more email
addresses.
Supports the Boolean multiple attribute, allowing for multiple,
comma-separated email addresses.
Only supported in Chrome, Opera, firefox and safari.
E-mail: <input type="email" name="usermail" />
1/31/2015 18
TYPE = URL
 <input type> url
The url type is used for input fields that should contain a URL address.
The value of the url field is automatically validated when the form is
submitted.
Search type is only supported in Chrome, Opera, firefox .
Add your homepage: <input type="url" name="homepage" />
1/31/2015 19
 <input type> tel
For telephone numbers, use the tel input type (type="tel").
Unlike the url and email types, tel type doesn’t enforce a particular
syntax or pattern.
Letters and numbers—indeed, any characters other than new lines or
carriage returns—are valid.
Telephone: <input type="tel" name="usrtel" />
1/31/2015 20
TYPE = TEL
TYPE = RANGE
 <input type> range
The range input type (type="range") displays a slider control in
browsers .
As with the number type, it allows the min, max, and step attributes.
Define a control for entering a number whose exact value is not
important
<label for="rating">On a scale of 1 to 10, my knowledge of HTML5
is:</label>
<input type="range" min="1" max="10" name="rating" type="range">
1/31/2015 21
TYPE = COLOR
 <input type> color
The color input type (type="color") provides the user with a color
picker.
Supported only in Opera
Select your favorite color: <input type="color" name="favcolor" />
1/31/2015 22
TYPE = KEYGEN
 <input type> keygen
The purpose of the <keygen> element provide a secure way to
authenticate users.
The <keygen> specifies key-pair generator field in a form.
When form submitted, two keys generated, one private and other
public.
<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption: <keygen name="security" />
<input type="submit" />
</form>
1/31/2015 23
TYPE = OUTPUT
 <input type> output
The <output> element represents the result of a calculation (like one
performed by a script).
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" name="a" value="50" />100
+<input type="number" name="b" value="50" />
=<output name="x" for="a b"></output>
</form>
1/31/2015 24
Browser Compatibility
1/31/2015 25
1/31/2015 26
Backward Compatibility
The <datalist> element is not supported in Internet
Explorer 9 (and earlier versions), or Safari.
The <keygen> element is not supported in Internet
Explorer.
The <output> element is not supported in Internet
Explorer.
1/31/2015 27
CONCLUSION
 HTML5 is still work in progress and not due to completely
roll out until the latter part of 2011.
 there is no urgency to redesign a Web site using the new
iteration of the language.
 Only a handful of major brands, including Mozilla Firefox
and Google Chrome, currently support HTML5 elements.
 Those companies’ browsers are only a small fraction of the
browsing populations.
 Microsoft’s Internet Explorer is the most widely used
browser and currently has the least amount of support for
HTML5.
1/31/2015 28
1/31/2015 29

More Related Content

What's hot

Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
Biswadip Goswami
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Ravinder Kamboj
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
Mindy McAdams
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Gil Fink
 
Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4
Naresh Sharma
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
Html form tag
Html form tagHtml form tag
Html form tag
shreyachougule
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
Himanshu Kumar
 
Html media
Html mediaHtml media
Html media
Webtech Learning
 
CSS
CSSCSS
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formattingeShikshak
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3Jamshid Hashimi
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
Kainat Ilyas
 

What's hot (20)

2. HTML forms
2. HTML forms2. HTML forms
2. HTML forms
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
 
Css
CssCss
Css
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Html form tag
Html form tagHtml form tag
Html form tag
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
Html media
Html mediaHtml media
Html media
 
CSS
CSSCSS
CSS
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
 

Viewers also liked

Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)
Anada Kale
 
Html tutorial.lesson10
Html tutorial.lesson10Html tutorial.lesson10
Html tutorial.lesson10
grassos
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
Design Strategy: The Rise of a New Culture
Design Strategy: The Rise of a New CultureDesign Strategy: The Rise of a New Culture
Design Strategy: The Rise of a New Culture
Payam Shalchian
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
Priyanka Rasal
 
HTML5 Form Validation
HTML5 Form ValidationHTML5 Form Validation
HTML5 Form Validation
Ian Oxley
 
Logo Design basics
Logo Design basicsLogo Design basics
Logo Design basicsGreg Sarles
 

Viewers also liked (7)

Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)
 
Html tutorial.lesson10
Html tutorial.lesson10Html tutorial.lesson10
Html tutorial.lesson10
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Design Strategy: The Rise of a New Culture
Design Strategy: The Rise of a New CultureDesign Strategy: The Rise of a New Culture
Design Strategy: The Rise of a New Culture
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
 
HTML5 Form Validation
HTML5 Form ValidationHTML5 Form Validation
HTML5 Form Validation
 
Logo Design basics
Logo Design basicsLogo Design basics
Logo Design basics
 

Similar to New Form Element in HTML5

Html5ppt
Html5pptHtml5ppt
Html5pptrecroup
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
vmmanikandan
 
Html forms
Html formsHtml forms
Html forms
eShikshak
 
CSS_Forms.pdf
CSS_Forms.pdfCSS_Forms.pdf
CSS_Forms.pdf
gunjansingh599205
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html formsCK Yang
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html formsCK Yang
 
Chapter9
Chapter9Chapter9
Chapter9
DeAnna Gossett
 
Form using html and java script validation
Form using html and java script validationForm using html and java script validation
Form using html and java script validation
Maitree Patel
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Nisa Soomro
 
Web Design Lecture 4.pptx
Web Design Lecture 4.pptxWeb Design Lecture 4.pptx
Web Design Lecture 4.pptx
MohammedNoor74
 
Chapter 9 - Web Design
Chapter 9 - Web DesignChapter 9 - Web Design
Chapter 9 - Web Design
tclanton4
 
HTML and CSS part 2
HTML and CSS part 2HTML and CSS part 2
HTML and CSS part 2
Julie Iskander
 
Php forms
Php formsPhp forms
Php forms
Anne Lee
 
Javascript dom
Javascript domJavascript dom
Javascript dom
Muthuganesh S
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
www.netgains.org
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
Timothy Fisher
 

Similar to New Form Element in HTML5 (20)

Html5ppt
Html5pptHtml5ppt
Html5ppt
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Html forms
Html formsHtml forms
Html forms
 
Chapter09
Chapter09Chapter09
Chapter09
 
CSS_Forms.pdf
CSS_Forms.pdfCSS_Forms.pdf
CSS_Forms.pdf
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html forms
 
Html forms
Html formsHtml forms
Html forms
 
Chapter9
Chapter9Chapter9
Chapter9
 
Form using html and java script validation
Form using html and java script validationForm using html and java script validation
Form using html and java script validation
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Web Design Lecture 4.pptx
Web Design Lecture 4.pptxWeb Design Lecture 4.pptx
Web Design Lecture 4.pptx
 
Chapter 9 - Web Design
Chapter 9 - Web DesignChapter 9 - Web Design
Chapter 9 - Web Design
 
HTML and CSS part 2
HTML and CSS part 2HTML and CSS part 2
HTML and CSS part 2
 
Php forms
Php formsPhp forms
Php forms
 
Javascript dom
Javascript domJavascript dom
Javascript dom
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 

New Form Element in HTML5

  • 1. NEW FORM ELEMENTS, ATTRIBUTES & TYPES 1/31/2015 1
  • 2. Introduction 1/31/2015 2  HTML5 web forms introduced new form elements, input types, attributes ,and other features.  Many features using in our interfaces: form validation, combo boxes, placeholder text, and the like.  Marking up forms easier on the developer, also better for the user.
  • 3. Evaluation Forms section of HTML5 was titled Web Forms 2.0 that added new types for forms. Started by Opera and edited by Opera employee Ian Hickson, was submitted to the W3C in early 2005. Combined with Web Applications 1.0 to create the basis of Web Hypertext Application Technology Working Group (WHATWG) HTML5 specification. 1/31/2015 3
  • 4. What are forms? HTML forms are used to collect user input. Html form contains form elements. Example: <form> . form elements . </form> Now Lets look at: HTML5 New Form Elements HTML5 New Form Attributes HTML5 New Element Types 1/31/2015 4
  • 5. Criteria HTML5 form element must be complete to the following criteria:  It must include pleasant and working UI.  able to use CSS to style the element, especially the UI that we generate.  This includes any pre-defined pseudo-selectors (invalid, required, icon etc.)  It should be fully accessible. 1/31/2015 5
  • 6. New Form Element HTML5 added the following form elements: 1. <datalist> 2. <keygen> 3. <output> 1/31/2015 6
  • 7. New Form Element 1. <datalist>  The <datalist> element specifies a list of pre-defined options for an <input> element.  The list is created with <option> elements inside the <datalist> <form action=“demo.html” method=“get”> Webpage: <input type=“url” list=“url_list” name=“link” /> <datalist id=“url_list”> <option label=“W3School” value=http://www.w3schools.com /> <option label=“Googlel” value=http://www.google.com /> <option label=“Yahool” value=http://www.yahoo.com /> </datalist> <input type=“submit”/> </form> 1/31/2015 7
  • 8. New Form Element 2. <keygen>  The <keygen> Defines a key-pair key-pair generator field used for forms.  When the form submitted, the private key is stored locally, and the public key is sent to the server.  The purpose of the <keygen> element is to provide a secure way to authenticate users. <form action="demo_keygen.asp" method="get"> Username: <input type="text" name="usr_name"> Encryption: <keygen name="security"> <input type="submit"> </form> 1/31/2015 8
  • 9. New Form Element 3. <output>  The <output> tag represents the result of a calculation. <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 <input type="range" id="a" value="50">100 +<input type="number" id="b" value="50"> =<output name="x" for="a b"></output> </form> 1/31/2015 9
  • 10. Attributes of the <datalist> element Attribute Description contenteditable Specifies whether the content of an element is editable or not contextmenu Specifies a context menu for an element. The context menu appears when a user right-clicks on the element. hidden Specifies that an element is not yet, or is no longer, relevant. draggable Specifies whether an element is draggable or not. dropzone Specifies whether the dragged data is copied, moved, or linked, when dropped spellcheck Specifies whether the element is to have its spelling and grammar checked or not. Translate Specifies whether the content of an element should be translated or not 1/31/2015 10
  • 11.  Attribute: id <form action="action_page.php"> <input list="browsers" name="browser"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> </datalist> <input type="submit"> </form>  Result: Example 1/31/2015 11
  • 12. Attributes of <keygen> element 1/31/2015 12 Attribute value Description autofocus autofocu s Specifies that a <keygen> element should automatically get focus when the page loads challenge challenge Specifies that the value of the <keygen> element should be challenged when submitted disabled disabled Specifies that a <keygen> element should be disabled form form_id Specifies one or more forms the <keygen> element belongs to keytype rsa dsa ec Specifies the security algorithm of the key name name Defines a name for the <keygen> element
  • 13.  Attribute: name <form action="demo_keygen.asp" method="get"> Username: <input type="text" name="usr_name"> Encryption: <keygen name="security" autofocus> <input type="submit"> </form>  "Encryption" field automatically get focus when the page loads:  The autofocus attribute of the keygen tag is not supported in Firefox. Example 1/31/2015 13
  • 14. Attributes of the <output> element Attribute Value Description for element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation form form_id Specifies one or more forms the output element belongs to name name Specifies a name for the output element 1/31/2015 14
  • 15. Example  Attribute: form, name, for <form action="demo_form.asp" id="numform" oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 <input type="range" id="a" name="a" value="50">100 +<input type="number" id="b" name="b" value="50"> <br><br> <input type="submit"> </form> <output form="numform" name="x" for="a b"></output>  Result:  The form attribute of the output element is not supported in any of the major bowsers. 1/31/2015 15
  • 16. HTML5 gives us input types that provide for more data-specific UI elements and native data validation. HTML5 has a total of 13 new input types: 1. search 2. email 3. url 4. tel 5. datetime 6. date 7. month 1/31/2015 16 Types of the <input> element 8. week 9. time 10. datetime-local 11. number 12. range 13. color
  • 17. TYPE = SEARCH  <input type> search The search type is used for search fields Search type is only supported in Chrome, Opera, and safari. Search Google: <input type="search" name="googlesearch" /> 1/31/2015 17
  • 18. TYPE = EMAIL  <input type> email The email type (type="email") is used for specifying one or more email addresses. Supports the Boolean multiple attribute, allowing for multiple, comma-separated email addresses. Only supported in Chrome, Opera, firefox and safari. E-mail: <input type="email" name="usermail" /> 1/31/2015 18
  • 19. TYPE = URL  <input type> url The url type is used for input fields that should contain a URL address. The value of the url field is automatically validated when the form is submitted. Search type is only supported in Chrome, Opera, firefox . Add your homepage: <input type="url" name="homepage" /> 1/31/2015 19
  • 20.  <input type> tel For telephone numbers, use the tel input type (type="tel"). Unlike the url and email types, tel type doesn’t enforce a particular syntax or pattern. Letters and numbers—indeed, any characters other than new lines or carriage returns—are valid. Telephone: <input type="tel" name="usrtel" /> 1/31/2015 20 TYPE = TEL
  • 21. TYPE = RANGE  <input type> range The range input type (type="range") displays a slider control in browsers . As with the number type, it allows the min, max, and step attributes. Define a control for entering a number whose exact value is not important <label for="rating">On a scale of 1 to 10, my knowledge of HTML5 is:</label> <input type="range" min="1" max="10" name="rating" type="range"> 1/31/2015 21
  • 22. TYPE = COLOR  <input type> color The color input type (type="color") provides the user with a color picker. Supported only in Opera Select your favorite color: <input type="color" name="favcolor" /> 1/31/2015 22
  • 23. TYPE = KEYGEN  <input type> keygen The purpose of the <keygen> element provide a secure way to authenticate users. The <keygen> specifies key-pair generator field in a form. When form submitted, two keys generated, one private and other public. <form action="demo_keygen.asp" method="get"> Username: <input type="text" name="usr_name" /> Encryption: <keygen name="security" /> <input type="submit" /> </form> 1/31/2015 23
  • 24. TYPE = OUTPUT  <input type> output The <output> element represents the result of a calculation (like one performed by a script). <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 <input type="range" name="a" value="50" />100 +<input type="number" name="b" value="50" /> =<output name="x" for="a b"></output> </form> 1/31/2015 24
  • 27. Backward Compatibility The <datalist> element is not supported in Internet Explorer 9 (and earlier versions), or Safari. The <keygen> element is not supported in Internet Explorer. The <output> element is not supported in Internet Explorer. 1/31/2015 27
  • 28. CONCLUSION  HTML5 is still work in progress and not due to completely roll out until the latter part of 2011.  there is no urgency to redesign a Web site using the new iteration of the language.  Only a handful of major brands, including Mozilla Firefox and Google Chrome, currently support HTML5 elements.  Those companies’ browsers are only a small fraction of the browsing populations.  Microsoft’s Internet Explorer is the most widely used browser and currently has the least amount of support for HTML5. 1/31/2015 28