0% found this document useful (0 votes)
62 views7 pages

Web Viva Questions

The document contains a comprehensive set of questions and answers related to web technology, HTML, CSS, and their associated concepts. Key topics include definitions of HTML, CSS, JavaScript, the DOM, web servers, AJAX, responsive web design, and various web development practices. It also covers differences between HTTP and HTTPS, GET and POST methods, and the importance of SEO, among other essential web development concepts.

Uploaded by

Phebe priya
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)
62 views7 pages

Web Viva Questions

The document contains a comprehensive set of questions and answers related to web technology, HTML, CSS, and their associated concepts. Key topics include definitions of HTML, CSS, JavaScript, the DOM, web servers, AJAX, responsive web design, and various web development practices. It also covers differences between HTTP and HTTPS, GET and POST methods, and the importance of SEO, among other essential web development concepts.

Uploaded by

Phebe priya
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
You are on page 1/ 7

Web Technology Viva Questions :

1. What is Web Technology?

 Answer: Web technology refers to the various tools, programming languages,


protocols, and software that are used to build and develop websites and web
applications. This includes HTML, CSS, JavaScript, web servers, databases, and
protocols like HTTP/HTTPS.

2. What is HTML?

 Answer: HTML (Hypertext Markup Language) is the standard markup language used
to create and structure content on the web. It defines the structure of web pages using
elements like headings, paragraphs, links, images, etc.

3. What is CSS?

 Answer: CSS (Cascading Style Sheets) is a stylesheet language used to describe the
presentation or layout of a document written in HTML. CSS controls the design,
colors, fonts, spacing, and positioning of web page elements.

4. What is JavaScript?

 Answer: JavaScript is a high-level, dynamic programming language used to create


interactive effects and dynamic content on web pages. It is an essential part of web
development alongside HTML and CSS, enabling functionalities like form validation,
animation, and interactivity.

5. What is the DOM (Document Object Model)?

 Answer: The DOM is a programming interface for web documents. It represents the
structure of a document as a tree of nodes, where each node corresponds to a part of
the document (elements, attributes, text, etc.). JavaScript can manipulate the DOM to
dynamically update the content and structure of a webpage.

6. What is the difference between HTTP and HTTPS?

 Answer: HTTP (Hypertext Transfer Protocol) is the protocol used to transfer data
between a web server and a client. HTTPS (HTTP Secure) is the secure version of
HTTP that uses encryption (SSL/TLS) to protect data during transmission. HTTPS
ensures confidentiality and integrity of data between the server and client.

7. What is a Web Server?

 Answer: A web server is a software that handles HTTP requests from clients
(typically browsers) and serves them web pages (HTML, CSS, JavaScript files) and
other resources (images, videos, etc.) over the internet.

8. What are Cookies?


 Answer: Cookies are small pieces of data stored by a web browser on a user's device.
They are used to store information about the user, such as preferences, login
information, or session data. Cookies can be sent from the server to the client and vice
versa with each HTTP request.

9. What is AJAX?

 Answer: AJAX (Asynchronous JavaScript and XML) is a web development


technique used to create dynamic, asynchronous web applications. It allows web
pages to update parts of the page without reloading the entire page, providing a
smoother user experience.

10. What is the role of a Web Browser?

 Answer: A web browser is a software application used to access and view websites
on the internet. It interprets and renders HTML, CSS, JavaScript, and other resources
to display content to users. Popular browsers include Google Chrome, Mozilla
Firefox, Safari, and Microsoft Edge.

11. What is Responsive Web Design?

 Answer: Responsive Web Design (RWD) is an approach to web design that makes
web pages render well on a variety of devices and window sizes (desktops, tablets,
and smartphones). It uses CSS media queries to adjust the layout based on the screen
size or device characteristics.

12. What is the difference between class and id in HTML?

 Answer:
o id: The id attribute is used to uniquely identify an element in the HTML
document. It should be used for one element only and is accessed via
JavaScript and CSS.
o class: The class attribute is used to assign one or more classes to elements,
allowing multiple elements to share the same styles.

13. What is a Database in Web Development?

 Answer: A database in web development is a structured collection of data that can be


accessed, managed, and updated. Common databases used in web development
include MySQL, PostgreSQL, and MongoDB. They store data such as user
information, posts, comments, etc., for web applications.

14. What is MVC (Model-View-Controller)?

 Answer: MVC is an architectural pattern used in web application development. It


divides the application into three components:
o Model: Represents the data and business logic.
o View: Represents the UI (User Interface).
o Controller: Handles user input, processes it, and updates the Model and View
accordingly.

15. What is Bootstrap?

 Answer: Bootstrap is a popular open-source framework for developing responsive


and mobile-first websites. It provides pre-built HTML, CSS, and JavaScript
components for designing modern, visually appealing, and consistent web pages.

16. What are Web APIs?

 Answer: Web APIs (Application Programming Interfaces) are a set of rules and
protocols that allow different software applications to communicate with each other.
In web development, APIs allow the exchange of data between a client and a server,
often in JSON or XML format.

17. What is the difference between GET and POST methods in HTTP?

 Answer:
o GET: The GET method is used to retrieve data from the server. It appends the
data to the URL and is visible in the browser’s address bar. It is safe and
idempotent (does not modify data).
o POST: The POST method is used to send data to the server, such as form
data. It sends the data in the body of the request, making it more secure than
GET. It is typically used for actions like submitting forms or uploading files.

18. What is RESTful API?

 Answer: REST (Representational State Transfer) is an architectural style for


