Fundamentals of Web Technology
Definition: HTTP (HyperText Transfer Protocol) is a stateless protocol for transferring data over the web, while HTTPS (HTTP Secure) adds encryption via SSL/TLS for secure communication.
Structure:
- Request Line: Method (e.g., GET), URL, protocol version.
- Headers: Metadata (e.g., Host, Content-Type).
- Body: Optional data (e.g., form inputs).
HTTPS Security:
- Encryption: SSL/TLS encrypts data.
- Authentication: Verifies server identity via certificates.
- Integrity: Ensures data is not tampered.
Example: HTTP vs HTTPS request.
// HTTP Request
GET /index.html HTTP/1.1
Host: example.com
// HTTPS Request (Encrypted)
[Encrypted GET /index.html HTTPS/1.1]
Host: example.com
Output: HTTPS ensures secure data is encrypted, protecting sensitive information (e.g., login forms).
Conclusion: HTTPS enhances HTTP with security, vital for modern web apps. Understanding its structure aids in exam prep and secure development.
Definition: The internet is a global network of interconnected devices communicating via protocols like TCP/IP, enabling services like web browsing, email, and streaming.
Key Features:
- Decentralized: No single control point.
- Protocols: TCP/IP, DNS, HTTP/HTTPS.
- Scale: ~5.6 billion users in 2025 (~68% globally).
Working: Data travels in packets, routed via IP addresses, resolved by DNS.
Example: Accessing a website.
User enters: https://example.com
DNS resolves to IP: 93.184.216.34
Browser sends HTTP request; server responds with HTML.
Output: Browser renders the webpage.
Conclusion: The internet’s global connectivity, as shown, is foundational for web tech. Its protocols are key for exams.
Definition: Web servers are software (e.g., Apache, Nginx) or hardware that store, process, and deliver web content (HTML, images) to clients via HTTP/HTTPS.
Functions:
- Handle Requests: Process client HTTP requests.
- Deliver Responses: Send HTML, files, or API data.
- Security: Implement HTTPS, firewalls.
Example: Simple Node.js web server.
const http = require('http');
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, World!
');
});
server.listen(3000, () => console.log('Server on port 3000'));
Output: Visiting http://localhost:3000
displays “Hello, World!”.
Conclusion: Web servers are crucial for hosting content, as shown. Understanding their role is essential for web tech exams.
Definition: HTML structures web content using tags, while CSS styles it with properties like color, layout, and fonts.
Roles:
- HTML: Defines elements (e.g., ,
).
- CSS: Applies styles (e.g.,
color: #10b981;
).Example: Basic webpage.
Web Tech
Styled with CSS.
Output: Displays a blue heading and green paragraph.
Conclusion: HTML/CSS form the core of web design, as shown, and are vital for exam success.
- CSS: Applies styles (e.g.,