CSS (Cascading Style Sheets) is used to style and layout web pages — for example, to change fonts, colors, spacing, positioning of elements, and responsiveness of a website.
-
Inline CSS
- Applied directly inside HTML elements using the
styleattribute. - Example:
<p style="color: red;">Hello</p>
- Applied directly inside HTML elements using the
-
Internal CSS
- Written inside a
<style>tag in the<head>section of the HTML page. - Used for styling a single page.
- Written inside a
-
External CSS
- Linked via a separate
.cssfile using the<link>tag. - Best practice for styling multiple pages consistently.
- Linked via a separate
JSON (JavaScript Object Notation) is a lightweight data-interchange format used to transmit data between a server and a web application.
Example:
{
"name": "Alice",
"age": 25,
"isStudent": false
}- Simpler and more readable syntax.
- Faster to parse (native in JavaScript).
- Less data overhead (no closing tags).
- Easier to use with APIs and modern web apps.
| HTML | HTML5 |
|---|---|
| Does not support audio/video tags | Supports <audio> and <video> |
| Limited storage options | Introduces localStorage and sessionStorage |
| Uses SGML-based parsing | Uses a simplified parsing model |
| No native support for drawing graphics | Supports <canvas> for graphics and animations |
| Requires third-party plugins for multimedia | No plugins needed for audio/video |
Some major design issues include:
- Responsiveness – Ensuring the website works on all screen sizes.
- Navigation – Clear and user-friendly navigation is essential.
- Performance – Fast load times and optimized media.
- Cross-browser compatibility – Site must work in Chrome, Firefox, Safari, etc.
- Accessibility – Design must be inclusive for users with disabilities.
- Content hierarchy – Clear visual structure and call-to-actions.
- Security – Protect against data breaches, XSS, CSRF, etc.
HTTP (HyperText Transfer Protocol) is the protocol used to transfer data over the web.
- Request and receive webpages, images, videos, and data.
- It’s the foundation for communication between web clients (browsers) and servers.
- Works in a request-response model:
- Client sends an HTTP request.
- Server sends back an HTTP response.
7) Describe the steps involved when a web browser requests for and obtains a web page from a web server
A web browser is a software application used to access and display content from the web, such as webpages, images, and videos.
- Example:
https://www.example.com - The browser starts by interpreting this URL to find the domain.
- The browser contacts a DNS (Domain Name System) server to translate the domain name into an IP address.
- Example:
www.example.com → 93.184.216.34
- The browser sends an HTTP or HTTPS request to the server at the resolved IP address.
- It requests specific resources like an HTML file, images, or scripts.
- The server sends back an HTTP response, which includes:
- Status code (e.g., 200 OK, 404 Not Found)
- HTML content
- CSS, JavaScript, images, etc.
- The browser processes the HTML and builds the DOM (Document Object Model).
- Then it:
- Loads and applies CSS to style elements.
- Executes JavaScript to add interactivity or fetch more data.
- Displays the final visual layout to the user.
- JavaScript can update the DOM dynamically (AJAX, APIs), so the browser can update content without reloading the whole page.
| Component | Role |
|---|---|
| Rendering Engine | Parses HTML/CSS, builds and paints the page |
| JavaScript Engine | Executes scripts (e.g., Google’s V8 in Chrome) |
| Networking | Handles HTTP/HTTPS requests |
| UI Layer | User interface — address bar, back button, tabs |
| Data Storage | Cookies, cache, localStorage, sessionStorage |
A website is a collection of related web pages hosted on a server and accessible via a domain name (like www.example.com).
Example: A university website with pages for admissions, courses, and faculty.
A web page is a single document or file within a website, written in HTML and viewable in a web browser.
Example:
www.example.com/contact.html
A web server is a computer or software that stores and serves web pages to users over the internet using HTTP.
Example: Apache, Nginx
A URL is the address of a specific web resource on the internet.
Example:
https://www.example.com/about.html
A home page is the main or default page of a website, usually the first page a visitor sees.
Example:
index.htmlis typically the home page.
HTTP is called stateless because each request made by a client (browser) to the server is independent — the server does not remember any previous interactions.
- HTTP was designed for simplicity and scalability.
- It allows many users to connect without overloading the server with user-specific data.
- Any state (like login status) must be manually managed using cookies or sessions.
| Method | Description | Example |
|---|---|---|
| GET | Requests data from the server (e.g., a web page). | GET /index.html |
| POST | Sends data to the server (e.g., from a form). | POST /submit-form |
| PUT | Updates or replaces data on the server. | PUT /user/1 (update user info) |
HTML tags are keywords enclosed in angle brackets (<>) that define elements on a web page.
<p>This is a paragraph.</p><p>is the opening tag</p>is the closing tagThis is a paragraph.is the content- Together they create a paragraph element
| Tag | Description | Example |
|---|---|---|
<h1> |
Heading level 1 (largest) | <h1>Welcome</h1> |
<a> |
Creates a hyperlink | <a href="about.html">About</a> |
<img> |
Displays an image | <img src="logo.png" alt="Logo"> |
<ul> |
Creates an unordered list | <ul><li>Item</li></ul> |
<form> |
Defines a form for user input | <form action="/submit"></form> |
To set up your own website, you’ll need the following:
-
Domain Name
- A unique address people use to visit your site.
- Example:
www.myportfolio.com - Purchase from: GoDaddy, Namecheap, Google Domains, etc.
-
Web Hosting
- A service that stores your website files and makes them accessible online.
- Types: Shared Hosting, VPS, Cloud Hosting, etc.
- Popular providers: Hostinger, Bluehost, SiteGround, AWS.
-
Website Files
- Your HTML, CSS, JavaScript, images, and media content.
-
FTP Client or Hosting Dashboard
- To upload your files (use FileZilla, or hosting's file manager).
-
Optional CMS (Content Management System)
- Like WordPress for easier content editing without coding.
-
Responsive Design
- Ensure your website works well on desktops, tablets, and phones.
Here’s an example of a simple HTML page you can use:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About Me</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 30px;
background-color: #f8f8f8;
color: #333;
}
.container {
max-width: 600px;
margin: auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px #ccc;
text-align: center;
}
img {
width: 150px;
height: 150px;
border-radius: 50%;
}
</style>
</head>
<body>
<div class="container">
<h1>About Me</h1>
<img src="myphoto.jpg" alt="My Photo">
<p>
Hello! My name is Tirthraj Mahajan. I am currently a student with a strong interest in web development and design. I enjoy learning new technologies and working on creative projects. In my free time, I like reading, coding, and exploring the world of digital design. My goal is to build user-friendly websites that are visually appealing and functional. This webpage is my first step towards becoming a web developer.
</p>
</div>
</body>
</html>| Feature | Internet Explorer | Mozilla Firefox |
|---|---|---|
| Developer | Microsoft | Mozilla Foundation |
| Standards Compliance | Poor/limited | Strong HTML5/CSS3 support |
| Speed | Slower performance | Faster and more optimized |
| Add-ons/Extensions | Limited support | Extensive extension library |
| Security | Vulnerable, outdated | Regular updates, strong security features |
| Modern Status | Discontinued (replaced by Edge) | Actively maintained and updated |
| Cross-platform | Windows only | Windows, macOS, Linux |