Internet Fundamentals and HTML
Internet Fundamentals and HTML
It provides various services such as email, file transfer, It enables users to access websites, web pages, and
remote login, and browsing multimedia content through web browsers
Internet protocols such as TCP/IP govern the transmission of The World Wide Web uses HTTP (Hypertext Transfer Protocol)
data over the Internet for communication between web browsers and web servers
It is a network of networks that spans the globe, connecting The World Wide Web consists of interconnected web pages
various devices and networks that are linked through hyperlinks
The Internet is essential for various online activities, including The World Wide Web revolutionized the way information is
communication, information sharing, and online services accessed, shared, and published on the Internet
Internet connectivity is provided by Internet Service Providers Websites and web pages are created and hosted by
(ISPs) individuals, organizations, and businesses
Web Browsers and Web Servers with examples
Web Browser
• Definition: A web browser is a software application used to access and view websites on the internet. Examples
include Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge.
• Function: It requests web pages from servers, interprets the HTML, CSS, and JavaScript, and renders the
content so users can interact with websites. Essentially, it acts as the client in a client-server model.
• User Interaction: Browsers provide a graphical interface that allows users to navigate the web, enter URLs, and
interact with web content.
Web Server
• Definition: A web server is a software application or hardware device that stores, processes, and serves web
content to clients (such as browsers) over the internet. Examples include Apache, Nginx, and Microsoft IIS.
• Function: It handles incoming requests from web browsers, processes them (often involving fetching data from
databases or other resources), and sends back the requested web pages or files. It acts as the server in a client-
server model.
• Content Management: Web servers manage and serve static content (like HTML files) as well as dynamic
content (generated on-the-fly by server-side scripts or applications).
Working of web browser and Web Server
Parameters Web Browser Web Servers
Supported
HTML, CSS, JavaScript HTTP, HTTPs, and other web protocol
Technologies
Security
Cache and Cookies Firewalls and Intrusion Detection System
Features
Tag Description
<!DOCTYPE> This tag is used by the web browser to understand the version of the HTML used in the
document.
<html> Defines an HTML document
<head> Contains metadata/information for the document
• HTML lists allow web developers to group a set of related items in lists.
• HTML offers three ways for specifying lists of information. All lists must
contain one or more list elements.
Lists may contain
<ul> Unordered list - Used to create a list of related items, in no
particular order.
<ol> Ordered list-Used to create a list of related items, in a specific
order.
<dl> Description list - Used to create a list of terms and their
descriptions.
Unordered List
<!DOCTYPE html>
<html>
<body>
<ul type='square'>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
Ordered List
• "An Ordered list is a collection of related items that have special order
or sequence."
• An Ordered list created using the <ol> element, and each list item
starts with the <li> element.
• The list items in Ordered lists are marked with Numbers.
Here's an example:
<ol>
<li>Chocolate Cake</li>
<li>Black Forest Cake</li>
<li>Pineapple Cake</li>
</ol>
Ordered List Attribute
<html>
<body>
<ol start=4>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Example –"type"
<html>
<body>
<ol Type = "A">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Example -"type+Start"
</body>
</html>
<ol Type = "A" Start = 3>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
<html>
<body>
Description List
• "A description list is a list of items with a description
or definition of each item."
• The description list is created using <dl> element.
• The <dl> element is used in conjunction with the <dt> element which
specify a term, and the <dd> element which specify the term's
definition.
Example of definition list
<html>
<head>
<title> HTML DEFINITION LIST </title>
</head>
<body>
<dl>
<dt>HTML</dt>
<dd>Hyper Text Markup Language</dd>
<dt>HTTP</dt>
<dd>Hyper Text Transfer Protocol</dd>
</dl>
</body>
</html>
Assignment 1: Build a page as shown below
using <h1>,<ul>,<ol> and <em> tags
Tables
• We use <table> to create a table.
• <tr> defines a row, <th> defines a header cell, and <td> defines a
standard cell.
• The letters td stands for "table data," which is the content of a data
cell.
• A data cell can contain text, images, lists, paragraphs, forms,
horizontal rules, tables, etc.
• To display a table with borders, you will have to use the border
attribute.
• If you do not specify a border attribute the table will be displayed
without any borders.
Table Attributes
<table border="1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td rowspan="2" bgcolor="red">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr>
<tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr>
<tr> <td colspan="3" bgcolor="yellow">Row 3 Cell 1</td> </tr>
</table>
Attributes of table tag
• Align attribute of Table can positioning Tables and their contents in
relation to other elements on the Web page.
• Align attributes can be set in two levels
1. Table Alignment
2. The alignment of content inside the Table Cells.
Tables Backgrounds
• You can set table background using one of the following two ways
• bgcolor attribute - You can set background color for whole table or
just for one cell.
• background attribute - You can set background image for whole table
or just for one cell.
• You can also set border color also using bordercolor attribute.
• Table Caption: The caption tag will serve as a title or explanation for
the table and it shows up at the top of the table.
<table border="1">
<tr>
<td>ename</td>
<td>emp_id</td>
</tr>
<tr>
<td>Rohan</td>
<td>1JB11SCN01</td>
</tr>
</table>
• Image as a Link
We can use an image as a link, put the <img> tag inside the <a> tag
<a href="URL">text message</a>
<a href= URL ><img src= filename ></a>
Usemap attribute
• The usemap attribute is used to define an image map, which allows you to create click
able areas within an image.
syntax:
<img src="URL" usemap="URL">
• Tells the browser to display the source image and to map the second URL, the imagemap, onto it
<area shape= circle | rect | poly | defaulthref="URL" coords=s= string alt= string >
creates a clickable area on an image map.
Example:
<img src="./mappic.gif" usemap="#main_map"height=30 width=50>
<a name="#main_map" >
<map name="main_map">
<area shape="rect" href="./images/imgl.jpg"alt="Image One" coords="0,0,25,25">
<area shape="rect" href="./pagel.html"alt="Page One" coords="26,26,50,50">
<area shape=default href="./page32.html"alt="Page 32">
</map>
</a>
<body>
<img src="luke-miller-67k2pcAjisk-unsplash.jpg"
usemap="#image-map" alt="Example Image"
width="100" height="100" target="_blank">
<!-- Define the image map -->
<map name="image-map">
<!-- Define a rectangular clickable area -->
<area shape="rect" coords="34,44,270,350"
href="https://www.youtube.com/" alt="Section 1">
<!-- Define a circular clickable area -->
<area shape="circle" coords="150,150,50"
href="https://www.google.com/ alt="Section 2">
<!-- Define a polygonal clickable area -->
<area shape="poly" coords="10,10, 50,20, 20,40"
href="https://www.facebook.com/" alt="Section 3">
</map>
</body>
Forms
• 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.
Example
This example uses the GET method when submitting the form data:
• <form action="/action_page.php" method="get">
Attributes
• action: URL where the form data is sent.
• method: HTTP method used to send data (GET or POST).
• name: Name of the form control, which is used to reference the data on the server side.
• value: The value associated with an input element, like the text displayed on a submit
The differences between the two methods of submitting data
GET/POST are summarized below:
GET method.
• The GET method is the default method for browsers to submit information.
• GET is easy to deal and fast.
• All the information form the form is appended onto the end of the URL.
• It is not secure because the data input appears in the URL.
• Most browsers limit a URL to several thousand characters.
POST method.
• Used to pass large amount of information to the server.
• Contents are sent with HTTP request body not with URL
Assignment 3: Build a page as shown below and
text box shown it should be displayed at the center
of the browser window.
HTML FRAMES
• With frames ,you can display more than one HTML documents in the
same browser window.
• The frameset element holds one or more frame elements.
• Each html document is called frame and each frame is independent of
each other.
• <frameset> tag is used to divide Browser Window.
• <Body> tag is not required.
• The <frame> tag defines what HTML document to put into each frame.
• The <frameset> requires a mandatory attribute of either COLS or ROWS
that
• How much percentage/pixels of space will occupy each of them.
Attributes of the FRAMESET/FRAME tag are as given below.
Frameset.
• COLS : Defines the number of frame columns and their widths.
• ROWS : Defines the number of frame rows and their heights.
• FRAMEBORDER : Defines borders around each frame, A value of “0” leaves no visible
borders and a value of “1” display the border.
• FRAMESPACING : Defines the space in pixels between frames.
• SCROLLING : Determines weather or not scroll bars are displayed on all the frames, value
are YES, NO and AUTO.
Frame.
• NAME : Name of the frame.
• NORESIZE : Prevents the user from resizing the frame.
• SCROLLING : Control the display of scrollbars. The value are AUTO (or) NO.
• SRC : Specifies the full or partial URL of the document displayed in a frame.
• VERTICAL FRAMESET
<frameset Cols=”25%,50%,25%”> Frame_a.html
<frame src=”frame_a.html”/> <html>
<body style=”background-color: red”>
<frame src=”frame_b.html”/> <h3>frame A</h3>
<frame src=”frame_c.html”/> </body>
</frameset> </html>
FRAME_b.html FRAME_c.html
<html> <html>
<body style=”background-color : green”> <body style=”background-color: blue”>
<h3> frame B </h3> <h3> frame C </h3>
</body> </body>
</html> </html>
HTML FRAMES
Frame 1: f1.html
Output
Floating Frames (Inline Frames)
• Floating Frames
• Floating frames are scrollable areas that appear in a HTML document. Unlike regular
frames they cannot be resized.
• Unlike the <FRAME> element which should occur only within the
• <FRAMESET> element.
• <IFRAME> tag and may occur anywhere within the <BODY> tag