Q. Explain differences between HTML & HTML 5
- HTML (Hypertext Markup Language) is the standard markup language for creating web pages. HTML5 is the latest version of HTML.
- HTML5 introduces new semantic elements like
<section, which provide better structure and meaning to web content.
- HTML5 includes native support for audio and video elements, eliminating the need for third-party plugins.
- It offers improved form handling with new input types and attributes.
- HTML5 enables canvas and SVG graphics for richer visual content.
- It supports geolocation, local storage, and more modern web features.
Q.Explain differences between CSS & CSS 3:
- CSS (Cascading Style Sheets) is the initial version for styling web documents. CSS3 is the latest version.
- CSS3 is modular, allowing for more granular control through individual feature-specific modules.
- CSS3 introduces advanced selectors like attribute selectors and pseudo-classes.
- It enhances the box model with properties like
box-sizing, rounded corners, and box shadows.
- CSS3 adds text shadows, gradients, transitions, and animations.
- It supports 2D and 3D transformations and introduces Flexbox and Grid Layout modules for layout control.
Q. What is “doctype”?
A “doctype” declaration, short for “document type declaration,” defines the version and type of HTML a web page is using. It helps browsers interpret and render the page correctly.
Q. Meaning of “*/star/select all” operator in CSS:
The “*/star/select all” operator in CSS (
*) is a wildcard selector that targets all elements on a web page. It’s used to apply styles globally.
Q. Full form of HTML and explain each term:
HTML stands for Hypertext Markup Language.
- “Hypertext” refers to text with links to other text.
- “Markup” involves using tags to define the structure and presentation of content.
- “Language” indicates that it’s a set of rules and codes for instructing web browsers how to display content.
Q. Full form of CSS and explain each term:
CSS stands for Cascading Style Sheets.
- “Cascading” signifies the order of precedence in applying styles.
- “Style” relates to the visual presentation.
- “Sheets” refers to documents containing style information.
Q. What are media queries, why do we need them?
Media queries are CSS techniques used to apply different styles based on the characteristics of the user’s device or screen, such as width, height, orientation, and resolution. They are crucial for creating responsive web designs that adapt to various screen sizes and devices.
Q. Full form of CSS and explain each term:
CSS stands for Cascading Style Sheets:
- Cascading refers to the way styles are prioritized and can inherit from multiple sources.
- Style pertains to the visual presentation and formatting of web content.
- Sheets are documents or files containing style information used to apply styles to HTML elements.
Q. Difference between “max-width” and “min-width” in media queries:
max-width: Specifies a maximum width at which styles are applied. Styles will be active when the screen width is equal to or less than the specified value.
min-width: Specifies a minimum width at which styles are applied. Styles will be active when the screen width is equal to or greater than the specified value.
Q. What are “block” and “inline” elements? Give a few examples of each:
- Block Elements: Block-level elements create a new “block” formatting context and typically start on a new line, extending the full width of their parent container. Examples include
- Inline Elements: Inline elements flow within the content, allowing other elements to sit beside them horizontally. Examples include
Q. What is “inline-block”?
inline-block is a CSS display property value that combines characteristics of both block and inline elements. Elements with this property are inline-level elements but can have block-level properties like setting width and height, margins, and padding. They flow within the content but retain the ability to control their dimensions.
Q. Difference between CSS Flexbox vs. CSS Grid, which to use when?
- Flexbox: Best suited for one-dimensional layouts, like aligning items in a row or column. It’s great for arranging items within a container.
- Grid: Ideal for two-dimensional layouts, creating both rows and columns. It’s suitable for creating complex layouts with precise control over item placement.
Q. Difference between “class” and “id”, which to use when?
- Class: Can be used multiple times in an HTML document. Used for styling multiple elements that share common properties.
Q. Difference between position “absolute”, “relative”, “fixed”, “sticky”:
- Absolute: Positioned relative to the nearest positioned ancestor. It’s taken out of the normal document flow.
- Relative: Positioned relative to its normal position in the document flow. Other elements are still affected by it.
- Fixed: Positioned relative to the viewport and remains in the same position even when scrolling.
- Sticky: Initially behaves like
fixedonce it reaches a specified scroll position.
Q. What is Bootstrap, why use it?
Q. Full form of DOM, what it is:
Q. How is DOM manipulated using JS:
createElement, and functions to change HTML, CSS, and attributes.
Q. What is jQuery, why is it used, how different it is from JS:
Q. What is the
Q. How to detect a click using JS & jQuery:
addEventListenerand listen for the “click” event.
- In jQuery: You can use the
clickmethod or the
onmethod to attach a click event handler to an element.
Q. How to detect scroll using JS & jQuery:
onscrollevent handler to detect scrolling.
- In jQuery: You can use the
scrollevent or the
onmethod to attach a scroll event handler to an element.
Q. What is JSON, why is it used:
Q. Any other formats you know of other than JSON:
Other data interchange formats include XML (eXtensible Markup Language), YAML (YAML Ain’t Markup Language), and CSV (Comma-Separated Values).
Q. What is REST API, full form of REST and API:
- REST stands for Representational State Transfer.
- API stands for Application Programming Interface.
- A REST API is a set of rules and conventions for building and interacting with web services using HTTP methods. It allows applications to communicate and exchange data over the internet.
Q. How the internet works, what happens when you type google.com or any other URL in the browser and press enter:
Q. What are React.js, Angular, Vue.js:
Q. Full form of SPA, why is it used:
Q. What is AJAX, full form of AJAX and why is it used:
Q. What are HTTP methods:
HTTP methods are actions that define what a request should do. Common HTTP methods include GET (retrieve data), POST (send data to be processed), PUT (update data), DELETE (remove data), and more.
Q. Difference between GET & POST:
- GET is used to retrieve data from a server, and the data is included in the URL.
- POST is used to send data to a server for processing, and the data is sent in the request body.
Q. What are HTTP status codes:
HTTP status codes are three-digit numbers returned by a server in response to an HTTP request. They indicate the outcome of the request, such as success, redirection, or error.
Q. What is client-server architecture:
Client-server architecture is a computing model where client devices (like web browsers) request resources or services from central servers (computers or machines) over a network. Servers provide resources or services in response to client requests.