SlideShare une entreprise Scribd logo
1  sur  53
nisa1207@gmail.com 
Prog_nisa@quest.edu.pk
HTML Marquees 
How forms work 
The form element 
POST versus GET 
Variables and values 
Form controls 
Form accessibility features 
2
An HTML marquee is a scrolling piece of text displayed 
either horizontally across or vertically down your webpage 
depending on the settings. This is created by using HTML 
<marquees> tag. 
3
Syntax 
A simple syntax to use HTML <marquee> tag is as follows: 
<marquee attribute_name="attribute_value"....more attributes> 
One or more lines or text message or image 
</marquee> 
4
Attribute Description 
width This specifies the width of the marquee. This can be a value 
like 10 or 20% etc. 
height This specifies the height of the marquee. This can be a value 
like 10 or 20% etc. 
direction This specifies the direction in which marquee should scroll. 
This can be a value like up, down, left or right. 
behavior This specifies the type of scrolling of the marquee. This can 
have a value like scroll, slide and alternate. 
scrolldelay This specifies how long to delay between each jump. This will 
have a value like 10 etc. 
5
Attribute Description 
scrollamount This specifies the speed of marquee text. This can have a 
value like 10 etc. 
loop This specifies how many times to loop. The default value is 
INFINITE, which means that the marquee loops endlessly. 
bgcolor This specifies background color in terms of color name or 
color hex value. 
hspace This specifies horizontal space around the marquee. This 
can be a value like 10 or 20% etc. 
vspace This specifies vertical space around the marquee. This can 
be a value like 10 or 20% etc. 
6
<!DOCTYPE html> 
<html> 
<head> 
<title>HTML marquee Tag</title> 
</head> 
<body> 
<marquee>This is basic example of marquee</marquee> 
</body> 
</html> 
7
8
There are two parts to a working form. The first part is the 
form that you see on the page itself that is created using 
HTML markup. Forms are made up of buttons, input fields, 
and drop-down menus (collectively known as form controls) 
used to collect information from the user. Forms may also 
contain text and other elements. 
9
The other component of a web form is an application or 
script on the server that processes the information collected 
by the form and returns an appropriate response. It’s what 
makes the form work. In other words, posting an HTML 
document with form elements isn’t enough. Web 
applications and scripts require programming. 
10
11
12
13
<form>...</form> :Interactive form 
Forms are added to web pages using (no surprise 
here) the form element. The form element is a 
container for all the content of the form, including 
some number of form controls, such as text entry 
fields and buttons. It may also contain block 
elements (h1, p, and lists, for example). However, it 
may not contain another form element. 
14
HTML Forms are used to select different kinds of user input. 
HTML forms are used to pass data to a server. 
An HTML form can contain input elements like text fields, 
checkboxes, radio-buttons, submit buttons and more. 
A form can also contain select lists, textarea, fieldset, legend, 
and label elements. 
 The <form> tag is used to create an HTML form: 
<form> 
. 
input elements 
. 
</form> 15
The HTML <form> tag is used to create an HTML form and it 
has following syntax: 
<form action="Script URL" method="GET|POST"> 
form elements like input, textarea etc. 
</form> 
16
Attribute Description 
action Backend script ready to process your passed data. 
method Method to be used to upload data. The most frequently used are GET 
and POST methods. 
target Specify the target window or frame where the result of the script will be 
displayed. It takes values like _blank, _self, _parent etc. 
enctype You can use the enctype attribute to specify how the browser encodes the 
data before it sends it to the server. Possible values are: 
•application/x-www-form-urlencoded - This is the standard method most 
forms use in simple scenarios. 
•mutlipart/form-data - This is used when you want to upload binary data 
in the form of files like image, word file etc. 
17
18 
Text Input Controls 
Checkboxes Controls 
Radio Box Controls 
Select Box Controls 
File Select boxes 
Hidden Controls 
Clickable Buttons 
Submit and Reset Button
The <input> element is used to select user 
information. 
An <input> element can vary in many ways, 
depending on the type attribute. 
An <input> element can be of type text field, 
checkbox, password, radio button, submit button, 
and more. 
19
There are three types of text input used on forms: 
Single-line text input controls - This control is used for items 
that require only one line of user input, such as search boxes or 
names. They are created using HTML <input> tag. 
Password input controls - This is also a single-line text input but 
it masks the character as soon as a user enters it. They are also 
created using HTMl <input> tag. 
Multi-line text input controls - This is used when the user is 
required to give details that may be longer than a single 
sentence. Multi-line input controls are created using 
HTML <textarea> tag. 20
21
defines a one-line input field that a user can enter text into: 
 <form> 
