π Lecture 1 β E-Commerce and its types, Internet and WWW Basics, Internet standards and protocols, IP addressing, Data communication on internet, Domain name system
π Overview: This lecture introduces the fundamental concept of electronic commerce (e-commerce), its various classifications based on the nature of transactions, and core networking basics. It explains the distinction between the Internet and the Web, the client-server model, and the stateless nature of HTTP, which is crucial for understanding how online transactions and user data logging work.
ποΈ Topics Covered
The lecture begins with a course outline and recommended books, then defines e-commerce and classifies it by transaction type: B2B, B2C, C2C, C2B, Intra-Business, and Non-Business EC. It then covers basic definitions of web client, server, browser, intranet, extranet, and internet, followed by the client-server model. The Web is defined as a protocol using HTTP, and the four-step HTTP process is explained, highlighting its stateless nature and the side effect of creating common log files.
π Lecture Summary
E-Commerce definition
Electronic commerce is an emerging concept that describes the process of buying and selling or exchanging of products, services and information via computer networks including the internet.
E-commerce classification
A common classification of EC is by the nature of transaction:
- Business-to-Business (B2B): electronic market transactions that take place between organizations
- Business-to-Consumer (B2C): retailing transactions with individual shoppers β typical shopper at Amazon.com is a consumer
- Consumer-to-Consumer (C2C): consumer sells directly to consumers, examples - individuals selling in classified ads, auction sites allowing individuals to put up items for auction β e.g., e-bay
- Consumer-to-Business (C2B): individuals who sell products or services to organizations and those who seek sellers and conclude a transaction
- Intra Business (organizational) EC: all internal organizational activities involving exchange of goods, services or information, selling corporate products to employees, online training and cost reduction activities
- Non-Business EC: academic institutions, not-for-profit organizations, religious/social organizations and government agencies using EC to improve their operations, customer service and reduce expense
Basic Definitions
- Web client: machine that initiates internet request
- Web server: machine that services internet request
- Browser: software at the client side to interact with web data
- Intranet: an internal network of computers confined to a single place
- Extranet: when two or more intranets are connected with each other, they form an Extranet β e.g, Virtual Private Network
- Internet: a global network of networks is defined as internet
The Internet presents a two-way client server communication model as shown in Fig. 1 below: Client-Server Model (Fig. 1 reference)
What is the WEB?
The Web is a protocol that uses the internet as the communication structure. It links documents stored in computers that communicate on the internet. It is based on Hypertext Transfer Protocol (HTTP) - native protocol of WWW designed for making web page requests.
HTTP is a four step process per transaction:
- Client makes an HTTP request for a web page, and makes a TCP/IP connection
- Server accepts request
- Server sends page as HTTP response
- Client downloads the page and Server breaks the connection
π Definition β HTTP: Hypertext Transfer Protocol, the native protocol of the World Wide Web designed for making web page requests. It is a four-step process per transaction involving a client request and server response.
Side Effect of HTTP Transfers
A record is left of all web transaction in a file that resides at the server called common log file. Good news is that some user data (record of his visits to the web sites) is recorded in a particular format in the log files. Bad news is that user privacy is not maintained.
HTTP is stateless because in the fourth step the server breaks the connection. This means:
- Each operation or transaction makes a new connection
- Each operation is unaware of any other connection
- Each click is a new connection
π Stateless Protocol: HTTP is stateless because the server breaks the connection after each transaction, meaning each click establishes a new connection with no memory of previous interactions.
π‘ Why this matters: The stateless nature of HTTP is a fundamental limitation for e-commerce. To maintain a shopping cart or user session across multiple page requests, additional technologies like cookies or server-side session management must be used to simulate statefulness.
What can you do with this data?
- Rearrange your site by knowing which portions of your web site are popularly accessed and which are ignored by the users
- Change your marketing strategy β e.g., you can introduce some promotional scheme for boosting the sale of ignored items
- Make a mailing list β you can trace the location from where customers are visiting and prepare a mailing list for marketing purposes
β Key Takeaways
E-commerce is the exchange of products, services, and information via computer networks, classified primarily by transaction type (B2B, B2C, C2C, C2B, Intra-Business, Non-Business). The Internet is a global network of networks, while the Web is a protocol (HTTP) running on top of it. HTTP is statelessβeach click creates a new, independent connection. This statelessness results in a common log file at the server, recording all transactions, which can be analyzed for site optimization and marketing, but raises privacy concerns. Understanding these basics is essential for grasping how e-commerce platforms operate and track user behavior.
π§ Quick Revision Questions
- Define electronic commerce and list the six classifications of e-commerce by the nature of transaction.
- What is the difference between an intranet, an extranet, and the internet?
- Describe the four-step process of an HTTP transaction.
- What does it mean that HTTP is "stateless"? Give one practical consequence of this for e-commerce websites.
- What is a common log file, and what are two business uses of the data it contains?
π Lecture 2 β What Is a Network
π Overview: This lecture introduces the fundamental concept of computer networks, their purposes, and the layered models that govern how data is communicated across them. It explains both the conceptual OSI model and the practical TCP/IP stack used on the internet, culminating in a detailed discussion of IP addressing and its classes, which is essential for understanding how devices are identified and located on a network.
ποΈ Topics Covered
The lecture begins by defining a network and local area network (LAN) and listing reasons for networking. It then introduces network protocols and the ISOβs OSI model, describing each of its seven layers in detail from Application to Physical. The mapping between the OSI model and the four-layer TCP/IP internet stack is explained with a table of important protocols. Finally, the lecture covers IP addressing, including decimal-to-binary conversion, and the five classes of IP addresses (A, B, C, D, E) with the rules for identifying them and their network/host byte divisions.
π Lecture Summary
What is a Network
A network can be anything from a simple collection of computers at one location connected through a connectivity media to the internet (a global network of networks). A Local Area Network (LAN) is a server-based network confined to a particular area or place. Most LANs consist of many clients and a few servers.
Why networking your computer
We network our computers to share resources and communicate. Networking is done for:
- File sharing
- Hardware sharing β printer sharing, for example
- Program sharing
- User communication through a machine called e-mail server
Network protocol
Network protocols are those standard rules using which computers on a network communicate and exchange data with each other. A group of protocols that prepare the data for communication on the network is called the Protocol stack.
International organization for standardβs (ISO) model
In the 1970s, ISOβs OSI model was developed β a conceptual model for network communications. OSI stands for Open System Interconnection Reference Model and it proposes a 7 layer architecture. Each layer (except physical layer) at the sending machine sends instructions through its header to the receiving machine as to how the accompanying data be interpreted or treated. Header is a piece of information attached to the data at its beginning by each layer except the physical layer. The process of moving the data down the OSI Protocol stack at the sending machine is called Encapsulation, and the process of moving the data up the OSI stack at the receiving side is called De-encapsulation.
Application layer
It sits at the top of the OSI model. Requests related to file transfer and database queries are handled by this layer. Two very important protocols, namely, HTTP and FTP (file transfer protocol) operate at this layer.
Presentation layer
It is the translator of the OSI model. It provides instructions through its header that how the accompanying data should be formatted by the receiving machine. MIME - multipurpose internet mail extensions protocol operates at this layer to define file formats and data types.
Session layer
It provides instructions about the nature of communication link between the sending and receiving machine during a session. A combination of protocols called Session Protocol Data Units work at this layer. Three modes of communication are simplex, half-duplex and full-duplex. π Definition β Simplex: communication in one direction only. π Definition β Half-duplex: communication in two directions but one party can send data at a time. π Definition β Full-duplex: communication in two directions while both parties are able to send data simultaneously. It also places special checkpoints on data packets to trace any lost packets.
Transport layer
TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) operate at this layer. It has two functions. It converts the data into data packets. Secondly, it is responsible for flow control of data. TCP is more reliable as it is acknowledgment based as opposed to UDP which does not use any system of acknowledgment for the delivery of data packets.
Network layer
It is responsible for providing IP addresses on data packets using IP protocol. Routing Information Protocol (RIP) also operates here which enables routers to build their routing table. Another protocol, Address Resolution Protocol (ARP) is also designed to operate at the network layer.
Data link layer
It places data packets into data frames. Network Interface Card Drivers/Protocols operate at this layer. It is used to identify MAC or hardware address of computer machines. A mathematical calculation, Cyclical Redundancy Check (CRC), takes place here to confirm integrity of data frames.
Physical layer
It has got no header. All information including the header information is converted into binary data at this layer. It results into the generation of electric signals as 1s and 0s are queued up and travel along the connectivity media to the receiving side.
Internet layers- TCP/IP stack
The internet communication model (TCP/IP Stack) proposes a 4 layer architecture. The layers map with the OSI modelβs layers as follows:
- Application layer is equivalent to OSI modelβs Application, Presentation and Session layers
- Host-to-Host Layer is equivalent to OSI modelβs Transport layer
- Internet layer is equivalent to OSI modelβs Network layer
- Network Access layer is equivalent to OSI modelβs Data link layer
IP addressing
IP addressing is the logical addressing scheme used to identify computer machines on the internet. Each computer has a unique IP address provided by IP protocol for a given session. It is represented by four decimal numbers separated by a period, e.g., 140.57.220.200. Computers see this information as a stream of 32 bits.
Classes of IP address
There are five classes of IP addresses, namely, A, B, C, D and E. Classes A, B and C are for general public use, whereas Classes D and E are used by people belonging to certain special groups. To find which class a particular IP address belongs to, the rule is to look at the number in the first byte. If this number falls within the calculated range of a specific class, then we can say that this IP address belongs to that particular class.
By rule, in class A networks the first byte would refer to the network address and the remaining three bytes to the host machines on that network, providing a very large network. In class B, the first two bytes indicate the network address and the last two bytes indicate the host machines, giving a medium-sized network. In class C, the first three bytes refer to the network address and the last byte to the host machines, which would be a very small network.
π‘ Why this matters: Understanding IP address classes is fundamental for network design, subnetting, and troubleshooting. It determines how many devices can be connected on a network and how network traffic is routed.
β Key Takeaways
A network enables resource sharing and communication, guided by protocols that form a stack. The OSI model is a 7-layer conceptual framework for understanding network communication, where data is encapsulated (headers added) at each layer on the sender side and de-encapsulated (headers removed) at the receiver side. The practical TCP/IP stack has only 4 layers, mapping Application, Presentation, and Session into one, and Data Link into Network Access, with TCP (reliable) and UDP (unreliable) operating at the Host-to-Host/Transport layer. IP addressing is a 32-bit logical scheme represented in dotted decimal notation, and the first byte determines the class (A, B, C for public use; D, E for special groups) which dictates how many bytes are for the network versus host portion.
π§ Quick Revision Questions
- What are the two main processes of moving data down and up the OSI protocol stack called?
- Which OSI layer is responsible for placing data into frames and performing a CRC check?
- How does the Host-to-Host layer in the TCP/IP stack map to the OSI model?
- Given an IP address of 200.10.5.1, which class does it belong to, and how many bytes represent the network portion?
- What is the key difference between TCP and UDP protocols at the Transport layer?
π Lecture 03 β How Many Class A, B, C Networks and Hosts Are Possible?
π Overview: This lecture covers the fundamentals of IP addressing structures, including the classification of networks into Class A, B, and C, along with their capacity limits. It also introduces essential networking concepts like subnet masks, the Domain Name System (DNS), name resolution processes, and the difference between IP and MAC addresses, which are crucial for understanding internet communication.
ποΈ Topics Covered
The lecture begins by explaining the number of possible class A, B, and C networks and the maximum hosts each can accommodate. It then defines the subnet mask and its role in identifying network and host portions of an IP address, providing default masks for each class. The discussion moves to IP version 6 as the successor to version 4, followed by a detailed explanation of the Domain Name System (DNS), including top-level domains (TLDs) and second-level domains (SLDs). The process of name resolution using Domain Name Servers is illustrated with examples, and the lecture concludes with an overview of how domain names and IP addresses are administered by organizations like ICAAN and the concept of the Media Access Control (MAC) address.
π Lecture Summary
HOW MANY CLASS A, B, C NETWORKS AND HOSTS ARE POSSIBLE?
There are 126 class A networks possible (0 and 127 are not used for general purposes). Each class A network can accommodate a maximum of 16 million hosts. There are 16384 class B networks possible, each hosting up to 65000 host machines. There are 2 million class C networks possible, each capable of accommodating up to 256 host machines.
π Definition β Class A, B, C Networks: These are categories of IP addresses in IPv4, defined by the first octet, which determine the number of possible networks and hosts per network. π Example: A single Class A network can theoretically support 16 million devices, while a Class C network can only support 256.
Subnet mask
An IP address is meaningless for computers unless it is accompanied by a subnet mask. It tells computer machines what part of the accompanying IP address corresponds to the network address and what part corresponds to the host machine on that network. A subnet mask is also represented by four decimal numbers separated by a period. Default subnet masks for class A, B, and C types of IP addresses are as follows:
- Class A: 255.0.0.0
- Class B: 255.255.0.0
- Class C: 255.255.255.0
π‘ Why this matters: Without a subnet mask, a computer cannot distinguish between the network ID and the host ID, making routing impossible.
IP version
The existing IP scheme (version 4) is likely to be replaced by IP version 6. It would provide 128 bits IP addresses in hexadecimal format. According to an estimate, a total of 3.4 x 10Β³βΈ addresses would then be available.
π Definition β IP Version 6 (IPv6): A newer version of the Internet Protocol designed to replace IPv4, using 128-bit addresses to vastly increase the number of available addresses.
π Formula: IPv6 Address Space = 2ΒΉΒ²βΈ = 3.4 x 10Β³βΈ addresses.
π Example: IPv6 addresses look like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Domain name system
A Domain Name is a user-friendly name used to locate a web site on the internet (e.g., vu.edu, bestcomputers.com). The Domain Name System (DNS) provides the structure and strategy used to refer to computers on the internet by these user-friendly names. Domain Names are unique and are assigned after one pays and registers for them. With the help of DNS, a domain name is translated into its corresponding IP address. A fully qualified domain name is processed from right to left for translation. It can be made up of a top level domain (TLD), second level domain (SLD), and subdomains. Seven popular TLDs are ".com", ".edu", ".org", ".gov", ".net", ".countryname", and ".int". SLDs represent the name of a company/institution/entity. Subdomains represent the geographical or functional units of a company/institution.
π Definition β Fully Qualified Domain Name (FQDN): The complete domain name for a specific computer, or host, on the internet, specifying all domain levels.
π Example: In ecom.cs.vu.edu, .edu is the TLD, vu is the SLD, and cs and ecom are subdomains.
Name resolution
The translation or resolution of a fully qualified domain name into its IP address takes place using the hierarchy of special computer machines called Domain Name Servers. A DNS server is a server on the network that maintains a database/table containing the list of domain names and their corresponding IP addresses. The name servers for TLDs are also called Root Name Servers. There is a program called Resolver built into the browser, which sends the request for resolution of the domain name to a Local Name Server. The local name server then contacts the root name server, which looks into its database and where possible provides the IP address of the name server below in the hierarchy. Hence, in a similar number of steps, the fully qualified domain name is completely translated into the IP address of the web server.
π‘ Why this matters: This hierarchical process allows the global DNS system to be scalable and manageable, preventing every server from needing to know every other server's IP address.
Getting domain names and IP addresses
Domain names are administered in a hierarchy. At the global level, the task of registration/administration of domain names is supervised by the organization called Internet Corporation for Assigned Names and Numbers (ICAAN). There are organizations working under ICAAN in different regions, such as APNIC for Asia and Pacific Rim, ARIN for America and South Africa, and RIPE-NCC for Europe and North Africa. Each of these are further connected to Internet Service Providers (ISPs) at the local level. One can register a domain name through an ISP. Similarly, one can lease IP addresses from a local ISP. ISPs can use a server to dynamically supply IP addresses to their clients for a session, called a DHCP (Dynamic Host Configuration Protocol) server.
π Definition β DHCP Server: A network server that automatically assigns IP addresses and other network configuration parameters to devices on a network. π‘ Why this matters: DHCP automates IP address management, preventing conflicts and simplifying network administration.
Media access control (MAC) address
Data to be delivered on a network must be converted first into serial transmission. This is done through a device called a Network Interface Card (NIC) installed in a computer. The NIC has a 48-bit unique address printed on it called the MAC or hardware address of the computer. It consists of 12 hexadecimal characters and can have different formats, e.g., 090017A9B2EF, 09:00:17:A9:B2:EF, or 09-00-17-A9-B2-EF. While the IP address of a computer may change, its MAC address remains the same unless the NIC is replaced. There are 2β΄βΈ unique MAC addresses possible. The organization Institute of Electrical and Electronic Engineers (IEEE) administers the allocation of MAC addresses worldwide, ensuring no duplication by NIC manufacturers.
π Definition β MAC Address: A unique hardware identifier assigned to a Network Interface Card (NIC) for use at the data link layer of a network segment.
π Formula: Total possible MAC addresses = 2β΄βΈ.
π Example: 09:00:17:A9:B2:EF is a unique identifier for a specific network card, distinct from any IP address assigned to that computer.
β Key Takeaways
A student must remember the precise number of networks and hosts for each IP class (126 Class A networks with 16 million hosts each, 16,384 Class B networks with 65,000 hosts, and 2 million Class C networks with 256 hosts). The subnet mask is critical for distinguishing the network and host portions of an IP address, with default masks (255.0.0.0 for A, etc.) being essential knowledge. The Domain Name System translates user-friendly names to IP addresses via a hierarchical process involving root and local name servers, and the fully qualified domain name structure consists of TLD, SLD, and subdomains. Finally, the MAC address is a permanent, 48-bit hardware identifier for a NIC, managed by IEEE, while IP addresses can be dynamic and are administered by organizations like ICAAN and its regional bodies.
π§ Quick Revision Questions
- What are the default subnet masks for Class A, Class B, and Class C IP addresses?
- How many Class B networks are possible, and what is the maximum number of hosts each can support?
- Explain the role of a "Resolver" program in the name resolution process.
- What is the difference between a MAC address and an IP address?
- Name the global organization that supervises the registration and administration of domain names.
π Lecture 4 β NETWORKING DEVICES
π Overview: This lecture covers the physical layout and topological structures of Local Area Networks, alongside the hardware devices that enable and manage network communication. It explains how devices like hubs, bridges, switches, and routers function at different levels, and introduces cabling options and the role of ISPs in internet connectivity, which is fundamental for understanding e-commerce infrastructure.
ποΈ Topics Covered
The lecture begins by explaining LAN topologies (Bus, Star, Ring) and networking approaches (Server-based vs. Peer-to-Peer). It then details networking devices including Hubs, Repeaters, Bridges, Switches, and Routers, explaining their functions, how they manage traffic, and conserve bandwidth. The second half covers physical cabling options (copper, fiber optic, telephone/electrical) and wireless options (WiFi, Bluetooth, infrared, satellite). Finally, it introduces Address Resolution Protocols (ARP/RARP) and concludes with the hierarchical role of ISPs on the internet.
π Lecture Summary
Topology of a LAN means its physical lay out. There are three main types of Network Topology, namely, Bus Topology, Star Topology and Ring Topology as shown in Figures 1-3 below. There are two different approaches to networking β Server-based and Peer-to-Peer approach.
The physical layout of a Local Area Network is its topology, with three primary types: Bus Topology (all devices share a single cable), Star Topology (all devices connect to a central hub/switch), and Ring Topology (devices are connected in a closed loop). Networking approaches differ between Server-based networks, where a centralized server manages resources and serves user requests, and Peer-to-Peer networks, where all machines have equal capability and can act as both client and server.
Networking devices
Hubs provide a central connection point for a LAN, organizing cables and relaying data signals to all connected computers. They have ports on the back for connecting computers and come in various sizes and shapes. Hubs simply broadcast all data to every port without any intelligence.
Repeaters regenerate and amplify electric signals to extend the distance of a network. However, they have no capabilities for directing network traffic or filtering data.
Bridges
A Bridge is a combination of hardware and software with its own operating system. It helps conserve bandwidth, which is the speed of a network indicating how many bits can be transmitted in a given time. A bridge physically divides a larger network into smaller segments. It reads the MAC (Media Access Control) or physical address of a computer on data packets. This address is printed on the Network Interface Card. The bridge matches this MAC address with one stored in its table to determine which segment a packet belongs to, sending the packet only to that segment and preventing other segments' traffic from entering.
π Definition β MAC Address: A unique physical address printed on the Network Interface Card that identifies a device on a local network.
π Example: In a network with two segments (Segment A and Segment B), a bridge separates them. If Computer X in Segment A sends data to Computer Y also in Segment A, the bridge reads the MAC address, sees it belongs to Segment A in its table, and only forwards the packet within Segment A. Packets from Segment B are not allowed into Segment A, thus conserving bandwidth.
π‘ Why this matters: Bridges reduce unnecessary traffic by ensuring data only travels within its relevant network segment.
Switches
A Switch is also a combination of hardware and software with its own operating system, used to increase network bandwidth. However, a switch virtually divides a network into small segments called Virtual LANs or VLANs. Similar users can be grouped into a VLAN without physical proximity. A switch reads the MAC address on a packet and matches it with its list of MAC addresses, sending the packet only to the specific machine on the relevant VLAN. Packets from other VLANs are blocked from entering a particular VLAN, increasing bandwidth.
π Definition β VLAN (Virtual LAN): A logical grouping of devices on a network that are segmented by function or user type rather than physical location.
Routers
Routers use hardware and software to forward data packets to their destination on the internet. They are more efficient and sophisticated than bridges and switches. Routers divide large networks into logical segments called Subnets based on IP addressing schemes. A router communicates with other routers using the Routing Information Protocol to build a routing table. This table contains information about different network addresses and routes for delivery. A router is a decision-making device that reads network addresses from the IP address on a data packet and determines the shortest possible path for delivery.
π Definition β Subnet: A logical subdivision of an IP network, created by dividing a network into smaller, manageable segments.
π Example: Client machine 'A' on network 140.57 wants to send data to web server 'B' on network 100. Router R1, attached to network 140.57, consults its routing table. It finds the shortest path is to forward data to Router R2, attached to network 100. If R1-R2 is blocked, R1 finds the alternative shortest path: R1-R3-R4-R2.
Cabling options
Copper-based cables are common for connecting computers, with two main types: coaxial and twisted pair. Twisted pair has two options: Unshielded Twisted Pair (UTP) and Shielded Twisted Pair (STP). Fiber optic cables are used on the internet, delivering data at very high speed using glass or plastic filaments and pulses of light. Telephone and electrical wire networks can also be used for connectivity. Wireless options include radio connectivity (WiFi, Bluetooth), infrared connectivity, and Satellite microwave transmissions.
Address resolution protocols (ARP) and Reverse address resolution protocol (RARP)
Each computer on the internet creates a list of its IP address and corresponding MAC address using ARP (Address Resolution Protocol). Through RARP (Reverse Address Resolution Protocol), this information is forwarded to a network server. When a data packet arrives at the destination router, it inquires about the corresponding MAC address from the network server, inserts it, and delivers the packet to that MAC address. A data packet therefore needs both IP and MAC addresses to reach its destination.
π Definition β ARP: Protocol that resolves an IP address to its corresponding MAC address on a local network.
Role of ISPs on internet
Internet Service Providers (ISPs) are organizations that provide internet connections and offer services like web hosting, newsgroups, and email. They work in a hierarchy. The ISP at the top, connected to the internet backbone, is called an Internet Access Provider (IAP). An internet trunk line or backbone passing through a metropolitan area is called a Metropolitan Area Ethernet (MAE). IAPs connect to MAEs at points called Network Access Points (NAPs). Trunk lines allow IAPs to move data, and actual routing of data packets takes place on the internet backbone.
π Definition β IAP (Internet Access Provider): An ISP at the top of the hierarchy directly connected to the internet backbone.
π Definition β MAE (Metropolitan Area Ethernet): An internet backbone trunk line passing through a metropolitan area.
π Definition β NAP (Network Access Point): The points where IAPs connect to MAEs.
β Key Takeaways
This lecture is critical for understanding how networks are physically and logically organized. The three fundamental LAN topologies (Bus, Star, Ring) and the two networking approaches (Server-based vs. Peer-to-Peer) form the basis of network design. Each networking device has a distinct role: Hubs broadcast data, Repeaters amplify signals, Bridges and Switches conserve bandwidth by segmenting networks (physically and virtually, respectively), and Routers make intelligent path decisions on the internet using routing tables. You must remember that Bridges use MAC addresses to divide a network into physical segments, while Switches create VLANs, and Routers use IP addresses to create Subnets. Finally, ARP/RARP protocols link IP and MAC addresses, and ISPs operate in a hierarchy with IAPs, MAEs, and NAPs to provide internet connectivity.
π§ Quick Revision Questions
- What is the main difference between a Bridge and a Switch in terms of network segmentation?
- How does a Router determine the best path for a data packet to reach its destination?
- Explain the difference between ARP and RARP protocols.
- What is the role of an Internet Access Provider (IAP) in the ISP hierarchy?
- Name the three major LAN topologies and briefly describe how devices are connected in each.
π Lecture 5 β Basics of HTML
π Overview: This lecture introduces the fundamentals of email protocols and HTML (Hypertext Markup Language) for creating web documents. Students learn how to structure a basic web page, format text, create lists, and apply images β essential skills for e-commerce web development.
ποΈ Topics Covered
Email protocols (SMTP, POP3, IMAP), HTML document structure with tags and attributes, text formatting tags (p, b, i, u, big, small), font tag properties, heading levels, steps for creating a basic HTML page, ordered and unordered lists with list types, applying and downloading images with img tag attributes.
π Lecture Summary
Email Protocols
Email addresses like john@hotmail.com are delivered by first translating the domain part (hotmail.com) into the IP address of the email server through DNS. Messages are stored in user accounts on the email server. Three common protocols are used: Simple Mail Transfer Protocol (SMTP) for sending messages between servers (message uploads), Post Office Protocol 3 (POP3) for retrieving messages by downloading them to the client machine and then deleting them from the server, and Internet Message Access Protocol (IMAP) which also retrieves messages but does not delete them from the server, allowing access from multiple locations. POP3 and IMAP must be configured with SMTP for full email functionality.
π Definition β DNS (Domain Name System): Translates domain names (like hotmail.com) into IP addresses of the corresponding server. π‘ Why this matters: Understanding these protocols is essential for configuring email systems in e-commerce platforms.
Hypertext Markup Language
Web documents are defined by Hypertext Markup Language (HTML), which is a language of tags. A tag is a special letter or keyword enclosed in angular brackets (< >). Most tags have corresponding closing tags represented by the same keyword preceded by a slash (/). HTML is case independent and has a fixed number of tags and attributes β specific words/letters prescribed for certain tags with possible values. The browser reads/interpreters each tag and its attributes to display results. View source code using the "View Source" option in the browser menu.
An HTML document starts with <HTML> tag and its closing </HTML>. The entire content is contained within a <body> tag pair. A <head> tag can be used before the body to provide title and other information. Example structure:
<HTML>
<HEAD>
<TITLE>My first page</TITLE>
</HEAD>
<BODY>
A simple page with just this sentence
</BODY>
</HTML>
Text Formatting
The paragraph tag <p> can include an align attribute with values Center, Left, or Right. <br> tag provides a line break. <center> aligns text in the center. Text formatting tags include:
<b></b>for bold text<i></i>for italic text<u></u>for underlined text<big></big>for larger font size<small></small>for smaller font size
π Definition β Tag: A special keyword enclosed in angular brackets that defines how content is displayed.
Font Tag
The font tag defines various font properties with attributes Size, Face, and Color. Attributes can be used simultaneously, for example: <font size=5 color=red face=Arial>internet and e-commerce</font>. Font size specifies text size, face specifies the font family, and color specifies text color.
Example code showing multiple formatting:
<HTML>
<HEAD></HEAD>
<BODY>
<H1>This is my main title</H1>
<p>Here is the first paragraph. This is some <b><i>bold text</i></b></p>
<p><font face="Arial">This text is in the Arial font.</font>
</BODY>
</HTML>
Heading in HTML
Six different levels of headings can be created, from largest to smallest:
<H1>Level 1 β largest text</H1><H2>Level 2</H2><H3>Level 3</H3><H4>Level 4</H4><H5>Level 5</H5><H6>Level 6 β smallest text</H6>
Creating Basic HTML
Steps for creating/viewing a web page:
- Open a text editor like Notepad or WordPad
- Type the HTML code
- Save as a "text" file with
.htmlextension (e.g., filename.html) - Start a browser
- Open the file through File menu -> Open
- Browse to find the file, click Open and OK
- To make changes: go back to the text editor, make changes and SAVE
- Go back to browser, reload using 'Refresh' icon, 'Refresh' button in View menu, or F5 key
List in HTML
<UL></UL> creates an unordered list (bulleted), while <OL></OL> creates an ordered list (numbered). Use <LI></LI> tags between them for each list item. Example:
<UL>
<LI>Item1</LI>
<LI>Item2</LI>
<LI>Item3</LI>
</UL>
<P>
<OL>
<LI>Item1</LI>
<LI>Item2</LI>
<LI>Item3</LI>
</OL>
The <hr> tag creates a horizontal line with attributes Width, Size, Align, and Noshade. Both <hr> and <br> tags do not have closing tags. Unordered lists can use Type attribute with values Square, Disc, or Circle. Ordered lists can use Type attribute with values a (lowercase letters), A (uppercase), i (small Roman numerals), I (large Roman numerals), or default 1,2,3.... Example: <OL Type="a"><LI>First></LI><LI>second</LI></OL>
Applying Images in HTML
Use the <img> tag with src attribute containing the image file name to display images. The browser displays the image where the <img> tag appears in code. Common image formats are .gif and .jpg. Additional attributes include Width and Height (specifying image size) and Align (specifying position on the page). Example: <Img Src="cassette.gif" width="80%" height="50%" Align="Middle">
To download an image from the web:
- Right-click on the image
- Choose 'Save Picture' or 'Save Picture As'
- Rename if desired (but cannot change file type)
- Save preferably in the same folder as the HTML document
- Reference the image in HTML using
<img>tag
π Example: <Img Src="cassette.gif"> displays the cassette.gif image at the point where the tag appears in the code.
π Definition β Attribute: A property within an HTML tag that defines additional characteristics or behaviors (e.g., align, size, src).
β Key Takeaways
Students must understand that HTML is a tag-based language with fixed tags and attributes, where most tags have closing tags (except self-closing ones like <br> and <hr>). The three email protocols serve different purposes: SMTP for sending, POP3 for downloading with deletion, and IMAP for accessing without deletion. Creating a web page requires saving text files with .html extension and refreshing the browser after edits. Lists can be unordered (UL) with different bullet types or ordered (OL) with different numbering systems. Images are applied using the <img> tag with src attribute, and images should be saved in the same folder as the HTML document for easy referencing.
π§ Quick Revision Questions
- What are the three common email protocols and what is the main difference between POP3 and IMAP?
- What is the basic structure of an HTML document? List all required and optional tags in order.
- How do you create an ordered list with lowercase letters in HTML?
- What attribute would you use to change the font face and color of text in HTML?
- What are the steps to download an image from the web and use it in your own HTML page?