Unit 1
Unit 1
Once you are connected to the Internet, you can access and view
websites using a type of application called a web browser. Just keep in
mind that the web browser itself is not the Internet; it only displays
websites that are stored on the Internet.
Intranet
Intranet is owned by a single organization and is a tool for sharing information
throughout the organization.It is the type of Internet that is used privately. Since,
intranet is a private network so no one can use the intranet whose have not valid
username and password. In intranet, there are a limited number of connected devices
as compared to internet. Intranet is highly secure and has a small number of visitors.
It is used in order to get employee information, telephone directory etc.
Extranet
Extranet is owned by either a single or a many organization. It is managed on a
contractual basis between organizations and is a tool for sharing information
between the internal members and external members. Like intranet, it is also a
private network so only those who have a valid username and password can use the
extranet. Extranet is used to check status, access data, send mail, place order etc.
organization. organizations.
Intranet has a limited number Whereas in the extranet, connected devices are
5.
of connected devices. comparable with the intranet.
It’s restricted area is upto an It’s restricted area is upto an organization and
11.
organization. some of its stakeholders.
Internet Applications
There are different applications of internet are...
1.Communication 5. Social Media
2. Web Browsing 6. Job Search
3. Online Shopping 7. Education
4. Real-Time Update 8. Travel
9. Stock Market Update 10. Video Conferencing
1) WWW :-
o Features of WWW:
HyperText Information System
Cross-Platform
Distributed
Open Standards and Open Source
Uses Web Browsers to provide a single interface for many services
Dynamic, Interactive and Evolving.
“Web 2.0”
2) E-mail :-
Electronic mail, commonly known as email, is a method of exchanging
messages over the internet. Here are the basics of email:
1. An email address: This is a unique identifier for each user, typically in the
format of [email protected].
2. An email client: This is a software program used to send, receive and
manage emails, such as Gmail, Outlook, or Apple Mail.
3. An email server: This is a computer system responsible for storing and
forwarding emails to their intended recipients.
To send an email:
1. Compose a new message in your email client.
2. Enter the recipient’s email address in the “To” field.
3. Add a subject line to summarize the content of the message.
4. Write the body of the message.
5. Attach any relevant files if needed.
6. Click “Send” to deliver the message to the recipient’s email server.
7. Emails can also include features such as cc (carbon copy) and bcc (blind
carbon copy) to send copies of the message to multiple recipients, and reply,
reply all, and forward options to manage the conversation.
The basic components of an email system are : User Agent (UA), Message
Transfer Agent (MTA), Mail Box, and Spool file. These are explained as
following below.
1. User Agent (UA) : The UA is normally a program which is used to send and
receive mail. Sometimes, it is called as mail reader. It accepts variety of
commands for composing, receiving and replying to messages as well as for
manipulation of the mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually responsible for transfer
of mail from one system to another. To send a mail, a system must have
client MTA and system MTA. It transfer mail to mailboxes of recipients if
they are connected in the same machine. It delivers mail to peer MTA if
destination mailbox is in another machine. The delivery from one MTA to
another MTA is done by Simple Mail Transfer Protocol.
3. Mailbox : It is a file on local hard drive to collect mails. Delivered mails are
present in this file. The user can read it delete it according to his/her
requirement. To use e-mail system each user must have a mailbox . Access
to mailbox is only to owner of mailbox.
4. Spool file : This file contains mails that are to be sent. User agent appends
outgoing mails in this file using SMTP. MTA extracts pending mail from
spool file for their delivery. E-mail allows one name, an alias, to represent
several different e-mail addresses. It is known as mailing list, Whenever
user have to sent a message, system checks recipient’s name against alias
database. If mailing list is present for defined alias, separate messages, one
for each entry in the list, must be prepared and handed to MTA. If for
defined alias, there is no such mailing list is present, name itself becomes
naming address and a single message is delivered to mail transfer entity.
3) FTP:-
Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.
Why FTP?
Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two systems
may have different file conventions. Two systems may have different ways to
represent text and data. Two systems may have different directory structures. FTP
protocol overcomes these problems by establishing two connections between
hosts. One connection is used for data transfer, and another connection is used for
the control connection.
Mechanism of FTP
The above figure shows the basic model of the FTP. The FTP client has three
components: the user interface, control process, and data transfer process. The
server has two components: the server control process and the server data transfer
process.
FTP Clients
o FTP client is a program that implements a file transfer protocol which allows
you to transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files
between you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser.
This GUI based FTP client makes the file transfer very easy and also does not
require to remember the FTP commands.
Email Protocols
Email protocols are a collection of protocols that are used to send and receive emails
properly. The email protocols provide the ability for the client to transmit the mail to or
from the intended mail server. Email protocols are a set of commands for sharing mails
between two computers. Email protocols establish communication between the sender
and receiver for the transmission of email. Email forwarding includes components like
two computers sending and receiving emails and the mail server.
(1)SMTP
(2)POP
(3) IMAP
1) SMTP:-
SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is a
standard protocol used for sending e-mail efficiently and reliably over the internet.
Key Points
HELLO
1
This command initiates the SMTP conversation.
EHELLO
2 This is an alternative command to initiate the conversation. ESMTP indicates
that the sender server wants to use extended SMTP protocol.
MAIL FROM
3
This indicates the sender’s address.
RCPT TO
4 It identifies the recipient of the mail. In order to deliver similar message to
multiple users this command can be repeated multiple times.
SIZE
5
This command let the server know the size of attached message in bytes.
DATA
6 The DATA command signifies that a stream of data will follow. Here stream of
data refers to the body of the message.
QUIT
7
This commands is used to terminate the SMTP connection.
VERFY
8 This command is used by the receiving server in order to verify whether the
given username is valid or not.
EXPN
9 It is same as VRFY, except it will list all the users name when it used with a
distribution list.
2) POP:-
POP stands for Post Office Protocol. It is generally used to support a single client.
There are several versions of POP but the POP 3 is the current standard.
Key Points
LOGIN
1
This command opens the connection.
STAT
2
It is used to display number of messages currently in the mailbox.
LIST
3 It is used to get the summary of messages where each message summary is
shown.
RETR
4
This command helps to select a mailbox to access the messages.
DELE
5
It is used to delete a message.
RSET
6
It is used to reset the session to its initial state.
QUIT
7
It is used to log off the session.
3) IMAP:-
IMAP stands for Internet Message Access Protocol. It was first proposed in 1986.
There exist five versions of IMAP as follows:
1. Original IMAP
2. IMAP2
3. IMAP3
4. IMAP2bis
5. IMAP4
Key Points:
IMAP allows the client program to manipulate the e-mail message on the server
without downloading them on the local computer.
The e-mail is hold and maintained by the remote server.
It enables us to take any action such as downloading, delete the mail without reading
the mail.It enables us to create, manipulate and delete remote message folders called
mail boxes.
IMAP enables the users to search the e-mails.
It allows concurrent access to multiple mailboxes on multiple mail servers.
IMAP Commands
IMAP_LOGIN
1
This command opens the connection.
CAPABILITY
2
This command requests for listing the capabilities that the server supports.
NOOP
3 This command is used as a periodic poll for new messages or message status
updates during a period of inactivity.
SELECT
4
This command helps to select a mailbox to access the messages.
EXAMINE
5
It is same as SELECT command except no change to the mailbox is permitted.
CREATE
6
It is used to create mailbox with a specified name.
DELETE
7
It is used to permanently delete a mailbox with a given name.
RENAME
8
It is used to change the name of a mailbox.
LOGOUT
This command informs the server that client is done with the session. The server
9
must send BYE untagged response before the OK response and then close the
network connection.
Introduction to HTML
HTML stands for Hyper Text Markup Language
HTML is the standard markup language for creating Web pages
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.
Tim Berners-Lee is known as the father of HTML. The first available description of
HTML was a document called "HTML Tags" proposed by Tim in late 1991. The
latest version of HTML is HTML5
HTML Versions:-
(1)HTML 1.0 , (2)HTML 2.0 , (3)HTML 3.2 ,(4) HTML 4.01 ,(5) HTML5
Features of HTML
It is easy to learn and easy to use.
It is platform-independent.
Images, videos, and audio can be added to a web page.
Hypertext can be added to the text.
It is a markup language.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Output:
My First Heading
My first paragraph.
Explanation:-
The <!DOCTYPE html> declaration defines that this document is an HTML5
document
The <html> element is the root element of an HTML page
The <head> element contains meta information about the HTML page
The <title> element specifies a title for the HTML page (which is shown in the
browser's title bar or in the page's tab)
The <body> element defines the document's body, and is a container for all the
visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists,
etc.
The <h1> element defines a large heading
The <p> element defines a paragraph
An HTML element is defined by a start tag, some content, and an end tag:
The HTML element is everything from the start tag to the end tag:
<a href="https://www.google.com">google</a>
Body Tag Attributes
There are many attributes in the <body> tag that are depreciated from
HTML5 are listed below:
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<!-- body background absolute path e:\folder\image.extention
background="11.png"-->
<body background="11.png" link="red" bgcolor="green" text="blue"
vlink="black">
<h1>heading 1</h1>
<h2>body Tag</h2>
<p>This is paragraph text</p>
<a href="#" > click here </a>
</body>
</html>
HTML Headings
<h1> defines the most important heading. <h6> defines the least important heading:
Code:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Output:
This is heading 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
HTML Formatting is a process of formatting text for better look and feel. HTML
provides us ability to format text without using CSS.
(1)Physical Style Tags : Physical Style Tags are used in HTML to provide actual
physical formatting to the text. Following are the Physical tags commonly used in HTML
Tag Description
Code:
<!DOCTYPE html>
<html>
<head>
<title>Physical Tags</title>
</head>
<body>
<h1> Physical Tags </h1>
Text without any formatting <br>
<b> HTML- This is Bold text </b> <br>
<big> HTML - This is BIG text </big> <br>
<i> HTML - This is Italic text </i> <br>
<small> HTML - This is Small text </small> <br>
1<sup>st </sup> <br>
H<sub>2</sub>O <br>
<tt> HTML - This is teletype text </tt> <br>
<u> HTML - This is underlined text</u> <br>
</body>
</html>
(2)Logical Tags :Logical Tags are used in HTML to display the text according to the
logical styles. Following are the Logical tags commonly used in HTML.
Tag Description
Code:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1> Logical Tags </h1>
Welcome to <abbr title="Internet Protocol">IP</abbr> <br>
This is <acronym title=" Internet Protocol "> IP </acronym> <br>
<address> rakshit, 5th & 6th Floor, Royal Kapsons, A- 118,
Sector- 136, Noida,
Uttar Pradesh (201305) </address> <br>
<cite> Internet Protocol </cite> is my favourite website. <br>
<code> Sample code: system.out.println(); </code>
<blockquote cite="https://www.google.org/">
A Computer Science portal for geeks. It contains well written, well
thought and well
explained computer science and programming articles, and quizzes.
</blockquote>
<del> This contains deleted content.</del>
<ins> Newly inserted content.</ins>
<p>
<dfn> Computer </dfn> is an electronic machine.
written, well thought and well explained computer science and
programming articles,
and quizzes.
</p>
<kbd> computer - This is a Keyboard input </kbd>
<pre> Dear User,
Congratulations !!
We are delighted to inform you that you are going to be part
of worlds journey.
Thanks,
IT Team
This is a predefine formatted text </pre>
</body>
</html>
Hyperlinks
An anchor tag is a HTML element that creates a link to a target URL. When correctly
implemented, the link can wrap around text, images, or as buttons, so that users can interact
with it and visit the link's destination.
Example
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
</head>
<body>
<!-- _blank _self _top _parent -->
<a href="http://www.google.com" target="_blank" title="new page"
rel="noopener"> click here to open in new page </a> <br>
<a href="#"> click here for refresh </a> <br>
<a href="page2.html"> click here to open page 2 </a> <br>
<a href="https://www.google.com"> Google Home </a>
<br><br><br><br><br><br>
<a href="#" name="to bottom"> go to top </a> <br>
</body>
</html>
Font Tag :
The HTML <font> Tag plays an important role in the web page to create an attractive and
readable web page. The font tag is used to change the color, size, and style of a text.
Syntax :
1. size : The Font size attribute is used to adjust the size of the text.The range of size of the
font in HTML is from 1 to 7 and the default size is 3.
2. face : face attribute used to set font type.
3. color : color attribute used to set font color.
<html>
<head>
<title>Document</title>
</head>
<body>
<font size="7" face="Verdana" color="red">first line</font> <br>
<font size="2" face="Comic sans MS" color="#ff9922">second line</font>
<br>
<font size="4" face="Bedrock" color="green">third line</font> <br>
</body>
</html>
Horizontal Rule ( <HR>)
<hr> tag stands for horizontal rule. HR is an HTML tag that enables us to add a horizontal
rule or a thematic break to an HTML page. Using the <hr> tag, we can divide document
sections.
o Attributes :-
Example:
<body>
<p>Example of a horizontal rule with CSS border Property.</p>
<hr width="50%" align="right" size="20%" color="red" noshade>
<p>Example of a horizontal rule with CSS border Property.</p>
</body>
Images are not technically inserted into a web page; images are linked to web pages.
The <img> tag creates a holding space for the referenced image.
Example :
(1)image with attributes
<html>
<head>
<title>Inserting an image using "img" tag</title>
</head>
<body>
<p>inserted image using <img> tag:</p>
<img src="11.png"
alt="img not found"
width="200"
height="200"
title="image" border="5" />
</body>
</html>
(2)image with css
<html>
<body>
<h1>Align image with CSS</h1>
<h2>vertical-align: bottom</h2>
<p>This is some text. <img src="smily.jpg" alt="Smiley face" width="42"
height="42" style="vertical-align:bottom;border:5px solid black;"> This is
some text. This is some text. This is some text.</p>
<h2>vertical-align: middle</h2>
<p>This is some text. <img src="smily.jpg" alt="Smiley face" width="42"
height="42" style="vertical-align:middle;border:5px solid black;"> This is
some text. This is some text. This is some text.</p>
<h2>vertical-align: top</h2>
<p>This is some text. <img src="smily.jpg" alt="Smiley face" width="42"
height="42" style="vertical-align:top;border:5px solid black;"> This is some
text. This is some text. This is some text.</p>
<h2>float: right</h2>
<p>This is some text. <img src="smily.jpg" alt="Smiley face" width="42"
height="42" style="float:right;border:5px solid black;">This is some text.
This is some text. This is some text.</p>
<h2>float: left</h2>
<p>This is some text. <img src="smily.jpg" alt="Smiley face" width="42"
height="42" style="float:left;border:5px solid black;">This is some text. This
is some text. This is some text.</p>
</body>
</html>
Image Map
The HTML <map> tag defines an image map. An image map is an image with clickable
areas. The areas are defined with one or more <area> tags.
In image mapping an image is specified with certain set of coordinates inside the image
which act as hyperlink areas to different destinations. It is different from an image link
since in image linking, an image can be used to serve a single link or destination whereas in
a mapped image, different coordinates of the image can serve different links or
destinations.
The Areas
Then, add the clickable areas.
A clickable area is defined using an <area> element.
Shape
You must define the shape of the clickable area, and you can choose one of these values:
<!DOCTYPE html>
<html>
<body>
<h2>Image Maps</h2>
<p>Click on the computer to go to a new page and read more about the
topic:</p>
<img src="pc1.jpg" alt="Workplace" usemap="#workmap" width="400"
height="379">
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer"
href="computer.htm">
</map>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h2>Image Maps</h2>
<p>Click on the cup of coffee to go to a new page and read more about the
topic:</p>
<img src="pc2.jpg" alt="Workplace" usemap="#workmap" width="400"
height="379">
<map name="workmap">
<area shape="circle" coords="337,300,44" alt="Cup of coffee"
href="coffee.htm">
</map>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h2>Image Maps</h2>
<p>Click on the croissant to go to a new page and read more about the
topic:</p>
<img src="food.jpg" alt="French Food" usemap="#foodmap" width="450"
height="675">
<map name="foodmap">
<area shape="poly"
coords="140,121,181,116,204,160,204,222,191,270,140,329,85,355,58,352,
37,322,40,259,103,161,128,147" alt="Croissant" href="croissant.htm">
</map>
</body>
</html>
List in HTML
A list is a record of short pieces of related information or used to display the
data or any information on web pages in the ordered or unordered form.
Types of List
1. Unordered List
2. Ordered List
3. Description List
1. Unordered List : An unordered list starts with the “ul” tag. Each list item starts with the
“li” tag. The list items are marked with bullets i.e small black circles by default.
Attribute of UL tag
o compact: It will render the list smaller.
o type: It specifies which kind of marker is used in the list. Possible values are
disk, circle and square.
Example :
<html>
<head>
<title>HTML ul tag</title>
</head>
<body>
<h2>Unordered List</h2>
<ul type="disc" compact>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
<li>item 5</li>
</ul>
</body>
</html>
Note : compact is not working in html5.
2. Ordered List : An ordered list starts with the <ol> tag. Each list item starts with
the <li> tag. The list items will be marked with numbers by default.
Attribute of OL tag
o type: Sets the numbering type:
a for lowercase letters
A for uppercase letters
i for lowercase Roman numerals
I for uppercase Roman numerals
1 for numbers (default)
o Start: An integer to start counting from for the list items. For example, to start
numbering elements from the letter "d" or the Roman numeral "iv," use start="4".
o Reversed: This Boolean attribute specifies that the list's items are in reverse
order. Items will be numbered from high to low.
Example:
<html>
<head>
<title>HTML ol tag</title>
</head>
<body>
<h2>ordered List</h2>
<ol type="A" start="5" reversed>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
<li>item 5</li>
</ol>
</body>
</html>
3. Description List : A description list is a list of terms, with a description of each term.
The <dl> tag defines the description list, the <dt> tag defines the term (name), and
the <dd> tag describes each term.
Example:
<html>
<body>
<h2>A Description List</h2>
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
</body>
</html>
Nested List
<ol type="A" start="5" reversed>
<li>item 1</li>
<li>item 2</li>
<ol type="i" start="2">
<li>item 2.1</li>
<li>item 2.2</li>
</ol>
<li>item 3</li>
<li>item 4</li>
<li>item 5</li>
</ol>
Table
The <table> in HTML element represents tabular data—that is, information presented in a
two-dimensional table comprised of rows and columns of cells containing data.
Defines the structure for organizing data in rows and columns within a web
<table>
page.
<th> Shows a table header cell that typically holds titles or headings.
<thead> Defines the header section of a table, often containing column labels.
Represents the main content area of a table, separating it from the header
<tbody>
or footer.
<tfoot> Specifies the footer section of a table, typically holding summaries or totals.
Attributes of TR tag :
align: Align the content.
bgcolor: Specify the background of the row
char: Align the content to a character
charoff: Set the number of character
valign: Vertical align the content
Attributes of TD tag :
Bgcolor: Specifies the background color of the table cell.
Colspan : Specifies the number of columns the current cell spans across.
Rowspan : Specifies the number of rows the current cell spans across.
Valign : Vertical alignment.values Top,middle,bottom and baseline.
Width : Specifies the width of the table cell.
Nowrap : Prevents text from automatically wrapping.
Height : Specifies the height of the table cell.
Align : Visual alignment. Values right,left,center,justify,char
Example :
<table border="1">
<caption>
Front-end web developer course 2021
</caption>
<thead>
<tr>
<th scope="col">Person</th>
<th scope="col">Most interest in</th>
<th scope="col">Age</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Chris</th>
<td>HTML tables</td>
<td>22</td>
</tr>
<tr>
<th scope="row">Dennis</th>
<td>Web accessibility</td>
<td>45</td>
</tr>
<tr>
<th scope="row">Sarah</th>
<td>JavaScript frameworks</td>
<td>29</td>
</tr>
<tr>
<th scope="row">Karen</th>
<td>Web performance</td>
<td>36</td>
</tr>
</tbody>
<tfoot>
<tr>
<th scope="row" colspan="2">Average age</th>
<td>33</td>
</tr>
</tfoot>
</table>
Note: you can also create nested table in html.
Frame :-
Frames are used to divide the web browser window into multiple sections where each
section can be loaded separately.
Forms in HTML
Usually, the form data is sent to a file on the server when the user clicks on the submit button.
2. target : The target attribute specifies where to display the response that is received after
submitting the form.
The target attribute can have one of the following values: _blank, _self, _parent, _top.
3. method : The method attribute specifies the HTTP method to be used when submitting the
form data.
The form-data can be sent as URL variables (with method="get") or as HTTP post
transaction (with method="post").
The default HTTP method when submitting form data is GET.
4. autocomplete : The autocomplete attribute specifies whether a form should have
autocomplete on or off.
When autocomplete is on, the browser automatically complete values based on values that the
user has entered before.
5. novalidate : The novalidate attribute is a boolean attribute.
When present, it specifies that the form-data (input) should not be validated when submitted.
/test/demo_form.php?name1=value1&name2=value2
name1=value1&name2=value2
GET POST
The HTML <input> element is used to take input from user. We can apply different input
filed to gather different information form user. Followings are types of inputs.
1. <input type="button">
2. <input type="checkbox">
3. <input type="color">
4. <input type="date">
5. <input type="datetime-local">
6. <input type="email">
7. <input type="file">
8. <input type="hidden">
9. <input type="image">
10. <input type="month">
11. <input type="number">
12. <input type="password">
13. <input type="radio">
14. <input type="range">
15. <input type="reset">
16. <input type="search">
17. <input type="submit">
18. <input type="tel">
19. <input type="text">
20. <input type="time">
21. <input type="url">
22. <input type="week">
The <input type="text"> defines a single-line input field for text input.
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname"><br><br>
<input type="submit" value="Submit">
(2) <input type="password"> :-
<input type="password"> defines a password field:
<label for="username">Username:</label><br>
<input type="text" id="username" name="username"><br>
<label for="pwd">Password:</label><br>
<input type="password" id="pwd" name="pwd"><br><br>
<input type="submit" value="Submit">
The <input type="color"> is used for input fields that should contain a
color.
Depending on browser support, a color picker can show up in the input
field.
<label for="favcolor">Select your favorite color:</label>
<input type="color" id="favcolor" name="favcolor">
(9) <input type="date"> :-
The <input type="date"> is used for input fields that should contain a
date.
Depending on browser support, a date picker can show up in the input
field.
You can also use the min and max attributes to add restrictions to dates:
The <input type="email"> is used for input fields that should contain
an e-mail address.
The <input type="hidden"> defines a hidden input field (not visible to a user).
A hidden field lets web developers include data that cannot be seen or modified by
users when a form is submitted.
A hidden field often stores what database record that needs to be updated when the
form is submitted.
<input type="hidden" id="custId" name="custId" value="3487">
(13) <input type="number"> :-
The <textarea> tag in HTML is used to insert multiple-line text in a form. The size of
<textarea> can be specify either using "rows" or "cols" attribute or by CSS.
<form>
Enter your address:<br>
<textarea rows="2" cols="20"></textarea>
</form>
If you click on the label tag, it will focus on the text control. To do so, you need to
have for attribute in label tag that must be same as id attribute of input tag.
<form>
<label for="firstname">First Name: </label> <br/>
<input type="text" id="firstname" name="firstname"/> <br/>
<label for="lastname">Last Name: </label>
<input type="text" id="lastname" name="lastname"/> <br/>
</form>
(4) The <button> Element
Use the multiple attribute to allow the user to select more than one value:
The <fieldset> element in HTML is used to group the related information of a form.
This element is used with <legend> element which provide caption for the grouped
elements.
<form>
<fieldset>
<legend>User Information:</legend>
<label for="name">Enter name</label><br>
<input type="text" id="name" name="name"><br>
<label for="pass">Enter Password</label><br>
<input type="Password" id="pass" name="pass"><br>
<input type="submit" value="submit">
</fieldset>
</form>
(8) The <datalist> Element
Users will see a drop-down list of the pre-defined options as they input data.
The list attribute of the <input> element, must refer to the id attribute of
the <datalist> element.
<form action="/action_page.php">
<input list="browsers" name="browser">
<datalist id="browsers">
<option value="Edge">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
<input type="submit">
</form>
<body>
<h2>The output Element</h2>
<p>The output element represents the result of a calculation.</p>
<form action="/action_page.php"
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">
=
<output name="x" for="a b"></output>
<br><br>
<input type="submit">
</form>
</body>