✅ *Web Development Mock Interview Questions: Part-3* ⚡🌐

 ✅ *Web Development Mock Interview Questions: Part-3* ⚡🌐


1️⃣ *Q: What is the difference between inline CSS, internal CSS, and external CSS?*  

*A:*  

• *Inline CSS* → Applied directly to an element using the `style` attribute.  

• *Internal CSS* → Defined inside a `<style>` tag within the HTML `<head>`.  

• *External CSS* → Stored in a separate `.css` file and linked with `<link>`.


2️⃣ *Q: What are pseudo-classes in CSS?*  

*A:* Pseudo-classes define the state of an element.  

Examples:  

• `:hover` → When the mouse is over an element  

• `:focus` → When an input is focused  

• `:nth-child()` → Selects specific child elements


3️⃣ *Q: What is the difference between inline script, internal script, and external script in JavaScript?*  

*A:*  

• *Inline* → Written directly in an element using attributes like `onclick`  

• *Internal* → Inside a `<script>` tag in HTML  

• *External* → Stored in a `.js` file and linked with `<script src="">`


4️⃣ *Q: What is AJAX?*  

*A:* AJAX (Asynchronous JavaScript and XML) is a technique to update parts of a web page without reloading the whole page. Uses `XMLHttpRequest` or `fetch()`.


5️⃣ *Q: What is the difference between relative, absolute, fixed, and sticky positioning in CSS?*  

*A:*

• *Relative* → Positioned relative to its normal position  

• *Absolute* → Positioned relative to the nearest positioned ancestor  

• *Fixed* → Stays fixed on screen even while scrolling  

• *Sticky* → Acts relative until a scroll threshold, then sticks


6️⃣ *Q: What are web components?*  

*A:* Web Components are reusable custom elements built using:  

• Custom Elements  

• Shadow DOM  

• HTML Templates


7️⃣ *Q: What is the difference between var, let, and const in JavaScript?*  

*A:*  

• *var* → Function-scoped, allows re-declaration  

• *let* → Block-scoped, can be reassigned  

• *const* → Block-scoped, cannot be reassigned


💬 *Tap ❤️ for more*

கருத்துரையிடுக

0 கருத்துகள்