🎯 Learning Objectives
By the end of this lesson, you will be able to:
- Explain how the Internet and World Wide Web work
- Understand the client-server model and HTTP protocol
- Set up a professional web development environment
- Create and run your first HTML page
- Understand basic file and folder structure for web projects
📚 Lecture Notes: How the Web Works
1. The Internet vs The World Wide Web
The Internet: A global network of interconnected computers that communicate using standardized protocols.
The World Wide Web (WWW): A system of interlinked documents and resources accessed via the Internet using web browsers.
Key Point: The Internet is the infrastructure; the Web is a service that runs on top of it.
2. The Client-Server Model
How a Webpage is Loaded
3. What is HTTP?
HTTP (HyperText Transfer Protocol) is the foundation of data communication on the web.
| HTTP Method | Purpose | Example |
|---|---|---|
| GET | Retrieve data from server | Loading a webpage |
| POST | Send data to server | Submitting a form |
| PUT | Update existing data | Editing a profile |
| DELETE | Remove data | Deleting an account |
4. DNS: The Internet's Phone Book
DNS (Domain Name System) translates human-readable domain names into IP addresses.
Example: www.google.com → 142.250.190.46
Without DNS, we'd have to remember IP addresses for every website!
5. Key Web Technologies
- HTML (HyperText Markup Language): Structure and content of web pages
- CSS (Cascading Style Sheets): Styling and layout
- JavaScript: Interactivity and dynamic behavior
- HTTP/HTTPS: Communication protocol
- Web Servers: Apache, Nginx, XAMPP
🛠️ Setting Up Your Development Environment
Step 1: Install Visual Studio Code
📥 Installation Steps:
- Visit https://code.visualstudio.com/
- Download the installer for Windows
- Run the installer and follow the prompts
- Launch VS Code after installation
Step 2: Install Essential VS Code Extensions
Recommended Extensions:
- Live Server: Launch a local development server with live reload
- HTML CSS Support: Improved HTML and CSS IntelliSense
- Prettier: Code formatter
- Auto Rename Tag: Automatically rename paired HTML tags
How to Install: Click Extensions icon (Ctrl+Shift+X) → Search → Install
Step 3: Install XAMPP
📥 Installation Steps:
- Visit https://www.apachefriends.org/
- Download XAMPP for Windows
- Run installer (you may need administrator rights)
- Install to default location: C:\xampp
- Launch XAMPP Control Panel
- Start Apache server (click "Start" button)
Purpose: XAMPP provides Apache web server for testing websites locally.
Step 4: Install Git
📥 Installation Steps:
- Visit https://git-scm.com/
- Download Git for Windows
- Run installer with default settings
- Verify installation: Open Command Prompt and type:
git --version
Purpose: Git tracks changes in your code and enables collaboration.
Step 5: Create Your Project Folder
💡 Best Practice: Keep files organized in folders. Use lowercase names without spaces (use hyphens or underscores).
💻 Hands-On Activity: Your First HTML Page
Task: Create "Hello World" Webpage
Instructions:
- Open VS Code
- Create a new file: File → New File
- Save as:
C:\xampp\htdocs\web_basics\hello.html - Type the code below
- Save the file (Ctrl+S)
- Open in browser:
http://localhost/web_basics/hello.html
Understanding the Code
- <!DOCTYPE html>: Tells browser this is HTML5
- <html>: Root element of the page
- <head>: Contains meta information (not displayed)
- <meta charset="UTF-8">: Character encoding for proper text display
- <title>: Title shown in browser tab
- <body>: Contains visible content
- <h1>: Main heading (largest)
- <p>: Paragraph
🎨 Try This: Modify Your Page
- Change the heading text
- Add your own name and information
- Add more paragraphs with <p> tags
- Save and refresh your browser to see changes
✏️ Practice Exercises
Exercise 1: Create an Index Page
Create index.html in your web_basics folder with:
- A main heading with your name
- A subheading (use <h2>) saying "Web Development Journey"
- Three paragraphs about yourself
- A horizontal line (use <hr>)
- A footer paragraph with the date
Exercise 2: Test Your Environment
- Verify XAMPP Apache is running (green in control panel)
- Access your page via http://localhost/web_basics/index.html
- Open Chrome DevTools (F12) and explore the Elements tab
- Make a small change and refresh to see it update
📝 Quick Quiz
- What is the difference between the Internet and the World Wide Web?
- What does HTTP stand for?
- What are the three main technologies used in web development?
- What is the purpose of the <!DOCTYPE html> tag?
- Where should visible content be placed in an HTML document?
✅ Today's Deliverable
Submit the following:
- Screenshot of VS Code with your hello.html file open
- Screenshot of your webpage running in the browser
- Screenshot of XAMPP Control Panel showing Apache running
- Your completed index.html file
Submit to: Your instructor via email or learning management system