First name: <input type="text" name="firstname"> <br /> 
Last name: <input type="text" name="lastname"> 
</form> 
22
Attribute Description 
type Indicates the type of input control and for text 
input control it will be set to text. 
name Used to give a name to the control which is sent to 
the server to be recognized and get the value. 
value This can be used to provide an initial value inside 
the control. 
size Allows to specify the width of the text-input control 
in terms of characters. 
maxlength Allows to specify the maximum number of 
characters a user can enter into the text box. 23
Defines a password field: 
<form> 
Password: <input type="password" name="pwd"> 
</form> 
Note: The characters in a password field are masked (shown 
as asterisks or circles). 
24
Attribute Description 
type Indicates the type of input control and for password input 
control it will be set to password. 
name Used to give a name to the control which is sent to the 
server to be recognized and get the value. 
value This can be used to provide an initial value inside the 
control. 
size Allows to specify the width of the text-input control in 
terms of characters. 
maxlength Allows to specify the maximum number of characters a 
user can enter into the text box. 
25
The <textarea> tag defines a multi-line text input control. 
A text area can hold an unlimited number of characters, and 
the text renders in a fixed-width font (usually Courier). 
The size of a text area can be specified by the cols and rows 
attributes. 
26
27
28 
<textarea cols="20" rows="5"> </textarea>
<input type="radio"> defines a radio button. Radio buttons let a user 
select ONLY ONE of a limited number of choices: 
<form> 
<input type="radio" name="choice" value="yes“ checked="checked“> 
Yes <br /> 
<input type="radio" name="choice" value="no">No </form> 
Checked attributed defines that control is preselected when page load. 
29
30
Attribute Description 
type Indicates the type of input control and for checkbox input 
control it will be set to radio. 
name Used to give a name to the control which is sent to the 
server to be recognized and get the value. 
value The value that will be used if the radio box is selected. 
checked Set to checked if you want to select it by default. 
31
defines a checkbox. Checkboxes let a user select ZERO or 
MORE options of a limited number of choices. 
<form> 
<input type="checkbox" name="vehicle" value="Bike">I have 
a bike<br /> 
<input type="checkbox" name="vehicle" value="Car">I have 
a car 
</form> 
32
33
Attribute Description 
type Indicates the type of input control and for checkbox input 
control it will be set to checkbox. 
name Used to give a name to the control which is sent to the 
server to be recognized and get the value. 
value The value that will be used if the checkbox is selected. 
checked Set to checked if you want to select it by default. 
34
The <select> element is used to create a drop-down 
list. 
The <option> tags inside the <select> element define 
the available options in the list. 
Tip: The <select> element is a form control and can be 
used in a form to collect user input. 
35
<select> 
<option> Web Engineering</option> 
<option> Computer Programming</option> 
<option> Fundamentals of Algorithms</option> 
<option> Analysis of Algorithms</option> 
</select> 
36
37
38
<select multiple> 
<option> Web Engineering</option> 
<option> Computer Programming</option> 
<option> Fundamentals of Algorithms</option> 
<option> Analysis of Algorithms</option> 
</select> 
39
Attribute Description 
name Used to give a name to the control which is sent 
to the server to be recognized and get the value. 
size This can be used to present a scrolling list box. 
multiple If set to "multiple" then allows a user to select 
multiple items from the menu. 
40 
Following is the list of important attributes of <select> tag:
41 
Following is the list of important attributes of <option> tag: 
Attribute Description 
value The value that will be used if an option in the 
select box is selected. 
selected Specifies that this option should be the initially 
selected value when the page loads. 
label An alternative way of labeling options
If you want to allow a user to upload a file to your web site, 
you will need to use a file upload box, also known as a file 
select box. This is also created using the <input> element 
but type attribute is set to file. 
42 
Attribute Description 
name Used to give a name to the control which is sent to the 
server to be recognized and get the value. 
accept Specifies the types of files that the server accepts.
<form> 
<input type="file" name="fileupload" accept="image/*" /> 
</form> 
43
There are various ways in HTML to create clickable 
buttons. You can also create a clickable button using 
<input> tag by setting its type attribute to button. The type 
attribute can take the following values: 
44 
Type Description 
submit This creates a button that automatically submits a form. 
reset This creates a button that automatically resets form controls 
to their initial values. 
button This creates a button that is used to trigger a client-side script 
when the user clicks that button. 
image This creates a clickable button but we can use an image as 
background of the button.
defines a submit button. A submit button is used to send form 
data to a server. The data is sent to the page specified in the 
form's action attribute. The file defined in the action attribute 
usually does something with the received input: 
<form name=“applicationData" action="html_form_action.php" 
method="get"> 
Username: <input type="text" name="user"> 
<input type="submit" value="Submit"> 
</form> 
45
46
Button used to clear all the field of form in which reset button 
defined. 
<form name=" applicationData" action="html_form_action.php" 
<input type="reset" value="Clear"> 
</form> 
47
defines a button 
<form> 
<input type="button" value="clickMe" /> 
</form> 
48
<input type="image" name="Imagebutton" src="logo.png" /> 
49
The <button> tag defines a clickable button. 
 Inside a <button> element you can put content, like text or 
