KARPAGAM ACADEMY OF HIGHER EDUCATION
(Deemed to be University)
(Established Under Section 3 of UGC Act, 1956)
(Accredited with A+ Grade by NAAC in the Second cycle)
Pollachi Main Road, Eachanari (Post), Coimbatore – 641 021
UNIT 1
2 MARKS
1. What is a client in a client-server communication model?
Answer: A client is a device or program that requests services or resources from a server
over a network, such as a web browser requesting web pages from a web server.
2. Define a server in the context of the internet.
Answer: A server is a computer or program that provides services, data, or resources to
clients over a network. Examples include web servers that host websites.
3. What is HTTP (Hypertext Transfer Protocol)?
Answer: HTTP is a protocol used for transferring hypertext requests and information on
the World Wide Web. It defines how messages are formatted and transmitted between clients
and servers.
4. What is the role of the Domain Name System (DNS)?
Answer: DNS is responsible for translating human-readable domain names (like
www.example.com) into IP addresses, allowing browsers to locate servers on the internet.
5. What is an HTTP request message?
Answer: An HTTP request message is sent by a client to a server to request a specific
resource, like a web page. It includes a request line (method, URL, version) and headers (such as
user-agent, host).
6. What is an HTTP response message?
Answer: An HTTP response message is sent by the server in reply to an HTTP request,
containing a status code, headers, and the requested content (e.g., an HTML document).
7. What is the role of a web server?
Answer: A web server is a software and hardware system that stores, processes, and
serves web pages to clients over the internet using HTTP.
8. What is a Web Client?
Answer: A web client is typically a web browser that interacts with web servers to access
and display web pages on the user's device.
9. What is a URL (Uniform Resource Locator)?
Answer: A URL is a web address that specifies the location of a resource on the internet.
It consists of the protocol (http://), domain name, and the path to the resource.
10. What is the purpose of the GET HTTP method?
Answer: The GET method is used in HTTP to request data from a specified resource,
typically for retrieving web pages or images.
IMPORTANT 6 MARKS
1. Explain the client-server communication model.
2. Describe the HTTP request-response cycle in detail.
3. What is the role of DNS in the World Wide Web?
4. Discuss the different types of HTTP methods with examples.
5. Explain the process of how a web client (browser) communicates with a web server.
IMPORTANT 10 MARKS
1. Discuss the architecture of the Internet, including clients, servers, and communication
protocols.
2. Explain the process of HTTP communication, including request and response messages
UNIT 2
2 MARKS
1. What is HTML5?
Answer: HTML5 is the latest version of the HTML standard, designed to enhance
the structure, presentation, and behavior of web pages, supporting multimedia elements
like audio, video, and advanced graphical content without the need for plugins.
2. What is the purpose of the HTML5 doctype?
Answer: The HTML5 doctype (<!DOCTYPE html>) is used to define the
document type and version of HTML. It tells the browser to use HTML5 rendering mode,
ensuring consistent behavior across different browsers.
3. What is the role of the <section> tag in HTML5?
Answer: The <section> tag is used to define sections of content, typically
representing thematic groupings like chapters, tabbed content, or distinct parts of a
document. It helps in organizing the page structure.
4. What is the <nav> tag used for in HTML5?
Answer: The <nav> tag is used to define a block of navigation links on a
webpage. It helps search engines and assistive technologies to identify the navigation
sections of a website.
5. What is the purpose of the <article> tag in HTML5?
Answer: The <article> tag represents a self-contained piece of content that could
be distributed and reused independently, such as a blog post, news story, or user
comment.
6. What is the <aside> tag used for in HTML5?
Answer: The <aside> tag is used to define content that is tangentially related to
the main content, such as sidebars, callouts, or additional information like ads or links.
7. What is the function of the <header> tag in HTML5?
Answer: The <header> tag defines the introductory or navigational content of a
section or page, often including headings, logos, or menus.
8. What is the purpose of the <footer> tag in HTML5?
Answer: The <footer> tag defines the footer of a page or section, typically
containing information like copyright, contact details, or links to privacy policies.
9. How is the <table> tag used in HTML5?
Answer: The <table> tag is used to define a table, allowing the organization of
data into rows and columns. It includes tags like <tr>, <td>, and <th> for creating table
rows, data cells, and headers respectively.
10. What is the use of the <select> tag in HTML5?
Answer: The <select> tag is used to create a dropdown menu in forms, allowing
users to choose from a list of options defined within <option> tags.
11. What is the <audio> tag in HTML5?
Answer: The <audio> tag is used to embed sound files (e.g., MP3, OGG) into a
webpage, allowing the user to control playback, volume, and other settings.
12. What is the <video> tag in HTML5?
Answer: The <video> tag is used to embed video content on a webpage. It
supports multiple formats like MP4, WebM, and Ogg, and allows the user to control
playback features such as play, pause, and volume.
13. What is the <canvas> tag in HTML5?
Answer: The <canvas> tag is used to draw graphics, animations, and interactive
content on the fly via JavaScript, allowing for dynamic rendering of shapes, images, and
other visual elements.
14. What is the <svg> tag in HTML5?
Answer: The <svg> tag is used to create scalable vector graphics in XML format,
enabling the creation of graphics like charts, logos, and icons that scale well on any
screen resolution.
IMPORTANT 6 MARKS
1. Explain the new features introduced in HTML5.
2. Describe the HTML5 doctype and its importance.
3. What are the new structural tags introduced in HTML5? Explain their purpose.
4. Explain the usage of the <section>, <nav>, <article>, <aside>, <header>, and <footer>
tags in HTML5.
5. Discuss the <table> and <select> tags in HTML5 with examples of their usage.
6. Explain the new media tags introduced in HTML5, specifically the <audio> and <video>
tags.
7. Describe the <canvas> and <svg> tags in HTML5 and their applications.
IMPORTANT 10 MARKS
1. Discuss the features of HTML5 that improve accessibility, structure, and multimedia
integration.
2. Explain the role of the new structural tags in HTML5, such as <section>, <article>,
<header>, <footer>, and others, and their impact on web development.
3. Explain how the <audio> and <video> tags in HTML5 simplify multimedia integration
on web pages without the need for third-party plugins.
4. Describe the use of <canvas> and <svg> tags in HTML5 for graphics and interactive
content, with examples of their applications.
UNIT 3
2 MARKS
1. What is an HTML5 form?
Answer: An HTML5 form is a web form used to collect user input. It includes elements
like text fields, checkboxes, radio buttons, and submit buttons. HTML5 introduces new
input types and attributes to enhance form functionality.
2. What is the purpose of the placeholder attribute in HTML5?
Answer: The placeholder attribute provides a short hint or example inside an input field,
guiding the user about the expected input format, which disappears when the user starts
typing.
3. What does the required attribute do in HTML5?
Answer: The required attribute specifies that an input field must be filled out before
submitting the form. If left empty, the form will not submit, and the user will receive an
error message.
4. What is the pattern attribute used for in HTML5 forms?
Answer: The pattern attribute allows you to define a regular expression that the input
field’s value must match to be considered valid. It is often used for input validation (e.g.,
for validating phone numbers or ZIP codes).
5. What is the autofocus attribute in HTML5?
Answer: The autofocus attribute automatically focuses on the specified input field when
the page loads, allowing the user to start typing immediately without clicking on the field.
6. What is the email input type in HTML5?
Answer: The email input type is used to create an input field specifically for email
addresses. It validates the entered value to ensure it follows the correct email format (e.g.,
[email protected]).
7. What does the tel input type do in HTML5?
Answer: The tel input type is used to create a field for entering telephone numbers. While
it doesn't validate the phone number format, it typically triggers a numeric keypad on
mobile devices for easier input.
8. What is the purpose of the url input type in HTML5?
Answer: The url input type creates a field for entering web URLs. It validates the input to
ensure the entered value follows the correct URL format (e.g., https://example.com).
9. What is the number input type in HTML5?
Answer: The number input type allows users to enter numeric values, enabling browser-
specific number validation (such as preventing alphabetic characters from being entered).
10. What does the date input type do in HTML5?
Answer: The date input type allows users to select a date from a date picker, providing a
standard format for date entry (e.g., YYYY-MM-DD).
11. What is the range input type in HTML5?
Answer: The range input type allows users to select a value from a specified range using
a slider, typically with defined minimum, maximum, and step values.
IMPORTANT 6 MARKS
1. Explain the different new attributes introduced in HTML5 forms and their significance.
2. Describe the placeholder, required, and pattern attributes in HTML5 forms.
3. What is the role of the autofocus attribute in HTML5 forms?
4. Discuss the use of different HTML5 input types: email, tel, url, and number.
5. Explain how the date and range input types are used in HTML5 forms.
6. Compare the email, tel, and url input types in HTML5.
IMPORTANT 10 MARKS
1. Discuss the new input types introduced in HTML5.
2. Explain how HTML5 forms Include examples of the autofocus, required, and
pattern attributes.
3. Describe the functionality of the placeholder, required, and autofocus attributes in
HTML5 forms.
4. Discuss the role and advantages of using the email, tel, url, and number input types in
HTML5 forms.
5. Explain how HTML5 input types like date, range, and email improve user input.
UNIT IV
2 MARKS
1. What is Cascading Style Sheets (CSS)?
Answer: CSS is a stylesheet language used to describe the presentation and layout of a
document written in HTML or XML. It controls the visual appearance, such as colors,
fonts, and spacing, of web content.
2. What are the types of CSS?
Answer: The three types of CSS are:
Inline CSS: Applied directly within the HTML element using the style attribute.
Internal CSS: Defined within a <style> tag in the <head> section of the HTML
document.
External CSS: Defined in a separate .css file linked to the HTML document using the
<link> tag.
3. What is the difference between a class and an ID selector in CSS?
Answer: A class selector (e.g., .class-name) is used to apply styles to multiple elements,
while an ID selector (e.g., #id-name) is used for a unique element and can only be applied
to one element per page.
4. How does CSS create an inline menu?
Answer: An inline menu in CSS is created by styling a list of links (<ul><li>) to display
horizontally using the display: inline; or display: inline-block; property for the <li>
elements.
5. What is the purpose of the <div> tag in CSS layout?
Answer: The <div> tag is a block-level container element used to group content together.
CSS is then applied to style or position these groups to create complex layouts.
6. What is the use of the class selector in CSS?
Answer: The class selector in CSS allows you to apply the same style to multiple
elements on a page by targeting them with the same class name (e.g., .menu, .button).
7. What is the role of the id selector in CSS?
Answer: The id selector in CSS targets a single, unique element on the page and is used
to apply styles to that specific element (e.g., #header).
8. How is an inline style applied in HTML?
Answer: An inline style is applied by adding the style attribute directly to an HTML
element. For example: <div style="color: red; font-size: 14px;">Text</div>.
9. What is Flexbox in CSS?
Answer: Flexbox is a CSS layout model that allows elements to be arranged dynamically
along a row or column, enabling responsive designs and easy alignment of items within a
container.
10. What is a basic use of the <div> tag in web layouts?
Answer: The <div> tag is used as a container to group content and apply styles or layouts
to it, such as positioning elements, creating sections, or adding styles.
IMPORTANT 6 MARKS
1. Describe the different types of CSS (Inline, Internal, and External).
2. What is the difference between class and ID selectors in CSS?
3. Describe the process of styling an inline menu using CSS.
4. Explain how the <div> tag and CSS are used to create layouts. Discuss
5. What is the role of CSS in web page layout design?
IMPORTANT 10 MARKS
1. Discuss the different types of style sheets in CSS (Inline, Internal, and External).
2. Explain the usage of class and ID selectors in CSS.
3. Describe the process of creating a navigation menu using CSS.
UNIT V
2 MARKS
1. What is JavaScript?
Answer: JavaScript is a high-level, interpreted programming language used to
create interactive and dynamic content on web pages. It allows for event handling,
DOM manipulation, and client-side functionality.
2. What are events in JavaScript?
Answer: Events in JavaScript are actions or occurrences that happen in the
browser, such as a user clicking a button, moving a mouse, or pressing a key.
These events can trigger JavaScript functions to run in response.
3. Provide an example of a simple JavaScript code.
Answer: Example:
<script>
alert("Hello, World!");
</script>
This code displays a pop-up message when the page loads.
4. What is a comment in JavaScript?
Answer: A comment in JavaScript is a piece of text used to explain or annotate
the code. It is ignored by the JavaScript engine. Single-line comments use //, and
multi-line comments use /* ... */.
5. What is a variable in JavaScript?
Answer: A variable in JavaScript is used to store data values. It is defined using
keywords like var, let, or const. Example: let age = 25;.
6. What is a global variable in JavaScript?
Answer: A global variable is a variable declared outside of any function or block,
making it accessible throughout the entire program.
7. What are the basic data types in JavaScript?
Answer: JavaScript has several data types including:
Primitive types: String, Number, Boolean, undefined, null, Symbol, and BigInt.
Non-primitive type: Object.
8. What are operators in JavaScript?
Answer: Operators in JavaScript are symbols used to perform operations on
variables and values. Examples include:
Arithmetic operators: +, -, *, /, %
Comparison operators: ==, ===, >, <, >=, <=
Logical operators: &&, ||, !
9. What is an if statement in JavaScript?
Answer: The if statement is used to execute a block of code if a specified
condition evaluates to true. Example:
if (age > 18) {
console.log("Adult");
}
10. What is a switch statement in JavaScript?
Answer: The switch statement evaluates an expression and compares it with
multiple cases. It executes the code corresponding to the matched case. Example:
switch(day) {
case 1:
console.log("Monday");
break;
case 2:
console.log("Tuesday");
break;
default:
console.log("Unknown day");
}
11. What is a for loop in JavaScript?
Answer: A for loop is used to execute a block of code a specific number of times.
Example:
for (let i = 0; i < 5; i++) {
console.log(i);
}
12. What is a while loop in JavaScript?
Answer: A while loop executes a block of code as long as a specified condition is
true. Example:
let i = 0;
while (i < 5) {
console.log(i);
i++;
}
IMPORTANT 6 MARKS
1. Explain the concept of events in JavaScript. How are events handled in JavaScript?
2. Describe the difference between var, let, and const when declaring variables in
JavaScript.
3. Explain the various data types in JavaScript. Provide examples of each.
4. What are operators in JavaScript?
5. Describe the working of an if statement in JavaScript. How does it differ from the
switch statement?
6. Explain how a for loop and a while loop work in JavaScript.
IMPORTANT 10 MARKS
1. Discuss the role of variables in JavaScript.
2. Describe the various control flow statements in JavaScript, including if, switch, and
loops (for, while).
3. Provide an overview of event handling techniques such as event listeners and event
propagation.
4. Explain the concept of JavaScript functions.