Web Interface Designing Technologies
Web Interface Designing Technologies
The foundational protocol for transferring web pages and their content across the internet.
A secure version of HTTP that uses encryption to protect sensitive data, such as login credentials and
payment information, during transmission.
A core suite of protocols that breaks down messages into packets, routes them to their destination, and
reassembles them on the other end.
Uniform Resource Locators, or URLs:
Browsers:
WWW Clients, or "Browser": The program you use to access the WWW is known as a browser
because it "browses" the WWW and requests these hypertext documents. Browsers can be
graphical, allows to see and hear the graphics and audio;
text-only browsers (i.e., those with no sound or graphics capability) are also available. All of
these programs understand http and other Internet protocols such as FTP, gopher, mail, and
news, making the WWW a kind of "one stop shopping" for Internet users.
UNIT - I
HTML: Introduction to web designing, difference between web applications and desktop applications,
introduction to HTML, HTML structure, elements, attributes, headings, paragraphs,images, tables,
lists, blocks, symbols, embedding multi-media components in HTML, HTML forms
Technology Purpose
HTML (Hypertext Markup Language): Builds the basic structure of web pages.
CSS (Cascading Style Sheets): Styles the layout and appearances of the website.
JavaScript: Adds interactive features like sliders, forms, popups,
etc.
🟧 Types of Web Design:
Static Design: Fixed content, same for all users.(e.g, college notice board)
Dynamic Design: Content changes based on user input or settings.(e.g, student login
portal)
Responsive Design: Adjusts layout automatically to different screen sizes (mobile, tablet,
desktop).
Web Designer
Front-End Developer
UI/UX Designer
Freelance Website Developer
3.Introduction to HTML
WHAT IS HTML?
HTML is the building block for web pages. HTML is a format that tells a computer how
to display a web page. The documents themselves are plain text files with special "tags" or
codes that a web browser uses to interpret and display information on your computer screen.
<!DOCTYPE html> (Document Type Declaration): This line tells the browser that
the document is written in HTML5 (the current standard for HTML). It ensures that the
browser renders the page correctly in modern standards mode.
» <html> (Root Element): This is the root element of the HTML document. Everything in the
HTML page is nested inside the <html> tag. It defines the beginning and end of the HTML
document. The lang="en" attribute specifies the language of the page (in this case, English),
which helps search engines and accessibility tools understand the language of the content.
<head> (Head Section): The <head> section contains metadata about the HTML document,
which is not displayed on the page itself. It includes elements like the title, character
encoding, and links to external resources (like stylesheets or scripts). Key Elements Inside
the <head>:
<meta charset="UTF-8">: Specifies the character encoding for the document,
ensuring that characters from different languages are displayed correctly. UTF-8 is
the most common and widely supported encoding.
<meta name="viewport" content="width=device-width, initial-scale=1.0">:
This meta tag helps ensure that the page is responsive on different devices,
especially on mobile screens. It controls the layout of the page based on the device's
width.
<title>: Sets the title of the webpage, which appears in the browser’s tab and when
the page is
bookmarked. This is important for SEO and user experience.
» <body> (Body Section): The <body> section contains the content of the webpage that is
visible to users, such as text, images, links, and other elements. Key Elements Inside the
<body>:
<h1>: Represents a top-level heading (the main title or heading of the page). There
are six levels of headings in HTML, from <h1> to <h6>.
<p>: Defines a paragraph of text. Paragraphs are used to structure content and break
it into readable blocks.
Structural Tags
Tag Purpose
<!DOCTYPE html> Declares the document type
<html> Root of the HTML document
<head> Contains metadata, scripts, styles
<body> Contains the visible page content
Text and Formatting Tags
Tag Purpose
<h1> to <h6> Headings (from largest to smallest)
<p> Paragraph
<br> Line break
<hr> Horizontal rule
<b> Bold text
<strong> Important text (semantic bold)
<i> Italic text
<em> Emphasized text (semantic italic)
<u> Underlined text
<mark> Highlighted text
<small> Smaller text
<sup> Superscript
<sub> Subscript
<pre> Preformatted text
Links and Media
Tag Purpose
<a href=""> Hyperlink
<img src="" alt=""> Image
<audio> Audio content
<video> Video content
<source> Specifies media source inside <audio>
or <video>
<iframe> Embeds another page
Lists
Tag Purpose
<ul> Unordered list (bullets)
<ol> Ordered list (numbers)
<li> List item
<dl> Description list
<dt> Description term
<dd> Description detail
Containers & Layout
Tag Purpose
<div> Block-level container
<span> Inline container
<section> Page section
<article> Independent article content
<nav> Navigation links
<header> Page or section header
<footer> Page or section footer
<main> Main content of page
<aside> Sidebar content
Tables
Tag Purpose
<table> Creates a table
<tr> Table row
<th> Table header cell
<td> Table data cell
<thead> Group table head content
<tbody> Group table body content
<tfoot> Group table footer content
<caption> Table caption
Forms
Tag Purpose
<form> HTML form
<input> Input field
<label> Form field label
<textarea> Multi-line text input
<button> Button
<select> Drop-down menu
<option> Drop-down option
<fieldset> Groups related fields
<legend> Title for <fieldset>
The following table displays the different parts (opening tag, content, and closing tag) of the
HTML elements used in the above example:
Opening
Content Closing Tag
Tag
Let’s explore some of the most commonly used HTML elements, categorized into block
elements, inline elements, and other specialized elements.
» <p>: Paragraph: The <p> tag is used to define a paragraph of text. It is a block-level
element that automatically adds space before and after the content to separate it from other
elements on the page.
E.g.: <p>This is the first paragraph of the article, giving a
brief introduction.</p>
<p>This is the second paragraph,
providing more detailed
information on the topic.</p>
Output: This is the first paragraph of the article, giving a brief
introduction.
This is the second paragraph, providing more detailed
information on the topic.
<h1> to <h6>: Headings: The <h1> to <h6> tags define headings, with <h1> being the most
important and
<h6> the least. Headings help structure the document and improve
accessibility and SEO.
The horizontal rule does not have a closing tag. It takes attributes
such as align and width
Code Output
<hr
width="50%"
align="center"
>
Used to create a hyperlink that links to another webpage, file, email, or section of the same page.
(or)
A hyper link is an association among multiple web pages or within the same web page. A hyper link
allows to navigate in between different web pages.
HTML language allows to create hyper link with the help of “anchor tag”.
Syntax:
inside the <head> section to link external files like stylesheets. Syntax:
Explanation:
</audio>
Explanation:
controls shows play/pause buttons.
<source> defines the file and format.
Text inside is shown if the browser doesn’t support audio.
3. <video> – Embed Video
Used to add a video to a
4. webpage. Syntax:
<video width="400" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Explanation:
width sets the video size.
controls allows play/pause.
<source> includes the video file.
In HTML, attributes provide additional information about elements. They are always included in the
opening tag and are written as name-value pairs.
Basic Structure of an Attribute
<tagname attribute="value">Content</tagname>
For example:
<a href="https://www.google.com">Visit Google</a>
In this case:
a is the anchor (link) tag.
href is the attribute.
"https://www.google.com" is the value of the href attribute.
Common HTML Attributes with Examples
1. href
Used with <a> to define the URL of a hyperlink.
<a href="https://example.com">Click Here</a>
2. src
Used with <img>, <audio>, <video> to define the file source.
<img src="image.jpg" alt="Description">
3. alt
Used with <img> to provide alternative text if the image cannot be displayed.
<img src="photo.jpg" alt="Student Photo">
4. title
Shows a tooltip when the mouse hovers over the element.
<p title="This is a tooltip">Hover over me!</p>
5. style
Used to apply inline CSS styles to an element.
<p style="color: red;">This is red text.</p>
6. id
Gives a unique identifier to an HTML element.
<p id="intro">Welcome to my page</p>
7. class
Assigns one or more class names to an element (used for styling).
<p class="highlight">This is highlighted.</p>
9. target
Specifies where to open the linked document (used with <a>).
<a href="https://example.com" target="_blank">Open in New Tab</a>
10. type
Defines the type of element, especially in forms and media.
<input type="text"> <video type="video/mp4">
7.HTML Heading Tags :
1. <h1> – Main Heading
The <h1> tag is used for the most important heading on a page. It is usually the largest in size and
typically represents the title or main topic of the webpage.
Example: <h1>Welcome to My Website</h1>
The <h3> tag is used for subsections under an <h2> heading. It helps organize content hierarchically.
Example:
<h3>My Education</h3>
The <h4> tag is for smaller headings under an <h3>. It is less commonly used but helpful in long or
technical documents.
Example:
<h4>High School</h4>
<html>
<head>
<title>Nested Elements Example</title>
</head>
<body>
<h1>This is <i>italic</i> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
</body>
html>
On executing the above example, we can observe the two sentences where we have
nested one HTML within another.
Note: In the above example, the <html>, <head>, and <body> tags are also nested elements as they
have one or more elements inside them
8.IMAGE
Images for the Web:
Images are essential for enhancing the visual appeal of web pages like photos, logos, icons
etc…and conveying information. When choosing images for the web, it's important to consider:
File Format:
Common image formats for the web include JPEG, PNG, GIF, SVG, and WebP. Each format
has its advantages: JPEG is ideal for photographs, PNG supports transparency and is suitable for
graphics, GIF is often used for simple animations, SVG is preferred for vector graphics, and
WebP offers efficient compression and quality.
File Size: Optimizing images to reduce file size helps improve page loading speed, enhancing
user experience and SEO.
Src (Source): This attribute specifies the path to the image file. It can be a relative path (to a file
on the same server) or an absolute path (URL to an external image).
E.g.: Relative path: src="images/picture.jpg"
Absolute path: src=https://example.com/images/picture.jpg
alt (Alternative Text): This attribute provides a textual description of the image, which is
displayed if the image cannot be loaded. It is also used by screen readers to assist visually
impaired users.
width and height: Specify the size of the image in pixels. It’s good practice to set these
attributes toavoid layout shifts.
Syntax:<img src="https://example.com/image.jpg" alt="A beautiful sunset" width="600"
height="400" />
title: This attribute offers additional information about the image when a user hovers over it.
Syntax:<img src="https://example.com/image.jpg" alt="A beautiful sunset" title= "Sunset
view at the beach" />
Example
<!DOCTYPE html>
<html>
<head>
<title>Using Image in Webpage</title>
</head>
<body> <p>Simple Image Insert</p>
<img src="test.png" alt="Test Image" />
</body>
</html>
9.TABLES
HTML tables are a way to organize and display data in a grid format consisting of rows and
columns. Tables are commonly used to display structured information like reports, schedules,
or any kind of data that fits into a grid.
Tables in HTML are built using several tags that define the structure of rows, columns, headers,
and data. Understanding how to structure a table and use tags like <thead>, <tbody>, and
<tfoot> is key to creating clear, semantic tables.
Syntax:
<table [align=”center” | “left” | “right”] [border [=”n”] ] [cellpadding=”n”]
[width=”nn%”] [cellspacing=”n”] > …………………….</table>
HTML Table tags: Several key tags are used in creating tables, each serving a specific function:
<table>: The parent tag that defines the table. All other table-related tags are placed inside it. i.e,
<tr>,<th>,<td>,<caption>.
Table tag attributes <table>:
The table tag allows to represent the data in the form of table representation i.e. I row & column format.
This tag contains the following attributes.
Border:
This attribute allows to specify the border for table based on given value
Ex:<table border=”4”>
Border color:
This attribute allows to specify the background color for the entire table.
Ex:<table bgcolor=”green”>
Background:
This attribute allows to represent an image as background for the entire table.
Ex: <table background=”URL”>
Width:
This attribute allows to control the width of table according browser window.
Ex: <table width=”70%”>
Align:
This attribute allows to align the table at a specific position on the browser window.
Ex: <table align=”left”/”right”/”center”>
Cell spacing:
This attribute allows to specify the horizontal & vertical gap in b/w the cell.
Ex: <table cell spacing=”4”>
Cell padding:
Is use to create more white space between cell content and its border.
Ex: <table cell padding=”4”>
Table row:<tr>
The most important tag that goes inside the tag is table row tag. Every row in the table is
represented by a <tr> element, containing table header or data cells. It contains the following
attribute.
Bgcolor:
This attribute allows to specify a background color for the entire row.
Ex: <tr bgcolor=”pink”>
Using <thead>tag
<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ramu</td>
<td>28</td>
</tr>
<tr>
<td>Sai</td>
<td>35</td>
</tr>
</tbody>
</table>
Output:
Spanning Rows and Columns:
In HTML tables, you can use the colspan and rowspan attributes to make cells span
across multiple columns or rows, respectively. This is useful when you want to merge cells to
create more complex layouts within your table.
Column Spanning with colspan: The colspan attribute allows a cell to span across multiple
columns. This can be helpful when you want to merge two or more cells horizontally.
E.x:
<table border="1">
<tr>
<th colspan="2">Monthly Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr colspan=”2”>total savings $180</tr>
</table>
Output:
Row Spanning with rowspan: The rowspan attribute allows a cell to span across multiple
rows, merging vertically.
E.g.: <table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holidays!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan=”2”>$50</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Output:
10.Lists
Lists in HTML is an organization of data in a specific manner. HTML language supports 3
primary types of
List tags. Each type serves a specific purpose and has unique characteristics.
Ordered list
Un ordered list
Definition list
The entire list is surrounded by the beginning and ending list tags. In
addition to that each
Item In the list is identified by “list item tag”.
Ordered list:
An ordered list displays list of items in the form of Specific identification order.
In an ordered list Of elements are prefixed by a symbol that denotes their relation order the most
commonly used symbols for Making the items of an ordered list are Arabic numbers, letters &
Roman numbers. The beginning tag and Ending tag for an ordered list is <ol>and</ol>. Each item
in an ordered list is identified by the list tag.
The beginning tag for list item is <li>, no ending tag is necessary by default the items in
An ordered list are represented using Arabic numbers.
Syntax: <ol> E.x:
<!DOCTYPE html>
<li>First Item</li>
<html><head><title>HTML Ordered
<li>Second Item</li> List</title></head>
<li>Third Item</li> <body>
</ol> <ol><li>Beetroot</li><li>Ginger</li>
<li>Potato</li>
<li>Radish</li></ol></body>
Output:
</html>
The ordered list contains two important attributes. They are “type” & “start”.
Type: The type attributes allows to specify the type of ordering value& it can take the values
“A, a, I”.
The lower case ‘a’ results in a, b, c & the upper case ‘A’ results in A,B,C similarly the roman
numbers I & iwill
Generate lower and upper case roman number.
Start: The start attribute allows to specify the starting value of order
E.x:<OL type=”A” starts”4”> Output:
<li>internet D.internet
<li>HTML E.HTML
<li>Css F.Css
</OL>
UnOrdered list:
An Unordered list display the data in the form of symbolic representation. If
the order is not important then you can use Unordered list by default the unordered list displays
the items ‘bullets’. The beginning & ending tag for an unordered list is <ul>&</ul>. Each item in
an unordered list is identified by the list item tag i.e,<li> unordered list contains type attribute it
can take values either ‘circle’, ‘square’, or ‘disc’
E.x: Output:
<!DOCTYPE html>
<html><head><title>HTML Unordered
List</title></head>
<body><ul type=”disc”><li>Beetroot</li>
<li>Ginger</li> <li>Potato</li>
<li>Radish</li>
</ul></body></html>
Description Lists:
Description lists are a specific type of list used in HTML to group terms and their
corresponding d descriptions. They provide a clear and structured way to present definitions,
explanations, or other information that pairs terms with details. This format is particularly
useful for glossaries, FAQs, or any content that requires a term- and-definition structure.
Structure of Description Lists:
A description list consists of three main elements:
<dl>: The container for the entire description list.
<dt>: Represents a term or item that you want to define or describe. Each term is
usually formatted to stand out. <dt> defines the term; <dd> gives the description.
<dd>: Contains the description or definition associated with the preceding term
(<dt>). This can be multiple lines long if needed.
Syntax: <dl>
<dt>Term 1</dt>
<dd>Description for Term 1.</dd>
<dt>Term 2</dt>
<dd>Description for Term 2.</dd>
</dl>
E.x:
<!DOCTYPE html>
<html><head>
<title>HTML Definition List</title>
</head><body>
A nested list in HTML is a list that contains other lists within its list items. This creates a
hierarchical structure, often used to represent categories and subcategories.
Here’s an example of a nested list: output:
11.HTML Blocks
In HTML, content is organized using block-level elements .HTML Blocks refer to block-level
elements in HTML that occupy the full width available and always start on a new line the
document. These elements structure the layout and structure of a webpage. Can contain
other block or inline elements.
<header>: Introductory Section: The <header> element represents the header section of a page
or section.
It often contains navigation links, logos, or
introductory content. E.g.: <header>
<h1>Welcome to My Website</h1>
</header>
Output: Welcome to My Website
» <footer>: Footer Section: The <footer> element is used to define the footer of a page or
section. It typically includes information like copyrights, author details, or links to related
content
E.g.: <footer>
© 2024 My Website. All rights reserved.
</footer>
Output: © 2024 My Website. All rights reserved.
» <article>: Independent Content: The <article> element represents a self-contained,
independent piece of content, such as a blog post, news article, or forum entry. Each
<article> should make sense on its own.<article>: Represents independent, self-contained
content. Each article could stand alone, like a blog post, news item, or forum post.
E.g.: <article>
<h2>Breaking News</h2>
<p>Today, major advancements were made in AI
technology...</p>
</article>
Output: Breaking News
Today, major advancements were made in AI
technology...
» <nav>: Navigation Links: The <nav> element is used to define a block of navigation links
that help users navigate the site. It typically contains links to the main sections of a website.
E.g.: <nav>
<ahref="#home">Home</a> |
<a href="#about">About</a> |
<a href="#services">Services</a>
</nav>
Output: Home | About | Services
» <aside>: Side Content: The <aside> element represents content that is tangentially
related to the main content, such as sidebars, pull quotes, or advertisements. It is often
displayed alongside the main content. E.g.: <aside>
<p>Related article: How to use HTML tags
effectively.</p>
</aside>
Output: Related article: How to use HTML tags effectively.
» <section>: Thematic Section: The <section> element defines a thematic grouping of
content within a webpage. Each section often has its own heading and is used to structure
the page logically.
E.g.: <section>
<h2>Features</h2>
<p>Our product offers
several key features
that improve user
experience.</p>
</section>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
text-align: center;
header {
background-color: #cbb6e5;
nav {
background-color: #f5732a;
}
.container {
display:flex;
min-height:300px;
aside {
width: 25%;
background-color: #b7f24c;
text-align: left;
main {
width: 75%;
background-color: #0ca7e0;
footer {
background-color: #cbb6e5;
} </style>
</head>
<body>
<header>
My Personal Website
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Contact</a>
</nav>
<div class="container">
<aside>
<ul>
<li>Dashboard</li>
<li>Messages</li>
<li>Settings</li>
<li>Logout</li>
</ul>
</aside>
<main>
<h2>Welcome to My Website</h2>
<p>This is the main content area where you can share information, articles, blog posts, or
any kind of text you want visitors to read.</p>
<p>You can also include images, videos, or links to other pages. Use this space to highlight
what's important on your website.</p>
</main>
</div>
<footer>
</body>
</html>
Output:
| Header (Purple) |
| | (Flexbox Layout) |
| Footer (Purple) |
Basic Symbols:
Copyright → © → ©
Registered → ® → ®
Trademark → ™ → ™
Currency Symbols:
Rupee → ₹ → ₹
Dollar → $ or $ → $
Euro → € → €
Pound → £ → £
Yen → ¥ → ¥
Math Symbols:
Plus-minus → ± → ±
Division → ÷ → ÷
Multiplication → × → ×
Less than or equal to → ≤ → ≤
Greater than or equal to → ≥ → ≥
Not equal → ≠ → ≠
<!DOCTYPE html>
<html>
<head>
<title>HTML Symbols Example</title>
</head>
<body><p>Copyright © 2025</p>
<p>Price: ₹500</p>
<p>5 < 10 and 10 > 5</p>
<p>I ❤ HTML</p>
</body>
</html>
Attributes:
Attributes:
Attributes:
allowfullscreen>
</iframe>
5. AND OBJECT:
HTML <embed> tag is used to embed external content such as images, videos,
and web applications. It is often used for embedding content like Flash
movies or audio/video players.
HTML <object tag is used to embed various types of external resources,
including
> images, videos, PDFs, and other web resources. It can render multiple
types of files.
Syntax
HTML forms are essential for collecting user input and sending it to a server for processing.
Forms in HTML allow for the creation of interactive user interfaces on websites. They consist of
various fields, labels, and buttons, and the submitted data can be processed through either client-
side or server-side programming.
Parts of an HTML Form
Designing the Form: The structure of the form, which includes various fields (like text fields,
radio buttons, checkboxes), labels for identifying fields, and buttons (like submit and reset) that
enable interaction.
Processing the Form: After submission, the form data can be processed using client-side or
server-side programming languages to handle user input and perform desired actions.
Syntax:
Common Attributes of <form>
» action: Defines the URL where the form data will be sent after submission. The server
script at this URL handles the processing of form data, such as storing it in a database or
sending it via email.
»target: Specifies where to display the server's response after submission. It can take values
like _self (same window) or _blank (new window/tab).
method: Defines the HTTP method to use for form submission.
GET: Sends data as URL variables in name/value pairs and is suitable for non-
sensitive information.
POST: Sends data in the HTTP request body, which is secure and suitable for larger,
sensitive data.
Example:
<form>
First name:<br>
<input type="text" name="firstname"><br>
Last name:<br>
<input type="text" name="lastname">
</form>
User name:<br>
</form>
email: A field optimized for email addresses, with built-in validation to check for a standard email
format. Some browsers display a specialized keyboard with the "@" symbol on mobile devices to
simplify entry.
E.g.: <input type="email">
tel: Allows input intended for phone numbers without enforcing a specific format. Many mobile
browsers display a numeric keypad to make entering a phone number easier.
E.g.: <input type="tel">
url: Designed for entering web addresses, this field expects a valid URL format. Browsers may validate
the entry and present a customized keyboard on mobile devices to aid with URLs.
E.g.: <input type="url">
color: Opens a color picker interface, allowing users to select or input a color code. Supported by
modern browsers, it simplifies color selection in forms.
E.g.: <input type="color">
date: Provides a date picker UI, making it easier to select dates without manual entry. This input is
often used for booking, scheduling, and date-related fields.
E.g.: <input type="date">
hidden: Stores data that isn’t visible to users, making it useful for tracking data or form state without
user interaction. It's often used to pass values to the server.
E.g.: <input type="hidden" name="user_id" value="12345">
Checkboxes Controls:-
Checkboxes are used when more than one option is required to be selected. They are also created using HTML
<input> tag but type attribute is set to checkbox.
E.g.: <input type="checkbox" name="interests" value="sports"> Sports
here is an example HTML code for a form with two checkboxes:
<!DOCTYPE html>
<body>
<form>
</form>
</body> </html>
<!DOCTYPE html>
File Select boxes:- 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. It's commonly used for document, image, and multimedia file uploads.
This is also created using the<input > element but type attribute is set to file.
<!DOCTYPE html>
<body>
<form>
</form>
</body></html>
Button Controls:-
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:
Submit: A button that submits form data to the server for processing. Upon clicking, it sends all form data to
the location specified in the form tag’s action attribute.
E.g.: <input type="submit" value="Submit">
Rreset: A button that resets all fields in the form to their initial values, useful for clearing user input quickly
without reloading the page.
E.g.: <input type="reset" value="Reset">
» <button>: The <button> element creates a clickable button, often used for form submissions, navigation, or
triggering JavaScript functions. Unlike <input type="submit">, it allows for more complex content within, such as
text, icons, or HTML.
E.g.: <button type="button">Click Me!</button>
The type attribute defines the button’s behavior (e.g., submit, reset, or button for custom actions), making
it versatile for interactive web forms and interfaces.
Using an image to submit a form: Using an image to submit a form in HTML can enhance the user interface and
make the submission process more visually appealing. This can be achieved by using the <input> element with
type="image". When the user clicks on the image, it acts as a submit button, sending the form data to the server.
<!DOCTYPE html>
<body>
<form>
<select name="dropdown">
<option value="C++" selected>C++</option>
<option value="HTML">HTML</option>
</select></form></body></html>
» <select>: The <select> element creates a dropdown menu that allows users to choose from a list of options.
Paired with <option> tags for each choice, it provides a compact way to present multiple selections. When
combined with attributes like multiple, it can also allow users to select more than one option..
E.g.: <select name="country">
<option value="usa">USA</option>
<option value="canada">Canada</option>
</select>
The <optgroup> element is used within <select> to group related <option> elements, making large lists more
organized and easier to navigate. The label attribute defines the group’s heading, which isn’t selectable.
E.g.: <select name="genre">
<optgroup label="Fiction">
<option>Science Fiction</option>
<option>Fantasy</option>
</optgroup>
<optgroup label="Non-Fiction">
<option>Biography</option>
<option>History</option>
</optgroup>
</select>
» <label>: The <label> element links descriptive text to a form control, improving accessibility and usability.
When a label is associated with an input (using the for attribute that matches the input’s id), users can click on
the label to focus or activate the input. This is particularly useful for screen readers, helping visually impaired
users understand form fields.
E.g.: <label for="username">Username:</label>
<input type="text" id="username" name="username">
» <textarea>: The <textarea> element creates a multi-line text input field, allowing users to enter larger
amounts of text, such as comments or messages. Unlike <input type="text">, <textarea> can expand vertically
and horizontally, making it ideal for longer input.
<!DOCTYPE html>
<html><head><title>Multiple-Line Input Control</title>
</head>
<body>
<form> Description: <br />
<textarea rows="5" cols="50" name="description">
Enter description here... </textarea>
</form>
</body>
</html>
The <legend> element provides a caption for the <fieldset>, describing its purpose to users and screen readers.
Placed at the top of the fieldset, it acts as a label for the grouped content.
<html>
<head>
</head>
<body>
<fieldset>
<legend>Personal Information</legend>
<br><br>
<br><br>
<label for="email">Email:</label>
</fieldset>
<br><br>
< /form>
</body>
</html>