images. This is the difference between this element and 
buttons created with the <input> element. 
Tip: Always specify the type attribute for a <button> element. 
Different browsers use different default types for the <button> 
element. 
<button>Click Me</button> 
50
Hidden form controls are used to hide data inside the page 
which later on can be pushed to the server. This control 
hides inside the code and does not appear on the actual 
page. For example, following hidden form is being used to 
keep current page number. When a user will click next page 
then the value of hidden control will be sent to the web 
server and there it will decide which page has be displayed 
next based on the passed current page. 
51
<form> 
<p>This is page 10</p> 
<input type="hidden" name="pagename" value="10" /> 
<input type="submit" name="submit" value="Submit" /> 
<input type="reset" name="reset" value="Reset" /> 
</form> 
52
 http://www.tutorialspoint.com/html/html_forms.htm 
 http://www.tutorialspoint.com/html/html_marquees.htm 
53

Contenu connexe

Tendances

Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
eShikshak
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
Varun C M
 

Tendances (20)

Html form tag
Html form tagHtml form tag
Html form tag
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
HTML Text formatting tags
HTML Text formatting tagsHTML Text formatting tags
HTML Text formatting tags
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Html forms
Html formsHtml forms
Html forms
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
Html forms
Html formsHtml forms
Html forms
 
Form Validation in JavaScript
Form Validation in JavaScriptForm Validation in JavaScript
Form Validation in JavaScript
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 

En vedette

Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Doncho Minkov
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
club23
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPC
Mayflower GmbH
 
Alphorm.com Support de la Formation PHP MySQL
Alphorm.com Support de la Formation PHP MySQLAlphorm.com Support de la Formation PHP MySQL
Alphorm.com Support de la Formation PHP MySQL
Alphorm
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
vikasgaur31
 

En vedette (20)

Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
 
PHP & MySQL 教學
PHP & MySQL 教學PHP & MySQL 教學
PHP & MySQL 教學
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Gears and HTML 5 @media Ajax London 2008
Gears and HTML 5 @media Ajax London 2008Gears and HTML 5 @media Ajax London 2008
Gears and HTML 5 @media Ajax London 2008
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
PHP Summer Training Presentation
PHP Summer Training PresentationPHP Summer Training Presentation
PHP Summer Training Presentation
 
