Web Technology Question Bank - Unit 1 and 2
Web Technology Question Bank - Unit 1 and 2
Web Technology Question Bank - Unit 1 and 2
UNIT I
PART A
ADVERTISEMENT
o Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
o Host: The host is the computer where the information is stored, and the computer is given
an alias name. Web pages are mainly stored in the computers and the computers are given
an alias name that begins with the characters "www". This field is not mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional field. If
the port number is included, then it must come between the host and path and it should be
separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path itself
contain slashes that separate the directories from the subdirectories and files.
10.When users enter URL address, into a web browser, assess how the specific document
retrieved from a web server?
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
When users enter a URL into a web browser, the browser sends a request to the corresponding web
server. The server processes the request, retrieves the specific document associated with the URL,
and sends it back to the user's browser for display.
11.Show the structure of HTML5.
The structure of HTML5 typically includes a document type declaration (<!DOCTYPE html>),
opening and closing <html> tags, <head> and <body> sections, and various elements like
<header>, <nav>, <section>, <article>, <footer>, etc.
12.Tell about difference between HTML and XHTML.
HTML (Hypertext Markup Language) is more lenient and forgiving, allowing for errors, while
XHTML (Extensible Hypertext Markup Language) is stricter, adhering to XML rules, requiring
well-formed documents, and introducing stricter syntax and rules.
13.Define element and attribute in HTML.
Element:An HTML element is a fundamental building block of web pages. It consists of a starting
tag, content, and an ending tag. Elements can enclose other elements, forming a hierarchical
structure known as the Document Object Model (DOM). Each element represents a specific type
of content or defines a structural or semantic meaning within the document.
Example:
<p>This is a paragraph element.</p>
In this example:
<p> is the starting tag.
This is a paragraph element. is the content.
</p> is the ending tag.
Common HTML elements include <div>, <span>, <h1> to <h6> (for headings), <a> (for links),
<img> (for images), <table> (for tables), <form> (for forms), and many more.
Attribute:An HTML attribute provides additional information about an element and modifies its
behavior or appearance. Attributes are specified within the starting tag of an element and consist
of a name and a value, separated by an equals sign (=). Attributes are optional and may vary
depending on the element they are applied to.
Example:
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
1. Inline CSS
2. Internal CSS
3. External CSS
PART B
1. Explain the functionalities of Webserver and Webclient in detail.
2. Express the information provided by URL.
3. Describe the structure of the HTTP request and response message.
4. Examine the enhanced features in HTML 5.0 with a neat example.
5. Describe how to create a following tags in detail with syntax and examples.
Image
Hyperlink
List tag
Table
Favicon
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
Audio,video
Semantic elements
6. Describe the core syntax of CSS with the help of some suitable example.
7. Classify the three ways of applying CSS to HTML documents with appropriate example.
8. List and explain in detail the types of selector strings.
9. Explain the text and background property in CSS.
10. Build a HTML Registration form and Login using form elements.
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
UNIT II
PART A
I.Alert Box: The alert() method displays a modal dialog box with a message and an
OK button.
II.Confirm Box:The confirm() method displays a modal dialog box with a message,
OK button, and Cancel button.
III.Prompt Box:The prompt() method displays a modal dialog box with a message, an
input field for the user to enter text, and OK and Cancel buttons.
5. Can you list the different methods defined in document and window object of
JavaScript.
1. Document Object:
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
getElementById()
getElementsByClassName()
getElementsByTagName()
createElement()
2. Window Object:
alert()
confirm()
setTimeout()
setInterval()
6. Write javascript code to display your name.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display Name and Department</title>
</head>
<body>
<script>
// Define variables for your name and department
var name = "Your Name";
</body>
</html>
7. Summarize benefits of using JavaScript code in an HTML document.
Enhances interactivity and user experience.
Enables dynamic content updates without page reloads.
Validates form data and provides feedback.
Supports asynchronous communication with servers (AJAX).
Facilitates client-side form validation.
8. Predict the need for client and server-side scripting.
Client-side scripting is needed for enhancing user interfaces, validating user input, and
providing dynamic content without server interaction. Server-side scripting is necessary
for processing and handling data on the server, interacting with databases, and
performing server-level tasks.
9. Name some of the built-in objects in JavaScript.
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
Object: The base object from which all other objects inherit properties and
methods.
Array: Used to store multiple values in a single variable.
String: Used for manipulating strings of text.
Number: Used for numerical operations and represents numeric data.
Boolean: Represents a logical value of true or false.
Date: Used for working with dates and times.
Math: Provides mathematical constants and functions for mathematical
operations.
RegExp (Regular Expression): Used for matching patterns within strings.
10. Define JavaScript statement with an example.
A JavaScript statement is a set of instructions to be executed.
Example:
let x = 5; // Declaration and assignment statement
console.log(x); // Output statement
11. Point out any two techniques of event programming.
Inline Event Handling: Assigning event handlers directly in HTML tags.
<button onclick="myFunction()">Click me</button>
Event Listener: Attaching event handlers using JavaScript.
document.getElementById("myButton").addEventListener("click", myFunction);
12. What is DHTML?
DHTML (Dynamic HTML) refers to a combination of HTML, CSS, and JavaScript that
allows for dynamic and interactive web pages. It enables the manipulation of HTML
elements and styles dynamically in response to user actions or events.
13. Differentiate HTML and DHTML.
HTML (HyperText Markup Language):
Static markup language for creating the structure of web pages.
Does not provide dynamic or interactive features.
DHTML (Dynamic HTML):
Incorporates HTML, CSS, and JavaScript to create interactive and dynamic web pages.
Enables manipulation of HTML elements and styles based on user interactions.
14. Point out the key features of DHTML.
Dynamic Content: Allows the modification of content on-the-fly.
Interactive User Interface: Supports responsive and interactive user interfaces.
Dynamic Styling: Enables changing styles dynamically.
Event Handling: Responds to user events and actions.
Cross-Browser Compatibility: Works across various web browsers.
K. RAMAKRISHNAN COLLEGE OF ENGINEERING, SAMAYAPURAM,
(Autonomous)
Department of Computer Science and Engineering
PART B