0% found this document useful (0 votes)
5 views6 pages

Web Cia 1

The document covers various aspects of web development, including HTML, CSS, XML, DHTML, and server-side technologies. It explains the structure and features of HTML tables, forms, and lists, as well as the role of XML in data storage and exchange. Additionally, it discusses server security issues, control statements in JavaScript, and the importance of protocols in networking.

Uploaded by

randyjohn123r
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Web Cia 1

The document covers various aspects of web development, including HTML, CSS, XML, DHTML, and server-side technologies. It explains the structure and features of HTML tables, forms, and lists, as well as the role of XML in data storage and exchange. Additionally, it discusses server security issues, control statements in JavaScript, and the importance of protocols in networking.

Uploaded by

randyjohn123r
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

HTML Page with Table and Different List Types


HTML (HyperText Markup Language) is used to create web pages. Tables are used to display data in rows and
columns, while lists are used to organize information clearly.
Features Used
Table with headers
Borders
Cell padding
Ordered, Unordered, and Description lists
HTML Code Example
Copy code
Html
<!DOCTYPE html>
<html>
<head>
<title>HTML Table and Lists</title> <li>JavaScript</li>
</head> </ul>
<body>
<h2>Student Details Table</h2> <h2>Ordered List</h2>
<table border="1" cellpadding="10"> <ol>
<tr> <li>Input</li>
<th>Roll No</th> <li>Process</li>
<th>Name</th> <li>Output</li>
<th>Branch</th> </ol>
</tr>
<tr> <h2>Description List</h2>
<td>101</td> <dl>
<td>Akhilesh</td> <dt>HTML</dt>
<td>CSE</td> <dd>Used to create web pages</dd>
</tr> <dt>CSS</dt>
<tr> <dd>Used to style web pages</dd>
<td>102</td> </dl>
<td>Ravi</td>
<td>ECE</td> </body>
</tr> </html>
</table> Conclusion
<h2>Unordered List</h2> Tables and lists improve the structure and readability of web pages
<ul> by organizing data effectively
<li>HTML</li>
<li>CSS</li>
2. HTML Registration Form 4. XML Structure, Features, and Role
An HTML form is used to collect user input. Forms What is XML?
contain input elements such as text fields, radio XML (eXtensible Markup Language) is a markup
buttons, checkboxes, and submit buttons. language used to store and transport data in a
Form Elements Used structured and readable format.
Labels Structure of XML
Text field XML declaration
Password field Root element
Radio buttons Child elements
Checkboxes Attributes (optional)
Submit button XML Example
HTML Code Example Copy code
Copy code Xml
Html <?xml version="1.0"?>
<!DOCTYPE html> <student>
<html> <rollno>101</rollno>
<head> <name>Akhilesh</name>
<title>Registration Form</title> <branch>CSE</branch>
</head> </student>
<body> Features of XML
<h2>Registration Form</h2> Platform independent
<form> Self-descriptive
<label>Name:</label> Extensible (user-defined tags)
<input type="text" name="name"><br><br> Supports Unicode
<label>Password:</label> Hierarchical structure
<input type="password" name="password"><br><br> Role of XML
<label>Gender:</label> 1. Data Storage
<input type="radio" name="gender"> Male Used to store configuration files
<input type="radio" name="gender"> Female<br><br> Stores structured data permanently
<label>Hobbies:</label> 2. Data Exchange
<input type="checkbox"> Reading Used in web services (SOAP, REST)
<input type="checkbox"> Sports Enables data sharing between different systems
<input type="checkbox"> Music<br><br> Example of Data Exchange
<input type="submit" value="Register"> Server sends data in XML format
</form> Client application reads and processes it
</body> Evaluation
</html> XML plays a vital role in data interoperability
Conclusion between heterogeneous systems due to its
HTML forms are essential for user interaction and simplicity and standardization.
data collection in web applications.
3. DHTML Explanation and Dynamic Web Page
What is DHTML?
DHTML (Dynamic HTML) is a combination of:
HTML – Structure
CSS – Styling
JavaScript – Behavior
DOM – Document Object Model
DHTML allows web pages to change content dynamically without reloading the page.
Features of DHTML
Dynamic content updates
Improved user interaction
Event-driven programming
Client-side execution
DHTML Example (Show/Hide Content)
Copy code
Html
<!DOCTYPE html>
<html>
<head>
<title>DHTML Example</title>
<script>
function showContent() {
[Link]("content").[Link] = "block";
}
function hideContent() {
[Link]("content").[Link] = "none";
}
</script>
</head>
<body>
<h2>DHTML Show and Hide Example</h2>
<button onclick="showContent()">Show</button>
<button onclick="hideContent()">Hide</button>
<div id="content" style="display:none;">
<p>This content is shown and hidden using DHTML.</p>
</div>
</body>
</html>
Conclusion
DHTML enhances web pages by making them interactive, responsive, and user-friendly.
1. Working of the World Wide Web (WWW) with a Neat Block Diagram
The World Wide Web (WWW) is a system of interlinked hypertext documents accessed over the Internet using
web browsers. It works on a client–server model and uses standard protocols like HTTP/HTTPS.
Working:The user enters a URL in a web browser (client).
The browser sends an HTTP request to the web server.
The request travels through the Internet using TCP/IP.
The web server processes the request and retrieves the required resource (HTML page).
The server sends an HTTP response back to the browser.
The browser renders the web page for the user.
Neat Block Diagram:
User -Web Browser (Client) - HTTP Request - Internet - Web Server - HTTP Response - Web Browser
----Displayed Web Page
Key Technologies:
URL – Resource identification
HTTP/HTTPS – Communication protocol
HTML – Web page structure