MySQL
MySQLMySQL
MySQL
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQL
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPC
 
PHP Project PPT
PHP Project PPTPHP Project PPT
PHP Project PPT
 
Alphorm.com Support de la Formation PHP MySQL
Alphorm.com Support de la Formation PHP MySQLAlphorm.com Support de la Formation PHP MySQL
Alphorm.com Support de la Formation PHP MySQL
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 

Similaire à HTML Forms

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 Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6Html Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6
larsonsb
 
Html5ppt
Html5pptHtml5ppt
Html5ppt
recroup
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
CK Yang
 

Similaire à HTML Forms (20)

Html form
Html formHtml form
Html form
 
Html forms
Html formsHtml forms
Html forms
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
 
CSS_Forms.pdf
CSS_Forms.pdfCSS_Forms.pdf
CSS_Forms.pdf
 
HTML - FORMS.pptx
HTML - FORMS.pptxHTML - FORMS.pptx
HTML - FORMS.pptx
 
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
 
Chapter09
Chapter09Chapter09
Chapter09
 
HTML-Forms
HTML-FormsHTML-Forms
HTML-Forms
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
 
Html Tutorial
Html TutorialHtml Tutorial
Html Tutorial
 
Web(chap2)
Web(chap2)Web(chap2)
Web(chap2)
 
Tut 06 (forms)
Tut 06 (forms)Tut 06 (forms)
Tut 06 (forms)
 
331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheet331592291-HTML-and-Cascading style sheet
331592291-HTML-and-Cascading style sheet
 
Forms with html5
Forms with html5Forms with html5
Forms with html5
 
Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Html Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6Html Xhtml And Xml 3e Tutorial 6
Html Xhtml And Xml 3e Tutorial 6
 
Html5ppt
Html5pptHtml5ppt
Html5ppt
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
 

Plus de Nisa Soomro (17)

PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
 
Connecting to my sql using PHP
Connecting to my sql using PHPConnecting to my sql using PHP
Connecting to my sql using PHP
 
Basic of PHP
Basic of PHPBasic of PHP
Basic of PHP
 
PHP Filing
PHP Filing PHP Filing
PHP Filing
 
Html5
Html5Html5
Html5
 
HTML Basic Tags
HTML Basic Tags HTML Basic Tags
HTML Basic Tags
 
HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
 
HTML Images
HTML Images HTML Images
HTML Images
 
HTML Lists & Llinks
HTML Lists & LlinksHTML Lists & Llinks
HTML Lists & Llinks
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
Html5 SVG
Html5 SVGHtml5 SVG
Html5 SVG
 
Html5 Canvas Detail
Html5 Canvas DetailHtml5 Canvas Detail
Html5 Canvas Detail
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
 
Html5
Html5Html5
Html5
 
Html
HtmlHtml
Html
 
Web programming lec#3
Web programming lec#3Web programming lec#3
Web programming lec#3
 

Dernier

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 

