0% found this document useful (0 votes)
27 views11 pages

PPT1 - CB - VI - CS - More On HTML

Uploaded by

dizagupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

PPT1 - CB - VI - CS - More On HTML

Uploaded by

dizagupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 11

More on HTML

NOTE: FOR THE BEST EXPERIENCE, PLEASE VIEW THE


PPT ON A DESKTOP/ L APTOP.
What is an HTML Form?
 HTML forms allow websites to collect user input.

 Commonly used for login pages, feedback, registration, etc.

 Information entered in forms can be sent to a web server for processing.

 Forms include a variety of input elements such as textboxes, checkboxes,


radio buttons, dropdowns, and buttons.
Input elements
Input elements are used to accept information from a user in
different ways.

The given image shows the different input


elements and what they are used for.

The <input> tag and its ‘type’ attribute are used


to create the various input elements.

The value of the ‘type’ attribute decides the


input field type.
Attributes of the <input> tag
 type: The type attribute of the input tag is used to specify the
type of input element that is displayed in the web page.

 name: The name attribute is used to specify the name of the


input element.
 It allows the website to identify the data that is being sent
when the form is submitted.
 Each input tag in a form should have a unique value for its
name attribute.
Text Input
The <input> tag with the type=“text” attribute creates a single-line
text input field.

HTML code:

Username: <input type="text" name="username">


Password Input
The <input> tag with the type=“password” attribute creates a text
input field that masks the user’s input with asterisks.

HTML code:

Password: <input type=“password" name=" password ">


Checkbox
The <input> tag with the type=“checkbox” attribute creates a
checkbox that users can select or deselect.

HTML code:

Hobbies: <br>
<input type=“checkbox" name=" C1 "> Drawing
<input type=“checkbox" name=" C2 "> Reading
Radio Button
The <input> tag with the type=“radio” attribute creates a radio
button that users can select from a group of options.
In a group of radio buttons, the name must be the same for each
radio button, else user will be able to select all options.
HTML code:

Gender: <br>
<input type=“radio" name=" G1 "> Male
<input type=“radio" name=" G1 "> Female
Button
There are two special types of buttons used in a form – the Submit
button and the Reset button.
 The Submit button is used to send the form data to the website.
 <input> tag with the type=”submit” attribute creates the
Submit button.
 The Reset button is used to clear all inputs given by the user.
 The <input> tag with the type=”reset” attribute creates the
Reset button.
Select tag
The <select> tag creates an input element with a drop-down list of
options that users can select from. The items in the drop-down list
can be defined by the <option> tag.

HTML code Output


Thank
You!

You might also like