Web Designing Q&A

  1. What does HTML stand for?
    Hyper Text Markup Language.
  2. What is the purpose of HTML?
    To structure content on the web.
  3. What are HTML elements?
    Individual components of HTML documents, such as headings, paragraphs, and links.
  4. What is the difference between block-level and inline elements?
    Block-level elements take up the full width, while inline elements only take up as much width as necessary.
  5. What is the <head> section used for?
    To contain metadata, links to stylesheets, and scripts.
  6. What is the purpose of the <title> tag?
    To define the title of the web page, shown in the browser’s title bar.
  7. What is an HTML attribute?
    A modifier of an HTML element that provides additional information (e.g., class, id).
  8. What are semantic HTML elements?
    Elements that clearly describe their meaning (e.g., <header>, <footer>, <article>).
  9. What is the <form> element used for?
    To collect user input.
  10. What is a doctype?
    A declaration that defines the document type and version of HTML.
  11. What are data attributes in HTML?
    Custom attributes that store extra information on standard HTML elements.
  12. What is the <meta> tag?
    An element that provides metadata about the HTML document, such as character set and viewport settings.
  13. What is the <canvas> element?
    An element used for drawing graphics via JavaScript.
  14. What are iframes?
    HTML elements that allow you to embed another document within the current document.
  15. What is the purpose of the <alt> attribute in <img> tags?
    To provide alternative text for an image if it cannot be displayed.

 

  1. What does CSS stand for?
    Cascading Style Sheets.
  2. What is the purpose of CSS?
    To style HTML elements.
  3. What are selectors in CSS?
    Patterns used to select the elements you want to style.
  4. What is the difference between class and ID selectors?
    Class selectors are reusable (e.g., .class), while ID selectors are unique to a single element (e.g., #id).
  5. What is the box model in CSS?
    A model that describes how the width and height of an element are calculated (including padding, border, and margin).
  6. What are margins in CSS?
    The space outside an element’s border.
  7. What is padding in CSS?
    The space between an element’s content and its border.
  8. What are media queries?
    CSS techniques that apply styles based on device characteristics, like width or height.
  9. What is Flexbox?
    A CSS layout model that allows for the responsive arrangement of elements in a container.
  10. What are CSS preprocessors?
    Tools like SASS and LESS that extend CSS with variables, nesting, and other features.
  11. What are CSS transitions?
    Techniques for animating changes between CSS property values.
  12. What are CSS animations?
    A way to create complex animations using keyframes.
  13. What is the difference between absolute and relative positioning?
    Absolute positioning removes an element from the document flow, while relative positioning keeps it in the flow.
  14. What is a CSS grid?
    A layout system for creating two-dimensional designs.
  15. What is a CSS reset?
    A stylesheet that removes default browser styling to create consistency across browsers.
  16. What is JavaScript?
    A programming language used to create interactive effects within web browsers.
  17. What is the purpose of JavaScript?
    To add dynamic behavior and interactivity to web pages.
  18. What are variables in JavaScript?
    Containers for storing data values.
  19. What are the data types in JavaScript?
    Undefined, Null, Boolean, Number, String, Object, Symbol.
  20. What is a function in JavaScript?
    A block of code designed to perform a specific task.
  21. What is an array?
    A data structure that can hold multiple values.
  22. What is an object in JavaScript?
    A collection of key-value pairs.
  23. What is event bubbling?
    The process where events propagate up from child to parent elements.
  24. What is the DOM?
    Document Object Model; a programming interface for web documents.
  25. What is JSON?
    JavaScript Object Notation; a lightweight data interchange format
  26. What is the difference between == and ===?
    == checks for value equality (type coercion), while === checks for both value and type equality.
  27. What are callbacks?
    Functions passed as arguments to other functions to be executed later.
  28. What are promises in JavaScript?
    Objects representing the eventual completion or failure of an asynchronous operation.
  29. What is async/await?
    Syntax for working with asynchronous code in a more readable manner.
  30. What is the this keyword?
    Refers to the context in which a function is called.
  31. What are comments in HTML?
    Text not displayed in the browser, used for code explanation: <!– comment –>.
  32. What is a CSS class?
    A selector that applies styles to elements with the same class name.
  33. What are semantic tags in HTML5?
    Tags that convey meaning about the content (e.g., <article>, <section>).
  34. What is a media type in CSS?
    A type that specifies the intended use of a style sheet (e.g., screen, print).
  35. What are the different ways to include CSS in a web page?
    Inline styles, internal stylesheets, and external stylesheets.
  36. What is the defer attribute in <script>?
    It allows scripts to be executed after the document has been parsed.
  37. What is the async attribute in <script>?
    It allows scripts to be downloaded in parallel with the HTML parsing.
  38. What is a closure in JavaScript?
    A function that remembers its lexical scope even when the function is executed outside that scope.
  39. What is the event delegation?
    A technique that allows a single event listener to manage events for multiple child elements.
  40. What is responsive web design?
    An approach to web design that makes web pages render well on a variety of devices and window sizes.
  41. What are CSS sprites?
    A technique for combining multiple images into a single image to reduce HTTP requests.
  42. What is a CSS framework?
    A pre-prepared library of CSS code that helps in designing web pages.
  43. What is the purpose of the z-index property?
    To control the stacking order of overlapping elements.
  44. What is the event.preventDefault() method?
    A method that cancels the default action of an event.
  45. What is AJAX?
    Asynchronous JavaScript and XML; a technique for making asynchronous requests to a server.
  46. What is the difference between let, const, and var?
    var is function-scoped, let is block-scoped, and const is also block-scoped but cannot be reassigned.
  47. What is a CSS fallback?
    A method for providing alternative styles if the preferred styles are not supported.
  48. What is a service worker?
    A script that runs in the background to manage caching and offline capabilities for web applications.
Scroll to Top