Notes
Notes
CCS375
INTRODUCTION
he internet works because computers talk to each other using a
T
common language. That language is HTTP — HyperText Transfer
Protocol. Every time you open a webpage, your browser sends a request
and the server sends back a response. Understanding this message
format is the foundation of all web communication.
DEFINITION
TTP (HyperText Transfer Protocol)is an application-layer,stateless,
H
request-response protocol used for communication between a client
(browser) and a server over the internet. It operates onport 80(HTTP)
andport 443(HTTPS).
TOPICS & SUBTOPICS
[Request Line]
[Headers]
[Blank Line]
[Body (optional)]
M
● ethod— What action to perform
● Request URI— The resource being requested
● HTTP Version— Which version of HTTP is being used
Format:
ontent-T F
C ormat of body being ontent-Type:
C
ype sent application/json
nly present in POST, PUT, PATCH requests. Contains the actual data
O
being sent.
Host: [Link]
Accept-Language: en-US
Connection: keep-alive
Host: [Link]
Content-Type: application/x-www-form-urlencoded
Content-Length: 35
username=john&password=secret123
[Status Line]
[Headers]
[Blank Line]
[Body (optional)]
Format:
Status codes are 3-digit numbers that tell the result of the request.
1xx Informatio R
equest received,
nal processing
4xx lient
C Problem with request
Error
5xx erver
S roblem on server
P
Error side
Important Status Codes:
301 M
oved URL changed forever
Permanently
302 F
ound Temporary redirect
(Redirect)
503 S
ervice Server overloaded
Unavailable
Header Meaning
ontent-Typ F
C ormat of
e response body
ontent-Le S
C ize of body in
ngth bytes
Set-Cookie S
ends cookie to
client
ache-Cont Caching
C
rol instructions
Server: Apache/2.4.41
Content-Length: 256
<!DOCTYPE html>
<html>
<body>
<h1>Welcome to [Link]</h1>
</body>
</html>
Versio Y
ea Key Feature
n r
TTP/1 1
H 99 O
ne request per
.0 6 connection
TTP/1 1
H 99 P
ersistent connections,
.1 7 pipelining
HTTP/2 2
01 M
ultiplexing, header
5 compression
HTTP/3 2
02 U
ses QUIC protocol
2 (faster)
ecuri None
S SL/TLS
S
ty Encryption
Usage O
ld All modern sites
websites
| |
| Host: [Link] |
| |
|<------ HTTP RESPONSE --------------|
| HTTP/1.1 200 OK |
| Content-Type: text/html |
| <html>...</html> |
| |
APPLICATION
● rowser-server communication for every webpage
B
● REST APIs use HTTP methods for CRUD operations
● Mobile app data fetching from backend servers
● Search engines crawl websites using HTTP GET
● E-commerce (login, checkout) uses POST with HTTPS
ADVANTAGES
● imple and human-readable text format
S
● Platform and language independent
● Stateless design allows easy scalability
● Flexible — can transfer any type of data
DISADVANTAGES
S
● tateless — server remembers nothing (needs cookies/sessions)
● Plain HTTP has no security
● High overhead for small requests due to large headers
REAL WORLD ANALOGY
Think of HTTP likeordering food at a restaurant:
CONCLUSION
TTP is the backbone of all web communication. Every request carries a
H
method, URI, headers, and optional body. Every response carries a
status code, headers, and the actual content. Understanding this
message format is essential for web development, API design, and
debugging network issues.
🧠 MEMORY TRICK
For Request parts:"R-H-B"→Request Line →Headers→Body
TTP Methods:"GPPDHOP"→GET,POST,PUT,DELETE,HEAD,
H
OPTIONS,PATCH
UESTION 2: HTML5 Form Elements and
Q
Control Elements
INTRODUCTION
TML5 revolutionized the web by introducing powerful new form
H
elements, input types, and multimedia capabilities. Before HTML5,
developers needed JavaScript for validation and Flash for media.
HTML5 brought all this natively into the browser, making web pages
smarter and richer.
DEFINITION
TML5is the fifth major revision of the HyperTextMarkup Language. It
H
introduced semantic elements, new input types, built-in form validation,
drag-and-drop API, and native audio/video support — eliminating the
need for third-party plugins like Flash.
</form>
novalidate S
kip HTML5 novalidate
validation
utocompl E
a nable autocomplete="on"
ete autocomplete
<datalist id="cities">
<option value="Chennai">
<option value="Mumbai">
<option value="Delhi">
</datalist>
<fieldset>and
.
3 <legend>— GroupingGroups relatedform
controls visually.
<fieldset>
<legend>Personal Details</legend>
<input type="text" name="name">
</fieldset>
url RL with
U Website field
validation
tel elephone
T Phone field
number
Examples:
Attribut Purpose
e
in /
m Numeric limits
max
disabled G
rayed out, not
submitted
multiple ccept multiple
A
values
Key Events:
How it Works:
Example (Concept):
Drag Me
</div>
Drop Here
</div>
Real World Use Cases:
● ile upload by dragging files into browser
F
● Kanban boards (Trello-style task movement)
● Image gallery reordering
● Shopping cart drag-and-drop
</audio>
Audio Attributes:
Attribu Purpose
te
c ontrol S
hows
s play/pause/volume UI
utopla Plays automatically on
a
y load
Supported Formats:
Form E
xtensi rowser
B
at n
o Support
</video>
Video Attributes:
Attribute Purpose
Supported Formats:
P4
M .mp4 Universal
(H.264)
HTML5 FEATURES
│
├── FORMS
│ ├── <form>, <fieldset>, <legend>
│
│ ├── draggable="true"
│
└── MULTIMEDIA
APPLICATION
● Contact forms, registration forms with email/phone validation
● -commerce product upload with file drag-and-drop
E
● Music streaming (Spotify web uses HTML5 audio)
● Video platforms (YouTube uses HTML5 video)
● Online education platforms with embedded lectures
ADVANTAGES
● o plugins required (no Flash, Java needed)
N
● Built-in validation reduces JavaScript code
● Accessible and SEO-friendly
● Cross-platform and mobile-friendly
● Multiple format fallback ensures compatibility
DISADVANTAGES
B
● rowser compatibility varies for some features
● No fine-grained control over media (needs JavaScript for
advanced features)
● Drag and Drop limited on mobile/touch devices
● E ach field has a specific type (Aadhaar = 12-digit number, Email
field validates @)
● Required fields won't let you submit without filling them
● Drag-and-drop is like physically moving documents from one tray
to another
● Audio/Video tags are like built-in speakers/screens that need no
extra equipment
CONCLUSION
TML5 greatly enhanced web interactivity by introducing intelligent form
H
elements, diverse input types with built-in validation, a native Drag and
Drop API, and seamless audio/video embedding. These features
reduced dependency on external plugins and made modern, accessible
web applications possible.
🧠 MEMORY TRICK
ew Input Types — "ENDER CUTS":Email,Number,Date,Email,
N
Range,Color,Url,Tel,Search
INTRODUCTION
SS3 brought a visual revolution to web design. Before CSS3,
C
designers needed images and JavaScript for rounded corners, shadows,
nd animations. CSS3 provides all these natively through simple
a
properties, making websites faster, more flexible, and visually stunning.
DEFINITION
SS3 (Cascading Style Sheets Level 3)is the latestevolution of the
C
CSS standard. It introduces modular features for advanced visual styling
including multi-backgrounds, gradient fills, box/text shadows, 2D/3D
transformations, smooth transitions, and keyframe animations — all
without images or JavaScript.
div {
}
2. Background Size
Linear Gradient:
Radial Gradient:
div {
border-image-source: url('[Link]');
border-image-slice: 30;
border-image-repeat: round;
}
Property Purpose
order-image-s URL of the image
b
ource
order-image-re s
b tretch / repeat /
peat round
Value Meaning
-offs H
h orizontal shift (+ =
et right)
v -offs V
ertical shift (+ =
et down)
h1 {
}
h1 {
}
transform: function(value);
Syntax:
matrix() ll transforms
A Advanced use
combined
transform: scale(2);
r otateX(angl R
otate around X
e) axis
r otateY(angl R
otate around Y
e) axis
r otateZ(angl R
otate around Z
e) axis
translateZ(va M
ove in/out of
lue) screen
erspective( S
p et depth of 3D
n) view
transform: rotateY(180deg);
button {
background: blue;
}
button:hover {
background: red;
}
Transition Properties:
transition-propert W
hich CSS property all, color, width
y to animate
Value Effect
linear Constant speed
ease low-fast-slow
S
(default)
ease-out S
tarts fast, ends
slow
Two Steps:
@keyframes
1. Define animation using
animationproperty
2. Apply animation using
@keyframes slideIn {
}
div {
}
Animation Properties:
Trigger N
eeds a trigger (hover, Runs automatically
focus)
se
U Hover effects, toggles oading spinners,
L
Case banners
│
├── BACKGROUND
│
├── BORDER
│
├── SHADOWS
│
│
│
ADVANTAGES
● o JavaScript or Flash needed
N
● GPU-accelerated (smooth performance)
● Reduces image usage (gradients, shadows)
● Fully responsive and scalable
● Easy to maintain in CSS
DISADVANTAGES
C
● omplex animations harder to manage than JavaScript
● Some older browsers (IE) need vendor prefixes (-webkit-, -moz-)
● Too many animations can hurt performance
CONCLUSION
SS3 visual features — backgrounds, border-images, shadows,
C
transforms, transitions, and animations — empower developers to create
stunning, responsive, and performant web interfaces purely through
CSS. These features eliminate the need for images and JavaScript for
most visual effects, resulting in faster-loading and more maintainable
websites.
🧠 MEMORY TRICK
SS3 Features — "Big Beautiful Styled Tigers Take Aggressive
C
Actions"Background →Border-image →Shadows →Transforms→
Transitions →Animations
INTRODUCTION
hen multiple CSS rules try to style the same element, CSS needs a
W
way to decide which rule wins. This decision-making system is called
Cascading and Specificity. Understanding this is crucial for debugging
and writing clean, predictable CSS.
DEFINITION
ascadingin CSS refers to the process by which thebrowser
C
determines which CSS rule to apply when multiple rules target the same
element. The word "Cascade" in CSS means rules flow downward, and
conflicts are resolved based onOrigin, Specificity,and Order.
hen two or more CSS rules conflict, the browser resolves them using
W
thispriority order(highest wins):
3. ID selectors
Factor Description
pecifici H
S ow specific the
ty selector is
rowser
B efault browser
D Lowest
Stylesheet styles
ser
U eader's custom Medium
R
Stylesheet styles
uthor
A Developer's CSS High
Stylesheet
Example:
A B C D
p
,0,0 1 element
0
,1
.nav
,0,1 1 class
0
,0
#header
,1,0 1 ID
0
,0
div p
,0,0 2 elements
0
,2
[Link] p 0,0,1 1
class + 2
,2 elements
#header
,1,1 1
0 ID + 1 class + 1
.nav p
,1 element
p { color: blue; }
R
● ule 1: 0,0,0,1
● Rule 2: 0,0,0,2
● Rule 3: 0,1,0,0 ← WINS (highest specificity)
p { color: red; }
!importantoverrides specificity
esult: Blue wins — because
R
completely.
p { color: blue; }
This also applies across files — the last linked stylesheet wins.
Property Examples
Type
ext
T c olor, font-size, font-family, font-weight,
properties line-height
ist
L list-style-type
properties
Visibility visibility
Property Examples
Type
ackgroun b
B ackground-color,
d background-image
body {
font-family: Arial;
color: #333;
}
<p>
ll
A <h1>
, <span>inside
, <body>will automaticallyuse Arial font
and #333 color — because they areinherited.
Controlling Inheritance:
Valu Effect
e
inher F
orce inheritance from
it parent
initial R
eset to browser
default
nse Remove all set values
u
t
┌─────────────────────────────────────────┐
├─────────────────────────────────────────┤
├─────────────────────────────────────────┤
├─────────────────────────────────────────┤
│ Class .class, :hover, [attr](0,0,1,0) │
├─────────────────────────────────────────┤
├─────────────────────────────────────────┤
│ Universal * (0,0,0,0) │
└─────────────────────────────────────────┘
COMPLETE EXAMPLE
</div>
APPLICATION
● esolving styling conflicts in large projects
R
● Overriding third-party CSS libraries (Bootstrap, Tailwind)
● Theming systems where base styles are inherited
● CSS debugging (understanding why a style isn't applying)
ADVANTAGES
● ascade enables style reuse and overriding
C
● Inheritance reduces code repetition
● Specificity gives fine-grained control over styles
● Predictable behavior once understood
DISADVANTAGES
B
● eginners often confused by unexpected style overrides
● !important overuse creates maintenance nightmares
● Specificity wars in large teams lead to messy CSS
● overnment law (browser default) — applies everywhere
G
● Company rules (author CSS) — overrides government defaults
● Manager's instruction (ID selector) — overrides company rules
● CEO's direct order (inline style) — overrides manager
● C
EO's written mandate (! important) — absolute authority, no one
can override
CONCLUSION
SS Cascading, Inheritance, and Specificity are the three pillars that
C
govern which styles are applied to elements. The cascade resolves
conflicts using origin, specificity, and order. Inheritance reduces
repetition by passing properties to child elements. Specificity is
calculated as a 4-part score where higher values win. Mastering these
concepts is essential for writing predictable, maintainable CSS.
🧠 MEMORY TRICK
ascade Priority — "I-I-I-C-E-U":**!**important →Inline →ID →Class
C
→Element →Universal
INTRODUCTION
esigning websites that look good on all screen sizes — mobile, tablet,
D
desktop — was once a complex challenge. Bootstrap solved this
problem by providing a ready-made, professional CSS framework.
Today, Bootstrap is the world's most popular front-end framework, used
by millions of websites.
DEFINITION
ootstrapis a free, open-source front-end CSS frameworkdeveloped
B
by Twitter (now maintained by the Bootstrap team). It provides a
responsive grid system, pre-designed components (navbar, cards,
buttons, modals), and utility classes that enable rapid and consistent
web development across all screen sizes.
esponsive Grid
R 2-column layout that adapts to
1
System screen size
re-built
P avbar, Cards, Buttons, Modals,
N
Components Forms
JavaScript Plugins D
ropdowns, modals, tooltips (via
CDN)
Container
└── Row
Container Types:
Class Behavior
.container-{breakp F
luid until
oint} breakpoint
Breakpoint System:
Breakpo P
refi S
creen Device
int
x ize
S
xtra
E ( non < 576px mall
S
small e) phone
xtra
E xl ≥ 1200px Desktop
Large
Column Classes:
col-{breakpoint}-{number}
Examples:
●
col-12→ full width on all screens
●
col-md-6→ 6 of 12 columns on medium screens and above
●
col-lg-4→ 4 of 12 columns on large screens
Column Number Rules:
C
● olumns in a row should add up to 12
● If they exceed 12, they wrap to next line
●
col(without number) = equal-width columns
Class Purpose
ards are flexible content containers with optional header, body, footer,
C
image.
Class Purpose
.card-body M
ain content
area
Button Types:
Class Color
.btn-primary Blue
.btn-secondary Grey
.btn-success Green
.btn-danger Red
.btn-warning Yellow
.btn-info Cyan
.btn-light White
.btn-dark Black
.btn-outline-pri utlined
O
mary Blue
Button Sizes:
Class Size
.btn-lg Large
( defau N
orm
lt) al
.btn-s Small
m
lexbo justify-content-between,
F -flex
d
x align-items-center justify-content-between
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
meta name="viewport" content="width=device-width,
<
initial-scale=1.0">
<title>Bootstrap Page</title>
link
<
href="[Link]
.css" rel="stylesheet">
</head>
<body>
<div class="container">
<span class="navbar-toggler-icon"></span>
</button>
</ul>
</div>
</div>
</nav>
<h1>Welcome to My Site</h1>
</div>
<div class="card-body">
</div>
</div>
</div>
<h5 class="card-title">Development</h5>
</div>
</div>
</div>
<div class="card-body">
</div>
</div>
</div>
</div>
</div>
</footer>
script
<
src="[Link]
[Link]"></script>
</body>
</html>
│ Card 2 │ │ Card 3 │
├─────────┤ └─────────┘
│ Card 3 │
└─────────┘
APPLICATION
● -commerce websites (product cards, responsive layout)
E
● Corporate websites (navbar, hero, cards)
● Admin dashboards
● Portfolio websites
● News websites with grid-based article layout
ADVANTAGES
● educes CSS writing time drastically
R
● Consistent cross-browser styling
● Mobile-first approach built-in
● Large community, extensive documentation
● No jQuery in Bootstrap 5
DISADVANTAGES
● ll Bootstrap sites look similar without customization
A
● Extra unused CSS increases file size (use PurgeCSS)
● Learning curve for all utility classes
● Heavy reliance reduces understanding of raw CSS
● Instead of crafting each piece from scratch, you pick pre-made
blocks (navbar, card, button)
● The grid system is theLEGO base plate— it keepseverything
aligned
● You can combine blocks in any way to build any design quickly
● All blocks fit perfectly together — just like Bootstrap components
CONCLUSION
ootstrap is the world's most popular CSS framework, offering a
B
powerful 12-column responsive grid, pre-built UI components, and utility
classes. It enables developers to build beautiful, mobile-responsive
websites rapidly. Its breakpoint system ensures layouts adapt
s eamlessly from mobile to desktop, making it the go-to choice for
modern web development.
🧠 MEMORY TRICK
ootstrap Grid — "C-R-C-12":Container →Row →Columns→12
B
column system
Breakpoints — "XS-SMMLX":XS,SM,MD,LG,XL,XXL
INTRODUCTION
he internet has evolved dramatically since its inception. In its early
T
days, websites were static pages where users could only read content —
like a digital newspaper. Then came a revolutionary shift: users could not
only read but alsocreate, share, and interact. Thistransformation is
calledWeb 2.0— the social, participatory, and dynamicweb we use
today.
DEFINITION
eb 2.0is the second generation of the World Wide Web, characterized
W
by user-generated content, social networking, dynamic pages, rich
interactivity, and collaborative platforms. Coined by Darcy DiNucci in
1999 and popularized by Tim O'Reilly in 2004, Web 2.0 represents a
paradigm shift from passive content consumption to active user
participation.
First Web W
eb 991–200 Read-only, Static
1
1.0 4
urrent
C eb
W 004–Pre Read-Write, Dynamic
2
Web 2.0 sent
uture
F eb
W Emerging R
ead-Write-Own,
Web 3.0 Decentralized
● 004 — Facebook launched
2
● 2005 — YouTube launched
● 2006 — Twitter launched
● 2007 — iPhone launched (mobile web boom)
● 2008 — Google Chrome launched
● 2010 — Instagram launched
ontent
C ebmaster/company
W Anyone (user-generated)
Owner only
usiness
B Page views, banners dvertising, SaaS,
A
Model subscriptions
ollaboratio None
C ikis, shared docs,
W
n comments
8 Core Characteristics:
he most critical Web 2.0 technology. AJAX allows web pages to update
T
data asynchronously without full page reload.
How it works:
● Click "Submit" → Entire page reloads → Wait → New page loads
● T
ype in search box → Suggestions appear instantly → No page
reload
xamples: Gmail (emails load without refresh), Google Maps (map tiles
E
load while dragging), YouTube comments, Facebook like button.
Framework/Libr Purpose
ary
Structure:
oth are data interchange formats used to transfer data between server
B
and client.
Examples:
● oogle Maps API → Anyone can embed Google Maps
G
● Twitter API → Apps can post/read tweets
● Payment APIs (Stripe, PayPal) → E-commerce checkout
● Social Login APIs → "Login with Google" button
Platfor T
yp Purpose
m
e
ordPr
W lo Individual publishing
B
ess g
Blogger B
lo Easy blogging
g
ikipedi Wik C
W ollaborative
a i encyclopedia
ediaWi Wik C
M ommunity
ki i knowledge base
Technology Purpose
ush
P Real-time alerts
Notifications
eolocation
G Location-based services
API
8. Cloud Computing
Service Example
loud
C oogle Drive,
G
Storage Dropbox
loud
C WS, Google
A
Computing Cloud
CDN loudflare,
C
Akamai
Category Examples
E-commerce 2.0 A
mazon (reviews, recommendations),
eBay
aaS
S Gmail, Google Docs, Salesforce
Applications
ontent
C Reddit, Digg, Flipboard
Aggregators
ashup
M ber (Google Maps + Location API +
U
Applications Payment API)
│
┌──────────────┼──────────────┐
│ │ │
USERS PLATFORM TECHNOLOGY
│ │ │
└───────┘ └───────┘
│
User-Generated
Content (UGC)
APPLICATION
● ducation:Wikipedia, online courses (Coursera, KhanAcademy)
E
● Business:LinkedIn, Salesforce CRM, collaborativetools
● Entertainment:YouTube, Netflix, Spotify
● Communication:Gmail, WhatsApp Web, Slack
E
● -commerce:Amazon product reviews, eBay bidding
● News:Reddit, Twitter, Google News
🧠 MEMORY TRICK
eb 2.0 Characteristics — "U-R-F-L-S-P-A-D":User-generated
W
content,Rich experience,Folksonomy,Long tail,SaaS,Participation,
APIss,Data
W
● eb 1.0 = Encyclopedia (you READ)
● Web 2.0 = Wikipedia (you READ + WRITE + EDIT)
📋
QUICK REVISION TABLE — All 6
Questions
Topic
Q Key Concept Memory Trick
#
HTTP
Q Request-Response cycle -H-B, I Saw
R
1 Client Server
HTML5 F
Q orms, Input types, Audio, Video, NDER CUTS,
E
2 Drag-Drop DS-DEED
CSS3
Q ackgrounds, Shadows, Transform,
B ig Beautiful
B
3 Transition, Animation Styled Tigers
C
Q asca Specificity scores, Inheritance I-I-I-C-E-U, ABCD
4 ding scores
B
Q ootstr Grid, Navbar, Cards, Buttons -R-C-12,
C
5 ap Breakpoints
W
Q eb UGC, AJAX, APIs, Collaboration U-R-F-L-S-P-A-D
6 2.0