Layout and Menus - DIV and CSS layout, inline menus, responsive design concepts - Question Bank
1. Which CSS unit is often recommended for font sizes in responsive design to allow users to adjust text size in browser settings?
2. What is the primary goal of responsive design in terms of user experience?
3. Which CSS property is used to control the order of flex items visually, independent of their order in the HTML source?
4. What is a common issue when using `float` for layout and how is it addressed?
5. If you want a navigation menu to be sticky (remain visible at the top as the user scrolls), what CSS property is commonly used?
6. Which CSS property is essential for creating layouts where items are aligned along a single axis, either horizontally or vertically?
7. What is the primary benefit of using semantic HTML elements like `<nav>`?
8. In the context of responsive design, what is a 'breakpoint'?
9. Which CSS property controls the stacking order of positioned elements?
10. When creating an inline menu, what is the typical parent element containing the menu items?
11. What does `overflow: hidden;` on a container element do?
12. Consider a responsive layout where a sidebar and main content area are side-by-side on large screens but stack vertically on small screens. Which CSS technique is most suitable for this?
13. Which HTML element is specifically designed for navigation links?
14. What is the purpose of the `rem` unit in CSS, especially in responsive design?
15. Which of the following is NOT a valid value for `justify-content` in Flexbox?
16. What is the default value for `flex-direction`?
17. When using `flex-wrap: wrap;`, what happens to items that don't fit on the main axis?
18. Which CSS property allows flex items to wrap onto multiple lines if they don't fit on one line?
19. In CSS Grid, how do you assign an item to a specific grid area?
20. What is the advantage of using CSS Grid over floats for complex page layouts?
21. To make a menu accessible on touch devices, what interaction might replace a simple `:hover` effect?
22. Which HTML structure is most semantically appropriate for a primary navigation menu?
23. When creating a dropdown menu that appears on hover, what CSS pseudo-class is typically used?
24. What is the role of `box-sizing: border-box;` in responsive design?
25. Consider a `<div>` with `width: 50%;`. In a responsive context, what happens when the viewport width decreases?
26. Which CSS property is useful for creating flexible grids that automatically adjust column widths?
27. What is a 'mobile-first' approach in responsive design?
28. Which CSS unit is often preferred for fluid layouts in responsive design because it scales relative to the viewport size?
29. What does `width: 100%;` on an element typically ensure in a responsive layout?
30. A common breakpoint in responsive design might be represented by a CSS media query like:
31. What are CSS Media Queries primarily used for in responsive design?
32. Which HTML element is crucial for responsive design, allowing the browser to set the page's dimensions and scaling?
33. What does the term 'responsive design' refer to in web development?
34. To create a horizontal navigation bar, what CSS approach is commonly applied to list items (`<li>`) within an unordered list (`<ul>`)?
35. What CSS property is often used to remove default padding from `<ul>` and `<ol>` elements when creating navigation menus?
36. When styling a list-based inline menu, what is a common practice to remove default bullet points?
37. How can you create an inline menu using HTML and CSS?
38. What CSS property is used to define the gaps between grid rows and columns?
39. In CSS Grid, what defines the structure of rows and columns?
40. Which CSS property is used to create a two-dimensional layout system for web pages, allowing for rows and columns?
41. What is the purpose of `align-items` in Flexbox?
42. In Flexbox, what does `justify-content: center;` do?
43. Which CSS property is the main axis for Flexbox layout?
44. What CSS layout model is specifically designed for arranging items in rows and columns, providing powerful control over alignment and distribution?
45. Which `display` value allows an element to behave like an inline element but maintain block-level properties like width and height?
46. What is the effect of `display: inline;` in CSS?
47. In CSS, what does `display: block;` typically do to an element?
48. Which CSS property is used to control the visual presentation of elements within a `<div>` container?
49. What is the primary purpose of the `<div>` element in HTML?