Dernier (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 

HTML Forms

  • 2. HTML Marquees How forms work The form element POST versus GET Variables and values Form controls Form accessibility features 2
  • 3. An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag. 3
  • 4. Syntax A simple syntax to use HTML <marquee> tag is as follows: <marquee attribute_name="attribute_value"....more attributes> One or more lines or text message or image </marquee> 4
  • 5. Attribute Description width This specifies the width of the marquee. This can be a value like 10 or 20% etc. height This specifies the height of the marquee. This can be a value like 10 or 20% etc. direction This specifies the direction in which marquee should scroll. This can be a value like up, down, left or right. behavior This specifies the type of scrolling of the marquee. This can have a value like scroll, slide and alternate. scrolldelay This specifies how long to delay between each jump. This will have a value like 10 etc. 5
  • 6. Attribute Description scrollamount This specifies the speed of marquee text. This can have a value like 10 etc. loop This specifies how many times to loop. The default value is INFINITE, which means that the marquee loops endlessly. bgcolor This specifies background color in terms of color name or color hex value. hspace This specifies horizontal space around the marquee. This can be a value like 10 or 20% etc. vspace This specifies vertical space around the marquee. This can be a value like 10 or 20% etc. 6
  • 7. <!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee>This is basic example of marquee</marquee> </body> </html> 7
  • 8. 8
  • 9. There are two parts to a working form. The first part is the form that you see on the page itself that is created using HTML markup. Forms are made up of buttons, input fields, and drop-down menus (collectively known as form controls) used to collect information from the user. Forms may also contain text and other elements. 9
  • 10. The other component of a web form is an application or script on the server that processes the information collected by the form and returns an appropriate response. It’s what makes the form work. In other words, posting an HTML document with form elements isn’t enough. Web applications and scripts require programming. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. <form>...</form> :Interactive form Forms are added to web pages using (no surprise here) the form element. The form element is a container for all the content of the form, including some number of form controls, such as text entry fields and buttons. It may also contain block elements (h1, p, and lists, for example). However, it may not contain another form element. 14
  • 15. HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements.  The <form> tag is used to create an HTML form: <form> . input elements . </form> 15
  • 16. The HTML <form> tag is used to create an HTML form and it has following syntax: <form action="Script URL" method="GET|POST"> form elements like input, textarea etc. </form> 16
  • 17. Attribute Description action Backend script ready to process your passed data. method Method to be used to upload data. The most frequently used are GET and POST methods. target Specify the target window or frame where the result of the script will be displayed. It takes values like _blank, _self, _parent etc. enctype You can use the enctype attribute to specify how the browser encodes the data before it sends it to the server. Possible values are: •application/x-www-form-urlencoded - This is the standard method most forms use in simple scenarios. •mutlipart/form-data - This is used when you want to upload binary data in the form of files like image, word file etc. 17
  • 18. 18 Text Input Controls Checkboxes Controls Radio Box Controls Select Box Controls File Select boxes Hidden Controls Clickable Buttons Submit and Reset Button
  • 19. The <input> element is used to select user information. An <input> element can vary in many ways, depending on the type attribute. An <input> element can be of type text field, checkbox, password, radio button, submit button, and more. 19
  • 20. There are three types of text input used on forms: Single-line text input controls - This control is used for items that require only one line of user input, such as search boxes or names. They are created using HTML <input> tag. Password input controls - This is also a single-line text input but it masks the character as soon as a user enters it. They are also created using HTMl <input> tag. Multi-line text input controls - This is used when the user is required to give details that may be longer than a single sentence. Multi-line input controls are created using HTML <textarea> tag. 20
  • 21. 21
  • 22. defines a one-line input field that a user can enter text into:  <form> First name: <input type="text" name="firstname"> <br /> Last name: <input type="text" name="lastname"> </form> 22
  • 23. Attribute Description type Indicates the type of input control and for text input control it will be set to text. name Used to give a name to the control which is sent to the server to be recognized and get the value. value This can be used to provide an initial value inside the control. size Allows to specify the width of the text-input control in terms of characters. maxlength Allows to specify the maximum number of characters a user can enter into the text box. 23
  • 24. Defines a password field: <form> Password: <input type="password" name="pwd"> </form> Note: The characters in a password field are masked (shown as asterisks or circles). 24
  • 25. Attribute Description type Indicates the type of input control and for password input control it will be set to password. name Used to give a name to the control which is sent to the server to be recognized and get the value. value This can be used to provide an initial value inside the control. size Allows to specify the width of the text-input control in terms of characters. maxlength Allows to specify the maximum number of characters a user can enter into the text box. 25
  • 26. The <textarea> tag defines a multi-line text input control. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). The size of a text area can be specified by the cols and rows attributes. 26
  • 27. 27
  • 28. 28 <textarea cols="20" rows="5"> </textarea>
  • 29. <input type="radio"> defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of choices: <form> <input type="radio" name="choice" value="yes“ checked="checked“> Yes <br /> <input type="radio" name="choice" value="no">No </form> Checked attributed defines that control is preselected when page load. 29
  • 30. 30
  • 31. Attribute Description type Indicates the type of input control and for checkbox input control it will be set to radio. name Used to give a name to the control which is sent to the server to be recognized and get the value. value The value that will be used if the radio box is selected. checked Set to checked if you want to select it by default. 31
  • 32. defines a checkbox. Checkboxes let a user select ZERO or MORE options of a limited number of choices. <form> <input type="checkbox" name="vehicle" value="Bike">I have a bike<br /> <input type="checkbox" name="vehicle" value="Car">I have a car </form> 32
  • 33. 33
  • 34. Attribute Description type Indicates the type of input control and for checkbox input control it will be set to checkbox. name Used to give a name to the control which is sent to the server to be recognized and get the value. value The value that will be used if the checkbox is selected. checked Set to checked if you want to select it by default. 34
  • 35. The <select> element is used to create a drop-down list. The <option> tags inside the <select> element define the available options in the list. Tip: The <select> element is a form control and can be used in a form to collect user input. 35
  • 36. <select> <option> Web Engineering</option> <option> Computer Programming</option> <option> Fundamentals of Algorithms</option> <option> Analysis of Algorithms</option> </select> 36
  • 37. 37
  • 38. 38
  • 39. <select multiple> <option> Web Engineering</option> <option> Computer Programming</option> <option> Fundamentals of Algorithms</option> <option> Analysis of Algorithms</option> </select> 39
  • 40. Attribute Description name Used to give a name to the control which is sent to the server to be recognized and get the value. size This can be used to present a scrolling list box. multiple If set to "multiple" then allows a user to select multiple items from the menu. 40 Following is the list of important attributes of <select> tag:
  • 41. 41 Following is the list of important attributes of <option> tag: Attribute Description value The value that will be used if an option in the select box is selected. selected Specifies that this option should be the initially selected value when the page loads. label An alternative way of labeling options
  • 42. If you want to allow a user to upload a file to your web site, you will need to use a file upload box, also known as a file select box. This is also created using the <input> element but type attribute is set to file. 42 Attribute Description name Used to give a name to the control which is sent to the server to be recognized and get the value. accept Specifies the types of files that the server accepts.
  • 43. <form> <input type="file" name="fileupload" accept="image/*" /> </form> 43
  • 44. There are various ways in HTML to create clickable buttons. You can also create a clickable button using <input> tag by setting its type attribute to button. The type attribute can take the following values: 44 Type Description submit This creates a button that automatically submits a form. reset This creates a button that automatically resets form controls to their initial values. button This creates a button that is used to trigger a client-side script when the user clicks that button. image This creates a clickable button but we can use an image as background of the button.
  • 45. defines a submit button. A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input: <form name=“applicationData" action="html_form_action.php" method="get"> Username: <input type="text" name="user"> <input type="submit" value="Submit"> </form> 45
  • 46. 46
  • 47. Button used to clear all the field of form in which reset button defined. <form name=" applicationData" action="html_form_action.php" <input type="reset" value="Clear"> </form> 47
  • 48. defines a button <form> <input type="button" value="clickMe" /> </form> 48
  • 50. The <button> tag defines a clickable button.  Inside a <button> element you can put content, like text or images. This is the difference between this element and buttons created with the <input> element. Tip: Always specify the type attribute for a <button> element. Different browsers use different default types for the <button> element. <button>Click Me</button> 50
  • 51. Hidden form controls are used to hide data inside the page which later on can be pushed to the server. This control hides inside the code and does not appear on the actual page. For example, following hidden form is being used to keep current page number. When a user will click next page then the value of hidden control will be sent to the web server and there it will decide which page has be displayed next based on the passed current page. 51
  • 52. <form> <p>This is page 10</p> <input type="hidden" name="pagename" value="10" /> <input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /> </form> 52
  • 53.  http://www.tutorialspoint.com/html/html_forms.htm  http://www.tutorialspoint.com/html/html_marquees.htm 53