0% found this document useful (0 votes)
2 views

HTML div Tag

The HTML <div> tag is used to define sections in web pages and allows developers to group elements for applying CSS styles. HTML forms, created using the <form> tag, collect user input through various interactive controls like text fields, checkboxes, and buttons. Key elements of forms include <input>, <label>, <button>, <option>, and <textarea>, each serving specific functions for user interaction.

Uploaded by

mehakgdcw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HTML div Tag

The HTML <div> tag is used to define sections in web pages and allows developers to group elements for applying CSS styles. HTML forms, created using the <form> tag, collect user input through various interactive controls like text fields, checkboxes, and buttons. Key elements of forms include <input>, <label>, <button>, <option>, and <textarea>, each serving specific functions for user interaction.

Uploaded by

mehakgdcw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

HTML <div> Tag

The HTML <div> tag is used to define sections in web


pages.

Developers use this tag to group HTML elements,


allowing them to apply CSS styles to multiple <div>
elements continuously.
Syntax:

The below syntax of the HTML <div> tag −

<div>
.....
</div>
HTML Form
An HTML Form is a section of the document that collects
input from the user.

The input from the user is generally sent to a server (Web


servers, Mail clients, etc).

We use the HTML <form> element to create forms in


HTML.
HTML forms are collections of interactive controls and
various input types, such as text, numbers, email,
password, radio buttons, checkboxes, buttons, etc., that
collect user information.

HTML forms are created by using the HTML <form> tag.


All user input-related tags are placed inside the <form>
tag.
Syntax:

The <form> element has the following syntax:


you can place any input-related element inside it:

<form>
<!-- Form elements-->
</form>
Form Elements:
The <form> Element:

HTML <form> tag is used to create the <form> element.


This element is the container for all other form
elements.

The form element does not create the form; it's the
container that holds the other form elements.
<form>.....</form>
The <input> Element:

HTML <input> tag is an essential element of form control


for gathering user input from websites.

We can use this tag to create an input element.


<input type = ".."/>

The <label> Element:

HTML <label> tag is used to create a label element that


represents a caption for an item in a UI (user interface),
or to add labels to a form control like text, textarea,
checkbox, radio button, etc.
<label>.......</label>

The <button> Element:

HTML <button> tag is an interactive element used


to create a button in HTML.

<button>Button</button>
The <option> Element:

HTML <option> tag defines either the elements of the


data list for autocomplete, specified by the <datalist>
tag, or the items of a drop-down list, defined by the
<select> tag.

<option>.....</option>
The <textarea> Element:

HTML <textarea> tag is used to represent a multiline


plain-text editing control.

<textarea>.......</textarea>

You might also like