Orientation to Computing — II
Unit 6: Full Stack Web Development & UI/UX
From wireframe to deployment — master HTML, CSS, JavaScript, backend basics, and UI/UX design to build real websites and start freelancing.
⏱️ Time to Complete: 12–15 hours | 💰 Earning Potential: ₹10,000–₹30,000/month | 📝 30 MCQs (Bloom's Mapped)
💼 Jobs this unlocks: Jr. Web Developer (₹3–6 LPA) | Frontend Intern (₹15K–30K/month) | Freelance Web Dev (₹5K–25K/project)
Opening Hook — The Code Behind India's Biggest Platforms
🌐 How Zerodha Built India's Largest Trading Platform with <30 Engineers
Zerodha Kite processes over ₹30 lakh crore in daily trades — that's more money flowing through one web application every day than the GDP of many countries. And here's what's mind-blowing: the entire platform was built and is maintained by fewer than 30 engineers. No bloated team of 500 developers. No fancy Silicon Valley office. Just a lean team in Bangalore using Python, Go, and clean frontend code.
Then there's CRED — an app so beautifully designed that it won the Google Play Best App award. Its dark-themed UI with micro-animations and premium feel made users actually enjoy paying credit card bills. The design team at CRED obsesses over every pixel, every transition, every hover state. And Razorpay's developer dashboard is considered the gold standard for developer experience — clean API documentation, intuitive test mode, and a payment flow so smooth that 8 million+ businesses trust it.
What if YOU had built this? What if you could take a blank HTML file and turn it into a working, beautiful, revenue-generating web application? That's exactly what this chapter teaches you — from your first <h1> tag to deploying a full website for a real business.
Learning Outcomes — Bloom's Taxonomy Mapped
| Bloom's Level | Learning Outcome |
|---|---|
| 🔵 Remember | List the components of a web application (HTML, CSS, JS) and define client-server architecture, HTTP methods, and DNS resolution |
| 🔵 Understand | Explain how HTML, CSS, and JavaScript work together to render interactive web pages, including the DOM concept and event-driven programming |
| 🟢 Apply | Build a responsive multi-page website using HTML5 semantic elements, CSS3 Flexbox/Grid, and vanilla JavaScript with form validation |
| 🟢 Analyze | Compare frontend frameworks (React, Angular, Vue) and backend technologies for different Indian startup use cases |
| 🟠 Evaluate | Assess a website's UI/UX quality using WCAG accessibility standards, performance metrics, and visual design principles |
| 🟠 Create | Design and deploy a complete 5-page responsive website for a real local Indian business with contact form integration |
Concept Explanation — Full Stack Web Development from Scratch
1. How the Web Works — Client, Server & HTTP
Analogy: Think of the web like a restaurant. You (the client/browser) sit at a table and place an order (HTTP request). The waiter (HTTP protocol) carries your order to the kitchen (server). The kitchen prepares your food (processes the request, queries database) and the waiter brings it back to you (HTTP response). The menu is the URL — it tells the waiter exactly what you want.
🌍 What Happens When You Type zerodha.com
Step 1 — DNS Lookup: Your browser asks a DNS server "What's the IP address of zerodha.com?" DNS is the phonebook of the internet — it translates human-readable domains to machine-readable IP addresses like 104.21.47.12.
Step 2 — TCP Connection: Browser establishes a TCP connection with the server (a "handshake" — "Hey, are you there?" "Yes!" "Great, let's talk!").
Step 3 — HTTP Request: Browser sends a GET request: GET / HTTP/1.1 — meaning "send me the homepage."
Step 4 — Server Processes: Zerodha's server (running Python/Go) processes the request, queries databases for stock prices, user portfolio data.
Step 5 — HTTP Response: Server sends back HTML, CSS, JS files along with status code 200 OK.
Step 6 — Browser Renders: Browser parses HTML → builds DOM → applies CSS → executes JavaScript → you see the Kite dashboard.
| HTTP Method | Purpose | Example |
|---|---|---|
| GET | Retrieve/read data | Load a webpage, fetch stock prices |
| POST | Send/create new data | Submit a login form, place a stock order |
| PUT | Update existing data | Edit your profile, update watchlist |
| DELETE | Remove data | Delete a saved watchlist, remove account |
2. UI Design Principles — Making Websites Beautiful
A website can be technically perfect but still fail if it looks ugly. UI (User Interface) is what the user sees; UX (User Experience) is how they feel using it. Good UI/UX is the difference between IRCTC (frustrating) and CRED (delightful).
🎨 The 4 Pillars of Visual Design
60% dominant colour (background), 30% secondary colour (cards, sections), 10% accent colour (buttons, CTAs). CRED uses: 60% dark (#0a0a0a), 30% dark gray (#1a1a1a), 10% gold accent (#c9a84c).
2. Typography — Font HierarchyUse max 2–3 fonts. Headings: bold sans-serif (Inter, Poppins). Body: regular sans-serif. Code: monospace (Fira Code). Razorpay uses Inter everywhere — clean, modern, readable at all sizes.
3. Spacing — The 8px GridAll spacing should be multiples of 8px: padding 8, 16, 24, 32, 48px. This creates visual rhythm. CRED's cards use exactly 24px padding and 16px gaps — nothing random.
4. Visual Hierarchy — Guide the EyeUse size, colour, weight, and position to tell users what to look at first. Big headline → subtitle → body text → CTA button. Zerodha Kite shows stock price in large bold text, change percentage in green/red — you know instantly what matters.
3. HTML5 — The Skeleton of Every Website
HTML (HyperText Markup Language) is the foundation of every web page. Think of it as the skeleton of a building — it defines the structure. Without HTML, there is no web. Every website you've ever visited — Flipkart, Google, Instagram — is HTML at its core.
Semantic vs Non-Semantic Elements
Semantic elements tell the browser AND search engines what the content is. <header> means "this is the header," <article> means "this is a standalone article." Non-semantic elements like <div> and <span> say nothing about the content — they're just containers.
HTML <!-- ✅ Semantic HTML5 Page Structure --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Portfolio</title> </head> <body> <header> <nav> <a href="#about">About</a> <a href="#projects">Projects</a> <a href="#contact">Contact</a> </nav> </header> <main> <section id="about"> <h1>Hi, I'm Rahul</h1> <p>BCA student & web developer from Pune</p> </section> <section id="projects"> <article> <h2>E-Commerce Website</h2> <p>Built for a local Pune bakery</p> </article> </section> </main> <footer> <p>© 2025 Rahul. All rights reserved.</p> </footer> </body> </html>
HTML5 Forms — Collecting User Data
HTML <form action="/submit" method="POST"> <input type="text" name="name" placeholder="Full Name" required> <input type="email" name="email" placeholder="Email" required> <input type="tel" name="phone" pattern="[0-9]{10}" placeholder="10-digit Mobile"> <select name="state"> <option>Maharashtra</option> <option>Karnataka</option> <option>Tamil Nadu</option> </select> <textarea name="message" rows="4" placeholder="Your message..."></textarea> <button type="submit">Send</button> </form>
<article>, <header>, and <nav> tags is better understood by crawlers than one using only <div> tags. This is why Flipkart's product pages use semantic HTML — it directly impacts their SEO and organic traffic worth crores.
4. CSS3 — Styling, Layouts & Animations
If HTML is the skeleton, CSS is the skin, clothes, and makeup. CSS (Cascading Style Sheets) controls colours, fonts, spacing, layout, and animations. Modern CSS with Flexbox and Grid has made complex layouts achievable without a single line of JavaScript.
The CSS Box Model
Every HTML element is a box with 4 layers: Content (the text/image) → Padding (space inside the border) → Border (the edge) → Margin (space outside the border). Use box-sizing: border-box to include padding and border in the element's total width.
Flexbox — 1D Layouts Made Easy
CSS /* Card container using Flexbox */ .card-container { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; } .card { background: #fff; border-radius: 12px; padding: 24px; flex: 1 1 280px; max-width: 350px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: transform 0.3s; } .card:hover { transform: translateY(-8px); }
CSS Grid — 2D Dashboard Layouts
CSS /* Dashboard layout using CSS Grid */ .dashboard { display: grid; grid-template-columns: 250px 1fr 1fr; grid-template-rows: 60px 1fr; gap: 16px; height: 100vh; } .sidebar { grid-row: 1 / -1; } .navbar { grid-column: 2 / -1; } .chart { background: #f0f9ff; border-radius: 12px; } .stats { background: #ecfdf5; border-radius: 12px; }
CSS Variables & Animations
CSS /* CSS Custom Properties */ :root { --primary: #6366f1; --bg-dark: #0f172a; --text: #e2e8f0; --radius: 12px; } /* Button with animation */ .btn { background: var(--primary); color: #fff; padding: 12px 28px; border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.3s ease; } .btn:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
margin-bottom: 20px and the next paragraph has margin-top: 15px, the gap is 20px, NOT 35px. Fix: use padding instead, or use Flexbox/Grid (they don't collapse margins).
5. JavaScript ES6+ — Making Websites Interactive
HTML is the structure, CSS is the style, and JavaScript is the brain. It makes websites interactive — form validation, animations, API calls, dynamic content loading. Every time you "like" a post on Instagram, click "Add to Cart" on Amazon, or see a live stock price update on Zerodha — that's JavaScript.
Variables, Functions & Template Literals
JavaScript // let = reassignable, const = constant const appName = "EduArtha"; let userScore = 0; // Arrow function (ES6) const greetUser = (name) => { return `Welcome to ${appName}, ${name}! 🎉`; }; console.log(greetUser("Priya")); // Output: Welcome to EduArtha, Priya! 🎉
DOM Manipulation — Click Counter
JavaScript // Select element and add event listener const btn = document.getElementById('count-btn'); const display = document.getElementById('counter'); let count = 0; btn.addEventListener('click', () => { count++; display.textContent = `Clicks: ${count}`; display.style.color = count > 10 ? '#22c55e' : '#3b82f6'; });
Form Validation
JavaScript function validateForm() { const email = document.getElementById('email').value; const phone = document.getElementById('phone').value; if (!email.includes('@')) { alert('Please enter a valid email'); return false; } if (phone.length !== 10) { alert('Phone number must be 10 digits'); return false; } return true; }
fetch() returns a Promise. Use async/await to write clean asynchronous code: const response = await fetch('https://api.example.com/data'); const data = await response.json(); — this is exactly how Zerodha Kite fetches live stock prices.
6. Backend & APIs — The Server Side
Frontend is what users see (HTML/CSS/JS in browser). Backend is what runs on the server — processing data, authenticating users, talking to databases. Think of it as the kitchen in a restaurant — customers never see it, but it's where the real work happens.
PHP — The Web's Workhorse
PHP powers 77% of all websites with known server-side languages (WordPress, Facebook's initial version). It's still the most-used backend language globally.
PHP <?php // Simple PHP server-side greeting $name = "Rahul"; $time = date("H"); if ($time < 12) { echo "Good Morning, $name!"; } else { echo "Good Evening, $name!"; } ?>
Node.js — JavaScript on the Server
JavaScript // Simple Express.js server (Node.js) const express = require('express'); const app = express(); app.get('/api/products', (req, res) => { res.json([ { id: 1, name: "Laptop", price: 45000 }, { id: 2, name: "Phone", price: 15000 } ]); }); app.listen(3000, () => { console.log('Server running at http://localhost:3000'); });
POST /v1/payments.
7. Databases — Storing & Retrieving Data
Every dynamic website needs a database. User accounts, product catalogs, order history — all stored in databases. There are two main types:
| Feature | SQL (Relational) | NoSQL (Non-Relational) |
|---|---|---|
| Structure | Fixed tables with rows & columns | Flexible documents, key-value pairs |
| Schema | Predefined, rigid | Dynamic, schema-less |
| Examples | MySQL, PostgreSQL, SQLite | MongoDB, Redis, Firebase |
| Best For | Financial data, transactions, reporting | Social media, real-time apps, catalogs |
| Query Language | SQL (standardised) | Varies (MongoDB uses JSON-like queries) |
| Indian Companies | Zerodha (PostgreSQL), Paytm (MySQL) | Swiggy (MongoDB), Ola (Cassandra) |
SQL CRUD Operations
SQL -- CREATE: Make a table CREATE TABLE students ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100) NOT NULL, email VARCHAR(100) UNIQUE, course VARCHAR(50), cgpa DECIMAL(3,2) ); -- INSERT: Add data INSERT INTO students (name, email, course, cgpa) VALUES ('Priya Sharma', 'priya@email.com', 'BCA', 8.5); -- SELECT: Read data SELECT name, cgpa FROM students WHERE course = 'BCA' ORDER BY cgpa DESC; -- UPDATE: Modify data UPDATE students SET cgpa = 9.0 WHERE email = 'priya@email.com'; -- DELETE: Remove data DELETE FROM students WHERE id = 5;
SELECT * FROM users WHERE name = '$input', a hacker can type ' OR '1'='1 and bypass authentication. Always use parameterised queries or ORMs.
8. Full Stack Architecture — MVC Pattern
A "Full Stack" developer works on both frontend and backend. The most common architecture pattern is MVC — Model, View, Controller.
🏗️ MVC Pattern — Food Ordering App Example
The database and data logic. In a food app: the menu items table, user orders table, restaurant details. "What data exists and how is it structured?"
View (UI Layer)What the user sees — the HTML/CSS/JS frontend. The restaurant listing page, order summary screen, payment page. "How does data look to the user?"
Controller (Logic Layer)The middleware that connects Model and View. When user clicks "Order Now," the controller receives the request, validates the order, updates the database (Model), and sends a confirmation back to the View. "What happens when the user does something?"
Flow ExampleUser clicks "Add to Cart" (View) → Controller receives the click → Controller updates cart in database (Model) → Controller sends updated cart count back → View shows "Cart: 3 items"
Frontend-Backend Communication: The frontend sends HTTP requests (usually with fetch() or axios) and the backend responds with JSON data. The frontend then renders this data dynamically. This is how Swiggy's app shows you nearby restaurants — the frontend sends your location, the backend queries the database, and sends back a JSON array of restaurants.
9. Popular Frameworks — The Right Tool for the Job
| Framework | Type | Language | Learning Curve | Best For | Used By (India) |
|---|---|---|---|---|---|
| React | Frontend | JavaScript/JSX | Medium | SPAs, dynamic UIs | Flipkart, Swiggy, CRED |
| Angular | Frontend | TypeScript | Steep | Enterprise apps | Infosys, TCS, Wipro |
| Vue.js | Frontend | JavaScript | Easy | Progressive adoption | Zoho, Freshworks |
| Express.js | Backend | JavaScript | Easy | REST APIs, lightweight | Razorpay, Urban Company |
| Django | Backend | Python | Medium | Rapid development | Zerodha, Instagram |
| Laravel | Backend | PHP | Medium | Web apps, CMS | Practo, ClearTax |
10. Development Tools — Your Coding Arsenal
VS Code — The Industry Standard Editor
95%+ of Indian web developers use VS Code. It's free, fast, and infinitely customisable with extensions.
| Extension | What It Does | Why You Need It |
|---|---|---|
| Live Server | Auto-refreshes browser on save | See changes instantly — no manual reload |
| Prettier | Auto-formats your code | Consistent code style, looks professional |
| ESLint | Finds JavaScript errors | Catches bugs before they reach users |
| Auto Rename Tag | Renames paired HTML tags together | Change <div> to <section> in one edit |
| GitLens | Shows who changed each line and when | Essential for team projects |
| Path Intellisense | Auto-completes file paths | No more typos in src="..." |
div.container>h1+p*3 and press Tab — VS Code instantly generates a div with class "container" containing an h1 and 3 paragraphs. Type ! + Tab for a complete HTML5 boilerplate. Every professional frontend developer uses Emmet daily.
11. SPA vs MPA — Choosing the Right Architecture
| Feature | SPA (Single Page App) | MPA (Multi Page App) |
|---|---|---|
| Page Loading | Loads once, updates dynamically | Full page reload on each navigation |
| Speed | Fast after initial load | Slower (re-downloads everything) |
| SEO | Harder (needs SSR workarounds) | Excellent (each page is indexable) |
| Complexity | Higher (React/Vue needed) | Lower (plain HTML/CSS/JS) |
| Best For | Dashboards, email clients, trading | Blogs, e-commerce, news sites |
| Indian Examples | Zerodha Kite, Gmail, Notion | Amazon India, Flipkart catalog, IRCTC |
12. Responsive Design — One Website, Every Screen
60%+ of India's internet traffic comes from mobile phones. If your website doesn't look good on a ₹8,000 Redmi phone with a 6-inch screen, you've lost more than half your audience. Responsive design means your website adapts to any screen size — mobile, tablet, laptop, desktop.
Mobile-First Media Queries
CSS /* Mobile-first: base styles for phones */ .container { padding: 16px; max-width: 100%; } .nav-links { display: none; /* Hidden on mobile */ } .hamburger { display: block; /* Shown on mobile */ } /* Tablet: 768px and up */ @media (min-width: 768px) { .container { padding: 32px; max-width: 720px; } .grid { grid-template-columns: 1fr 1fr; } } /* Desktop: 1024px and up */ @media (min-width: 1024px) { .container { max-width: 960px; margin: 0 auto; } .nav-links { display: flex; } .hamburger { display: none; } .grid { grid-template-columns: 1fr 1fr 1fr; } }
width: 500px on containers. This breaks on any screen smaller than 500px. Use max-width with percentages or rem units instead. Use width: 100% with max-width: 960px — the container takes full width on small screens but caps at 960px on larger ones.
13. Indian Web Design Case Studies
🏢 Three Indian Websites That Set the Standard
Zerodha Kite: Minimalist design, <500ms load time, no unnecessary animations. Every pixel serves a purpose. Trading requires speed — no flashy gradients, no heavy images. Result: India's #1 trading platform with 1.5 crore+ users.
CRED: Premium dark UI (#0a0a0a background), subtle gold accents, micro-animations on every interaction. Makes paying bills feel luxurious. Gamified reward system keeps users engaged. Their design team obsesses over 1px differences.
Razorpay Dashboard: Developer-first design. Clean API documentation, test mode toggle, real-time transaction graphs. Copy-pasteable code snippets. The "Stripe of India" — used by 8M+ businesses because the developer experience is seamless.
14. Web Accessibility — Building for Everyone
15% of the world's population lives with some form of disability. In India, that's 20+ crore people. Web accessibility ensures your website works for everyone — people using screen readers, keyboard-only navigation, or with colour blindness.
WCAG 2.1 — The Standard
| Level | Requirement | Example |
|---|---|---|
| A (Minimum) | Alt text on images, keyboard navigation, form labels | Every <img> has alt="description" |
| AA (Recommended) | Colour contrast 4.5:1, resize text to 200%, skip navigation | Text #333 on white background passes |
| AAA (Ideal) | Contrast 7:1, sign language for videos, no time limits | Used by government and banking sites |
HTML <!-- ✅ Accessible form with ARIA labels --> <form role="form" aria-label="Contact Form"> <label for="user-name">Name:</label> <input type="text" id="user-name" aria-required="true"> <label for="user-email">Email:</label> <input type="email" id="user-email" aria-required="true"> <button type="submit" aria-label="Submit contact form"> Send Message </button> </form>
15. Job Roles & Career Paths in Web Development
| Role | What They Do | Key Skills | Entry Salary (India) |
|---|---|---|---|
| Frontend Developer | Build user interfaces, implement designs, ensure responsiveness | HTML, CSS, JS, React/Vue, Figma | ₹3–8 LPA |
| Backend Developer | Server logic, APIs, database management, authentication | Node.js/Python/PHP, SQL, REST APIs | ₹4–10 LPA |
| Full Stack Developer | Both frontend and backend — end-to-end development | All of the above + deployment | ₹5–12 LPA |
| UI/UX Designer | Wireframes, prototypes, user research, design systems | Figma, Adobe XD, user research, design principles | ₹4–9 LPA |
| Web Designer | Visual design, graphics, landing pages | HTML/CSS, Figma, Canva, WordPress | ₹2.5–5 LPA |
| DevOps Engineer | Deployment, CI/CD, server management, monitoring | Docker, AWS/GCP, Linux, Git, Jenkins | ₹6–14 LPA |
Learn by Doing — 3-Tier Lab Structure
🟢 Tier 1 — GUIDED TASK: Build Your Digital Resume
Step 1: Create Your Project Folder
Create a folder called my-resume on your Desktop. Inside it, create three files: index.html, style.css, script.js.
Step 2: Write the Complete HTML
HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Rahul Kumar — Web Developer</title> <link rel="stylesheet" href="style.css"> </head> <body> <header id="home"> <nav> <div class="logo">RK</div> <ul> <li><a href="#about">About</a></li> <li><a href="#skills">Skills</a></li> <li><a href="#projects">Projects</a></li> <li><a href="#contact">Contact</a></li> </ul> </nav> <div class="hero"> <h1>Hi, I'm <span id="typed-name">Rahul Kumar</span></h1> <p>BCA Student | Web Developer | Pune, India</p> <a href="#projects" class="btn">View My Work</a> </div> </header> <main> <section id="about"> <h2>About Me</h2> <p>Passionate web developer pursuing BCA. I build responsive, accessible websites for local businesses in Pune.</p> </section> <section id="skills"> <h2>Skills</h2> <div class="skill"> <span>HTML5</span> <div class="skill-bar"><div class="fill" data-width="90"></div></div> </div> <div class="skill"> <span>CSS3</span> <div class="skill-bar"><div class="fill" data-width="85"></div></div> </div> <div class="skill"> <span>JavaScript</span> <div class="skill-bar"><div class="fill" data-width="75"></div></div> </div> </section> <section id="projects"> <h2>Projects</h2> <div class="project-grid"> <div class="project-card"> <h3>Bakery Website</h3> <p>5-page site for a local Pune bakery</p> </div> <div class="project-card"> <h3>Portfolio Template</h3> <p>Responsive portfolio with dark theme</p> </div> <div class="project-card"> <h3>Quiz App</h3> <p>Interactive quiz with score tracking</p> </div> </div> </section> <section id="contact"> <h2>Contact Me</h2> <p>📧 rahul@email.com | 📱 +91-98765-43210</p> </section> </main> <footer> <p>© 2025 Rahul Kumar. Built with ❤️ in Pune.</p> </footer> <script src="script.js"></script> </body> </html>
Step 3: Write the Complete CSS (style.css)
CSS /* CSS Variables */ :root { --bg: #0f172a; --surface: #1e293b; --text: #e2e8f0; --accent: #6366f1; --accent-glow: rgba(99,102,241,0.4); } * { margin:0;padding:0;box-sizing:border-box; } body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; } /* Navigation */ nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 48px; position: fixed; width: 100%; top: 0; z-index: 100; background: rgba(15,23,42,0.9); backdrop-filter: blur(10px); } .logo { font-size:1.5rem;font-weight:900;color:var(--accent); } nav ul { list-style:none;display:flex;gap:32px; } nav a { color:var(--text);text-decoration:none;font-weight:500; } nav a:hover { color:var(--accent); } /* Hero */ .hero { text-align:center; padding:160px 20px 100px; background:linear-gradient(135deg,#0f172a,#1e1b4b); } .hero h1 { font-size:2.8rem;font-weight:900; } .hero p { font-size:1.1rem;color:#94a3b8;margin:12px 0 24px; } .btn { display:inline-block; background:var(--accent); color:#fff; padding:12px 32px; border-radius:8px; text-decoration:none; font-weight:600; transition:all 0.3s; } .btn:hover { transform:translateY(-3px); box-shadow:0 8px 24px var(--accent-glow); } /* Sections */ section { padding:80px 48px; max-width:900px; margin:0 auto; } h2 { font-size:1.8rem;margin-bottom:20px;color:#f1f5f9; } /* Skill bars */ .skill { margin:16px 0; } .skill span { font-weight:600;font-size:.9rem; } .skill-bar { background:#334155; height:10px; border-radius:5px; margin-top:6px; } .fill { height:100%; background:var(--accent); border-radius:5px; width:0; transition:width 1s ease; } /* Project cards */ .project-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:24px; } .project-card { background:var(--surface); padding:24px; border-radius:12px; transition:transform 0.3s; border:1px solid #334155; } .project-card:hover { transform:translateY(-6px); } .project-card h3 { color:var(--accent);margin-bottom:8px; } /* Footer */ footer { text-align:center;padding:32px;color:#64748b;font-size:.85rem; } /* Responsive */ @media(max-width:768px) { .hero h1 { font-size:1.8rem; } nav ul { gap:16px; } section { padding:48px 20px; } nav { padding:16px 20px; } }
Step 4: Write the JavaScript (script.js)
JavaScript // Smooth scroll for navigation links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); document.querySelector(this.getAttribute('href')) .scrollIntoView({ behavior: 'smooth' }); }); }); // Skill bar animation on scroll const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { const fills = entry.target.querySelectorAll('.fill'); fills.forEach(fill => { fill.style.width = fill.dataset.width + '%'; }); } }); }, { threshold: 0.3 }); const skillSection = document.getElementById('skills'); if (skillSection) observer.observe(skillSection); // Navbar background on scroll window.addEventListener('scroll', () => { const nav = document.querySelector('nav'); if (window.scrollY > 50) { nav.style.background = 'rgba(15,23,42,0.98)'; } else { nav.style.background = 'rgba(15,23,42,0.9)'; } });
Step 5: Test on Mobile
Open index.html with Live Server in VS Code. Press F12 → Toggle Device Toolbar (Ctrl+Shift+M). Test on iPhone SE, iPad, and Desktop sizes. Your resume should look great on all screen sizes!
🎉 Congratulations! You've built a professional digital resume. Take a screenshot — this is your first portfolio piece and your first freelanceable skill.
🟡 Tier 2 — SEMI-GUIDED TASK: Add Contact Form with Formspree
Your Mission:
Add a working contact form to your digital resume that sends submissions to your email — no backend needed!
Hints:
- Sign up: Go to
formspree.io→ Create free account → Create a new form → Copy the form endpoint URL - HTML Form: Create a
<form>withaction="https://formspree.io/f/YOUR_ID"andmethod="POST". Add fields: Name (text), Email (email), Phone (tel), Message (textarea), Submit button - Validation: Write JavaScript to validate: email contains @, phone is 10 digits, message is at least 20 characters. Show error messages below each field.
- Styling: Style the form to match your resume's dark theme. Use CSS variables, rounded inputs, focus effects.
- Deploy: Push to GitHub → Settings → Pages → Deploy from main branch. Your resume is now live at
yourusername.github.io/my-resume!
thanks.html with a success animation and a "Back to Resume" button. Set Formspree's redirect to this page.
🔴 Tier 3 — OPEN CHALLENGE: Build 5-Page Website for a Real Local Business
The Brief:
Choose a real local business near you (a bakery, salon, coaching centre, clinic, or gym). Build a complete 5-page responsive website:
- Home: Hero section, featured services, testimonials, CTA
- About: Business story, team, mission/vision
- Services: Service cards with descriptions and prices
- Gallery: Photo grid with lightbox effect
- Contact: Working form (Formspree), Google Maps embed, address, hours
Requirements: Responsive (mobile, tablet, desktop) • Accessible (WCAG AA) • Fast (<3s load) • Deployed on GitHub Pages or Netlify
Deliverable: Live URL + GitHub repository link. This becomes your freelance portfolio piece.
Industry Spotlight — A Day in the Life
👩💻 Kavitha Rajan, 25 — Frontend Developer at CRED, Bangalore
Background: BCA from Christ University, Bangalore. Learned HTML/CSS in 2nd year by building personal projects. Completed a 3-month internship at a Bangalore-based ed-tech startup. Self-taught React through freeCodeCamp and YouTube tutorials. Applied to CRED through LinkedIn after building an impressive portfolio of 8 projects.
A Typical Day:
9:30 AM — Standup with the design engineering team (10 min, async on Slack). Review Jira board, pick up today's feature card.
10:00 AM — Implement new reward animation in React + TypeScript. Coordinate with the design team on Figma specs — CRED obsesses over pixel-perfect implementation.
11:30 AM — Code review session. Senior engineer provides feedback on component architecture and performance optimisation.
1:00 PM — Lunch at CRED's office cafeteria. Informal chat with the UI/UX team about the new design system components.
2:00 PM — Implement responsive designs for the new billing flow. Test on multiple devices using BrowserStack. Fix cross-browser CSS issues.
3:30 PM — Debug a subtle CSS animation timing issue. Optimise bundle size — every kilobyte matters for app performance.
5:00 PM — Self-learning hour (company-sponsored). Currently exploring Framer Motion for advanced React animations.
6:00 PM — Push final code, update Jira tickets, write a brief PR description. Head home.
| Detail | Info |
|---|---|
| Tools Used Daily | React, TypeScript, Figma, Storybook, Git, Chrome DevTools, VS Code |
| Entry Salary (2025) | ₹5–8 LPA + benefits |
| Mid-Level (3–5 yrs) | ₹12–20 LPA |
| Senior (7+ yrs) | ₹25–45 LPA |
| Companies Hiring | CRED, Razorpay, Swiggy, Flipkart, PhonePe, Zerodha, Meesho, Urban Company, Groww |
Earn With It — Freelance & Income Roadmap
💰 Your Earning Path After This Chapter
Portfolio Piece: "5-Page Responsive Website for [Business Name]" — a deployed, live website with contact form, responsive design, and clean UI.
Freelance Gig Ideas:
• Business website for local shops/restaurants — ₹5,000–₹15,000
• Landing page for product launches — ₹3,000–₹8,000
• Portfolio/resume website for professionals — ₹3,000–₹10,000
• Basic e-commerce catalog site — ₹10,000–₹25,000
• Redesign an existing outdated website — ₹5,000–₹15,000
| Platform | Best For | Typical Rate |
|---|---|---|
| Internshala | Indian student projects & internships | ₹5,000–₹15,000/project |
| Fiverr | Global clients, quick website gigs | $50–$200/gig (₹4,000–₹16,000) |
| Upwork | Longer projects, higher rates | $15–$40/hour |
| Direct outreach to Indian businesses | ₹5,000–₹25,000/project | |
| WhatsApp/Local | Nearby shops, clinics, coaching centres | ₹5,000–₹15,000/project |
⏱️ Time to First Earning: 2–4 weeks (if you complete Tier 1 & 3 labs and reach out to 10 local businesses)
MCQ Assessment Bank — 30 Questions (Bloom's Mapped)
Remember / Identify (Q1–Q5)
Which HTML tag is used to create a hyperlink?
- <a>
- <link>
- <href>
- <url>
<a href="..."> creates clickable hyperlinks. <link> is for linking external resources like CSS files, not for clickable links on the page.CSS stands for:
- Computer Style Sheets
- Cascading Style Sheets
- Creative Style System
- Colorful Style Sheets
Which HTTP method is used to retrieve data from a server?
- POST
- PUT
- GET
- DELETE
Which JavaScript keyword(s) declare a block-scoped variable?
- var
- let
- const
- Both B and C
let and const are block-scoped (limited to the {} block they're declared in). var is function-scoped, which can cause bugs.The <meta name="viewport"> tag is essential for:
- SEO ranking only
- Responsive design on mobile devices
- Database connection
- Server-side configuration
Understand / Explain (Q6–Q10)
Why does CSS use specificity rules?
- To make CSS code execute faster
- To determine which style rule applies when multiple rules target the same element
- To compress CSS files for production
- To validate the HTML document structure
What is the DOM in web development?
- A database management system
- A server-side programming language
- A tree-like representation of HTML that JavaScript can manipulate
- A CSS layout framework
Why is mobile-first design recommended over desktop-first?
- Mobile CSS has fewer properties
- It's easier to scale up from a constrained mobile layout than to scale down from a complex desktop layout
- Mobile browsers execute CSS faster
- Google only indexes mobile versions of sites
In client-server architecture, which component processes the business logic?
- Client browser
- DNS server
- Backend server
- CSS rendering engine
REST APIs commonly use JSON because:
- JSON is the only data format that exists
- JSON is lightweight, human-readable, and language-independent
- JSON is always faster than binary formats
- JSON provides built-in encryption
Apply / Implement (Q11–Q15)
Which CSS creates a 3-column equal-width grid layout?
display:grid; grid-template-columns:1fr 1fr 1fr;display:flex; columns:3;display:grid; columns:3;display:block; grid:3;
grid-template-columns to define column sizes. 1fr means one fraction of available space. Three 1fr values create three equal columns. You can also write repeat(3, 1fr).What does this code do? document.querySelector('.btn').addEventListener('click', () => alert('Hi'))
- Creates a new button element
- Shows 'Hi' alert when element with class 'btn' is clicked
- Displays 'Hi' immediately on page load
- Nothing — it has a syntax error
querySelector('.btn') selects the first element with class "btn", addEventListener('click', ...) attaches a click handler, and the arrow function runs alert('Hi') when clicked.Which media query targets screens smaller than 768px?
@media (min-width: 768px)@media (max-width: 768px)@media (screen: 768px)@media (width < 768px)
max-width: 768px applies styles when the viewport is 768px or narrower. min-width targets screens 768px or wider (used in mobile-first design).To make an image responsive, which CSS approach is correct?
width: 100%; height: auto;position: fixed;float: left;display: none;
width: 100% makes the image take full width of its container, and height: auto maintains the aspect ratio. You can also add max-width: 100% to prevent images from exceeding their natural size.Which HTML5 semantic element is most appropriate for a blog post?
- <div>
- <article>
- <span>
- <section>
<article> element represents self-contained, independently distributable content like a blog post, news article, or forum post. <section> is for thematic grouping within a page.Analyze / Compare (Q16–Q20)
A startup needs a real-time chat feature. Which technology stack is most suitable?
- PHP with MySQL
- Node.js with WebSocket
- HTML with CSS animations
- Django with SQLite
Comparing React and Angular, which statement is most accurate?
- React is a full framework while Angular is a library
- React uses a virtual DOM while Angular uses real DOM manipulation
- Both use TypeScript by default
- Angular is maintained by Meta (Facebook)
A website loads in 8 seconds. Analysis reveals 15 render-blocking CSS files. The primary fix is:
- Add more RAM to the server
- Combine and minify CSS files, reduce render-blocking resources
- Switch from SQL to NoSQL database
- Add more images to improve visual appeal
media attributes to defer non-critical CSS dramatically improves load time.For an e-commerce site with millions of products and financial transactions, the best database approach is:
- SQL only — relational data is essential
- NoSQL only — it's faster for large data
- SQL for transactions/orders, NoSQL for product catalog and reviews (hybrid)
- Neither — use flat CSV files
A Single Page Application (SPA) would be better than MPA for:
- A news portal with 10,000 articles requiring strong SEO
- An email client like Gmail with real-time updates
- A government informational website
- A blog with mostly static content
Evaluate / Assess (Q21–Q25)
A website uses light gray text (#999999) on a white background (#ffffff). This violates:
- HTML validation standards
- WCAG colour contrast requirements (minimum 4.5:1 ratio)
- JavaScript syntax rules
- Server security protocols
A client wants a simple portfolio website. The developer suggests React + Node.js + MongoDB. Your assessment?
- Perfect choice for maximum performance
- Over-engineered — static HTML/CSS/JS or a simple framework would suffice
- Needs even more frameworks added
- Should use Angular instead of React
IRCTC's website crashes during Tatkal booking. The best architectural improvement would be:
- Better CSS design and animations
- Load balancing, CDN, queueing system, and database optimisation
- Converting to a Single Page Application
- Adding more HTML pages
A website has no alt text on images, no keyboard navigation, and auto-playing videos with sound. Its accessibility rating is:
- Excellent — modern and interactive
- Acceptable for most users
- Poor — fails WCAG 2.1 Level A on multiple criteria
- Only affects users who are blind
A client insists on using 20 different fonts and 15 colours on the homepage. Your professional recommendation:
- The client is always right — implement exactly as requested
- Explain that 2–3 fonts and a cohesive colour palette improve readability, trust, and conversion rates
- Use all fonts but hide some with CSS media queries
- Refuse the project entirely
Create / Design (Q26–Q30)
To build a student attendance tracker, which database schema design is best?
- One single table containing all student, class, and attendance data
- Separate tables for Students, Classes, and Attendance linked with foreign keys
- A NoSQL database with no predefined structure
- CSV files stored on the server
Which approach best creates a responsive navigation bar that works on both desktop and mobile?
- Fixed-width div with CSS float
- Flexbox container with a media query that switches to a hamburger menu on mobile
- Table-based layout with colspan
- Absolute positioning for each navigation link
For a REST API endpoint to retrieve all products, the correct RESTful design is:
- GET /getAllProducts
- POST /products/fetch
- GET /api/products
- GET /api/get-products-list
/api/products (all products), /api/products/42 (product with ID 42). The HTTP method (GET/POST/PUT/DELETE) indicates the action. Verbs in URLs (getAllProducts, fetchData) violate REST principles.To architect a React component for a product card, the best practice is:
- One large component with all HTML written inline
- Separate reusable components: ProductCard, ProductImage, ProductPrice with props
- Use document.createElement() inside React components
- Write all styling as inline CSS objects
When planning a full-stack e-commerce project, the correct development order is:
- Write code first, design the database later
- Requirements → Wireframe → Database Schema → API Design → Frontend → Testing → Deploy
- Deploy the server first, then build features incrementally
- Start with CSS animations, then add functionality
Short Answer Questions
Q1: Explain the difference between semantic and non-semantic HTML elements with examples.
Model Answer: Semantic elements convey the meaning/purpose of their content to both browsers and search engines. Examples: <header> (page header), <nav> (navigation), <article> (self-contained content), <footer> (page footer), <aside> (sidebar content). Non-semantic elements like <div> and <span> are generic containers that say nothing about their content. Benefits of semantic HTML: (1) Better SEO — Google understands page structure, (2) Accessibility — screen readers can navigate by landmarks, (3) Maintainability — developers understand code structure at a glance. Always prefer <header> over <div class="header">.
Q2: Describe the CSS Box Model and how box-sizing: border-box changes its behaviour.
Model Answer: Every HTML element is a rectangular box with four layers (inside to outside): Content (the actual text/image) → Padding (space between content and border) → Border (the edge line) → Margin (space outside the border separating elements). By default (box-sizing: content-box), if you set width: 300px and add padding: 20px and border: 5px, the total width becomes 350px (300 + 20×2 + 5×2). With box-sizing: border-box, padding and border are INCLUDED in the 300px — the content area shrinks to accommodate them. This makes layout calculations predictable. Best practice: add * { box-sizing: border-box; } at the top of every CSS file.
Q3: What is the difference between client-side and server-side rendering? Give one advantage of each.
Model Answer: Client-Side Rendering (CSR): The server sends a minimal HTML file with JavaScript. The browser downloads JS, executes it, and builds the page dynamically. Used by SPAs (React, Vue). Advantage: smooth, app-like interactions after initial load — no full page reloads. Server-Side Rendering (SSR): The server generates complete HTML for each page request and sends it to the browser. The page is immediately visible. Advantage: better SEO (search engines get complete HTML) and faster initial page display (First Contentful Paint). Many modern frameworks (Next.js) combine both — SSR for initial load, CSR for subsequent interactions.
Q4: Explain REST API principles and list the 4 main HTTP methods with their purposes.
Model Answer: REST (Representational State Transfer) is an architectural style for designing web APIs. Key principles: (1) Stateless — each request contains all information needed; server doesn't store session state. (2) Resource-based — URLs represent resources (nouns), not actions. (3) Uniform Interface — standard HTTP methods define operations. The 4 main methods: GET = Read/retrieve data (GET /api/users — list all users). POST = Create new data (POST /api/users — create a user). PUT = Update existing data (PUT /api/users/5 — update user 5). DELETE = Remove data (DELETE /api/users/5 — delete user 5). Data is typically exchanged in JSON format.
Q5: Why is responsive design important? List 3 CSS techniques for achieving it.
Model Answer: Responsive design is critical because 60%+ of India's web traffic comes from mobile devices. Users access websites on screens ranging from 5-inch phones to 27-inch monitors. A non-responsive site loses more than half its audience and Google penalises non-mobile-friendly sites in search rankings. Three key CSS techniques: (1) Media Queries: Apply different styles based on screen width — @media (max-width: 768px) { ... }. (2) Flexbox and CSS Grid: Create flexible layouts that automatically adapt — grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) creates a grid that goes from 3 columns on desktop to 1 column on mobile. (3) Relative Units: Use rem, em, %, vw/vh instead of fixed px — these scale proportionally to screen size. Add max-width: 100% on images to prevent overflow.
Case Studies
📊 Case Study 1: Zerodha Kite — How <30 Engineers Built India's Largest Trading Platform
Background
Zerodha, founded in 2010 by Nithin Kamath, disrupted India's brokerage industry with zero-commission trading. Their trading platform Kite serves 1.5+ crore active users and processes ₹30 lakh crore in daily trades. The entire engineering team? Fewer than 30 people.
Technology Stack
| Layer | Technology | Why Chosen |
|---|---|---|
| Backend | Go, Python | Go for high-performance order matching; Python for data processing |
| Frontend | Vanilla JavaScript (custom) | No heavy frameworks — speed is critical for trading |
| Database | PostgreSQL, Redis | PostgreSQL for transactions; Redis for caching live prices |
| API | Kite Connect (REST) | Clean, well-documented API that 3rd party apps can use |
| Infrastructure | On-premise (not cloud) | Lower latency for trading — every millisecond matters |
Design Philosophy: Speed Over Features
Kite's UI is deliberately minimal. No gradients, no animations, no unnecessary icons. Why? In trading, a 200ms delay can cost lakhs. The design team follows one rule: "If it doesn't help the trader make money, remove it." Page load time: under 500ms. Bundle size: under 200KB gzipped.
Key Takeaways
- Small teams can build at scale — you don't need 500 engineers
- Simple tech often wins — vanilla JS outperforms heavy frameworks for specific use cases
- Design for the user's goal — traders need speed, not beauty
- Open-source everything possible — Zerodha open-sourced Kite Connect, reducing support burden
Discussion Questions
- Why did Zerodha choose vanilla JavaScript over React for Kite's frontend?
- How does a minimal UI actually improve the trading experience compared to feature-rich platforms?
- What can a BCA student learn from Zerodha's "build vs buy" philosophy?
📊 Case Study 2: IRCTC Website Redesign — From India's Most Criticised to Most Used
Background
IRCTC (Indian Railway Catering and Tourism Corporation) handles 25+ million daily visits, making it one of the world's highest-traffic websites. During Tatkal booking (10 AM), traffic spikes to 15 lakh+ simultaneous users. The website is frequently criticised for crashes, poor UI, and frustrating user experience.
Current Problems Analysis
| Problem | Technical Cause | User Impact |
|---|---|---|
| Crashes during Tatkal | No proper load balancing; synchronous database queries | Users can't book tickets; lose Tatkal window |
| Slow page loads (8–15 seconds) | Unoptimised images, render-blocking CSS/JS, no CDN | Users abandon; switch to agents |
| Poor mobile experience | Not responsive; relies on desktop layout | 70% of Indian users are on mobile |
| Confusing navigation | Too many options, no clear hierarchy, cluttered UI | First-time users can't find booking flow |
| No accessibility | No ARIA labels, poor contrast, no keyboard nav | Excludes 20+ crore Indians with disabilities |
Your Redesign Proposal (Apply What You've Learned)
Frontend: Mobile-first responsive design using CSS Grid. Clean, minimal UI inspired by Zerodha Kite. Progressive loading — show search form first, load rest lazily. Maximum 2 fonts, 4 colours.
Backend: Implement a virtual waiting room/queueing system (like BookMyShow uses for movie premieres). Each user gets a position in queue and estimated wait time. This prevents server crashes.
Infrastructure: CDN for static assets (images, CSS, JS). Redis caching for train schedules (don't query database for every search). Load balancers distributing across 50+ servers during peak.
Accessibility: WCAG AA compliance. Screen reader friendly. Hindi and regional language support. High contrast mode toggle.
Discussion Questions
- What are the top 3 technical problems causing IRCTC crashes, and how would you fix each?
- Design a mobile-first booking flow for IRCTC in 5 screens or fewer. What information does each screen show?
- If you were hired as a frontend intern at IRCTC, what is the first change you'd implement and why?
Chapter Summary
📝 Key Takeaways — Unit 6: Full Stack Web Dev & UI/UX
- The web works on client-server architecture — browsers send HTTP requests, servers respond with HTML/CSS/JS. DNS translates domains to IP addresses.
- UI design follows core principles: 60-30-10 colour rule, typography hierarchy, 8px spacing grid, and visual hierarchy. Study CRED and Razorpay for inspiration.
- HTML5 semantic elements (header, nav, main, article, section, footer) improve SEO, accessibility, and code maintainability.
- CSS3 Flexbox handles 1D layouts (rows/columns); CSS Grid handles 2D layouts (dashboards). Use CSS variables for consistent theming.
- JavaScript ES6+ makes websites interactive: DOM manipulation, event listeners, fetch API for server communication. Learn let/const, arrow functions, template literals.
- Backend technologies: PHP (77% of web), Node.js (JS on server), Express.js (lightweight APIs). REST APIs use GET/POST/PUT/DELETE with JSON.
- Databases: SQL (MySQL, PostgreSQL) for structured data and transactions; NoSQL (MongoDB) for flexible schemas. Learn CRUD operations.
- MVC architecture separates concerns: Model (data), View (UI), Controller (logic). Frontend-backend communicate via JSON APIs.
- React dominates Indian startups (70%+). Learn vanilla JS first, then React. Other frameworks: Angular (enterprise), Vue (progressive).
- Responsive design is non-negotiable — 60%+ of Indian traffic is mobile. Use mobile-first approach, media queries, flexbox, and relative units.
- Web accessibility (WCAG 2.1) is both ethical and increasingly legal. ARIA labels, alt text, keyboard navigation, colour contrast 4.5:1.
- Freelance web development is the fastest path to earning while in college: ₹5K–₹25K per project on Internshala, Fiverr, or local businesses.
Earning Checkpoint — Self-Assessment
| Skill | Tool/Platform | Portfolio Proof | Earn-Ready? |
|---|---|---|---|
| HTML/CSS Basics | VS Code, Chrome DevTools | Digital Resume (Tier 1 Lab) | ✅ Yes — can build static websites |
| JavaScript DOM | VS Code, Browser Console | Interactive elements in resume | ✅ Yes — can add interactivity |
| Responsive Design | Chrome DevTools, Media Queries | Resume works on mobile/tablet/desktop | ✅ Yes — essential for all projects |
| UI/UX Principles | Figma (wireframing) | Consistent colour/typography choices | ✅ Yes — can design professional layouts |
| Forms & Validation | Formspree, JavaScript | Working contact form (Tier 2 Lab) | ✅ Yes — can build business forms |
| Full Stack Concepts | Conceptual understanding | — | ⬜ Not yet — need hands-on backend practice |
| Website Deployment | GitHub Pages / Netlify | Live URL of 5-page business site (Tier 3) | ✅ Yes — can deliver deployed websites to clients |
✅ Unit 6 complete. Ready for Unit 7: Capstone!
[QR: Link to EduArtha video tutorial — Full Stack Web Dev & UI/UX]