2. Ways to Integrate CSS into a Web Page


CSS (Cascading Style Sheets) is used to style HTML elements. There are three main ways to integrate CSS into a
web page.
1. Inline CSSWritten directly inside HTML tags using the style attribute.
Affects only a single element.
Example:
Html
<p style="color: blue; font-size: 18px;">Hello World</p>
Advantages: Quick styling
Disadvantages: Not reusable, poor maintainability
2. Internal (Embedded) CSS Defined inside the <style> tag in the <head> section.
Affects the entire page.
Example:
Html
<style>
p { color: green; }
</style>
Advantages: Better organization
Disadvantages: Not reusable across pages
3. External CSS Written in a separate .css file and linked using <link> tag.
Example:
Html
<link rel="stylesheet" href="[Link]">
Advantages: Reusable, maintainable, best practice
Disadvantages: Requires additional file
3. Common Server Security Issues and Preventive Measures
Servers are vulnerable to various security threats. Common issues and their prevention are listed below.
1. Unauthorized Access Attackers gain access using weak passwords.
Prevention: Strong passwords, authentication, access control.
2. SQL Injection Malicious SQL queries manipulate databases.
Prevention: Input validation, prepared statements.
3. Malware and Viruses Harmful programs affect server performance.
Prevention: Antivirus software, regular updates.
4. Denial of Service (DoS) Server is overloaded with excessive requests.
Prevention: Firewalls, traffic monitoring.
5. Data Breach Sensitive data is exposed.
Prevention: Encryption, secure backups, HTTPS.

4. Server Side Includes (SSI) with Examples


Server Side Includes (SSI) are directives embedded in HTML pages that allow the server to dynamically include
content before sending it to the browser.
Features:
5. Comparison between HTML and XML
Executed on the server
Feature
Reduces code duplication
HTML
Useful for headers, footers, menus
XML
Common SSI Directives:
Full Form
1. Include File
HyperText Markup Language
Html
eXtensible Markup Language
<!--#include file="[Link]" -->
Purpose
2. Display Date
Display web content
Html
Store and transport data
<!--#echo var="DATE_LOCAL" -->
Tags
3. Execute Command
Predefined
Copy code
User-defined
Html
Case Sensitivity
<!--#exec cmd="ls" -->
Not case-sensitive
Advantages:
Case-sensitive
Easy content management
Error Handling
Saves time and effort
Ignores errors
Disadvantages:
Strict error handling
Limited functionality
Presentation
Security risks if misused
Focuses on appearance
Focuses on data structure
Conclusion:
HTML is used for presentation, while XML is used for data storage and
exchange.
6. Control statements are used to control the flow of execution in JavaScript programs.
1. Conditional Statements
if Statement
Javascript Javascript
if (age >= 18) { let i = 1;
[Link]("Eligible to vote"); while (i <= 3) {
} [Link](i);
if–else Statement i++;
Javascript }
if (marks >= 40) 3. Jump Statements
[Link]("Pass"); break
else Javascript
[Link]("Fail"); for (let i = 1; i <= 5; i++) {
2. Looping Statements if (i == 3) break;
for Loop [Link](i);
Copy code }
Javascript continue
for (let i = 1; i <= 5; i++) { Javascript
[Link](i); for (let i = 1; i <= 5; i++) {
} if (i == 3) continue;
while Loop [Link](i);
}

1. Define protocol in networking.


A protocol is a set of rules and standards that define how data is formatted, transmitted, and received between
devices in a network to ensure proper communication.
2. What is IPv4?
IPv4 (Internet Protocol version 4) is a network-layer protocol used to identify devices on a network using 32-bit
IP addresses (e.g., [Link]).
3. Mention the need for Cascading Style Sheets (CSS) in web development.
CSS is used to control the presentation and layout of web pages, separate content from design, and ensure
consistency and responsiveness across multiple pages.
4. Why is CGI used in web applications?
CGI (Common Gateway Interface) is used to enable interaction between web servers and external programs,
allowing dynamic content generation based on user input.
5. Differentiate between client-side scripting and server-side scripting, naming one example of each.
Client-side scripting runs on the user’s browser to enhance interactivity (Example: JavaScript).
Server-side scripting runs on the web server to process requests and generate responses (Example: PHP).
6. List the benefits of using external JavaScript files.
Improves code reusability and maintainability
Reduces page load time through caching , Keeps HTML code clean and organized

You might also like