designing networked applications. A RESTful API is an API that follows the
principles of REST, which include statelessness, client-server architecture, and using
HTTP methods (GET, POST, PUT, DELETE) to perform CRUD operations.

19. What is a CDN (Content Delivery Network)?

 Answer: A CDN is a system of distributed servers that deliver web content, such as
images, videos, and stylesheets, to users based on their geographic location. CDNs
reduce latency and improve the speed of content delivery to users worldwide.

20. What is the importance of SEO in web development?

 Answer: SEO (Search Engine Optimization) is the process of optimizing a website to


improve its visibility in search engine results. Good SEO practices, such as using
proper keywords, metadata, and clean code, help websites rank higher in search
engines, driving more organic traffic.
HTML and CSS Questions:

1. What is HTML?

 Answer: HTML (Hypertext Markup Language) is the standard language used to


create and structure content on the web. It defines the structure of web pages using
elements such as headings, paragraphs, links, images, forms, etc.

2. What are HTML tags?

 Answer: HTML tags are the building blocks of HTML. They define different
elements of a webpage. Tags are enclosed in angle brackets, like <tagname>.
Common tags include <html>, <head>, <body>, <p>, and <a>.

3. What is the difference between <div> and <span> tags?

 Answer:
o <div>: A block-level element used for grouping larger sections of content. It
creates a new block and takes up the full width of the parent container.
o <span>: An inline element used for grouping smaller portions of content like
text. It does not break the flow of content and only takes up as much width as
needed.

4. What is the purpose of the <head> tag in HTML?

 Answer: The <head> tag contains meta-information about the HTML document, such
as the title, links to stylesheets, scripts, and other metadata like charset and author.

5. What is the <meta> tag used for?

 Answer: The <meta> tag provides metadata about the HTML document, such as the
character set, author, description, and keywords. It is typically placed inside the
<head> section.

6. What is an anchor tag (<a>) in HTML?

 Answer: The <a> tag is used to create hyperlinks. It allows users to click and
navigate to other pages or resources. The href attribute specifies the URL of the link.
o Example: <a href="https://example.com">Click here</a>

7. What is the difference between <ol> and <ul>?

 Answer:
o <ol>: Represents an ordered list, where each list item is numbered.
o <ul>: Represents an unordered list, where each list item is marked with a
bullet point.
8. What is the <form> tag used for in HTML?

 Answer: The <form> tag is used to create HTML forms for collecting user input. It
contains form elements such as text fields, checkboxes, radio buttons, submit buttons,
etc.

9. What are attributes in HTML?

 Answer: Attributes provide additional information about HTML elements. They are
always written inside the opening tag and are used to configure or modify the
behavior of an element. For example, href in the <a> tag or src in the <img> tag.

10. What is the purpose of the alt attribute in the <img> tag?

 Answer: The alt (alternative text) attribute provides a textual description of an image,
which is displayed if the image cannot be loaded. It also helps with web accessibility,
describing images to visually impaired users.

CSS Questions

1. What is CSS?

 Answer: CSS (Cascading Style Sheets) is a stylesheet language used to define the
presentation of HTML elements. It controls the layout, colors, fonts, spacing, and
overall design of a webpage.

2. What are selectors in CSS?

 Answer: Selectors are patterns used to select HTML elements for applying styles.
Examples of selectors include element selectors (e.g., p, h1), class selectors (e.g.,
.class-name), and id selectors (e.g., #id-name).

3. What is the difference between class and id selectors in CSS?

 Answer:
o Class selectors: Used to select multiple elements with the same class. Syntax:
.classname
o ID selectors: Used to select a unique element with a specific ID. Syntax:
#idname
o A class can be applied to multiple elements, while an ID should be unique to a
single element.

4. What is the purpose of the box-sizing property in CSS?

 Answer: The box-sizing property defines how the total width and height of an
element are calculated. With box-sizing: border-box, padding and borders are
included in the element’s width and height. The default value, content-box, excludes
them.

5. What are the different ways to apply CSS to a webpage?

 Answer: There are three ways to apply CSS:


o Inline CSS: Styles are added directly to HTML elements using the style
attribute.
o Internal CSS: Styles are defined within the <style> tag in the <head> section
of the HTML document.
o External CSS: Styles are placed in a separate .css file, linked to the HTML
document using the <link> tag.

6. What is the z-index property in CSS?

 Answer: The z-index property specifies the stack order of elements. Higher values are
displayed in front of lower values. It is used for positioning elements along the z-axis
(depth) when elements overlap.

7. What is the float property in CSS?

 Answer: The float property is used to position elements to the left or right of their
container, allowing other content to wrap around them. It is commonly used for text
wrapping around images.

8. What is the position property in CSS?

 Answer: The position property defines how an element is positioned within its
container. Values include:
o static: Default positioning (normal flow of the document).
o relative: Positioned relative to its normal position.
o absolute: Positioned relative to the nearest positioned ancestor.
o fixed: Positioned relative to the viewport, staying fixed when scrolling.
o sticky: A hybrid between relative and fixed positioning.

9. What is the display property in CSS?

 Answer: The display property determines how an element is displayed on the page.
Common values include:
o block: The element takes up the full width, creating a new block.
o inline: The element takes up only as much space as needed, without breaking
the flow.
o inline-block: Similar to inline, but allows for setting width and height.
o none: The element is not displayed (it’s hidden).

10. What is Flexbox in CSS?

 Answer: Flexbox is a layout model in CSS that allows for more efficient arrangement
and alignment of elements within a container, even when their sizes are unknown or
dynamic. It provides powerful options for centering, spacing, and distributing space
within a container.

You might also like