What are CSS media queries used for?
A). Adding animations to elements
B). Applying styles based on the device characteristics
C). Creating image sliders
D). Defining CSS variables
What does the following CSS media query do: @media (orientation: portrait) { ... }?
A). Applies styles when the device is in landscape mode
B). Applies styles when the device is in portrait mode
C). Applies styles regardless of orientation
D). Applies styles only to desktop devices
What does the .on('click', function) method in jQuery do?
A). Attaches a click event handler to selected elements
B). Hides selected elements
C). Changes the background color of selected elements
D). Resizes selected elements
How can you ensure that text resizes appropriately on different devices?
A). By using fixed font sizes
B). By using relative units like em or rem
C). By using larger font sizes for all elements
D). By limiting text to a certain width
Which CSS unit is commonly used in fluid grid layouts?
A). Pixels
B). Points
C). Percentages
D). Inches
How does a fluid grid layout help in responsive design?
A). Provides a fixed layout
B). Uses relative units like percentages to adapt to different screen sizes
C). Limits the content to a fixed width
D). Hides content on smaller screens
How can touch events be handled in jQuery for responsive design?
A). By using .hover() method
B). By using .click() method
C). By using .swipe() method
D). By using .resize() method
What does the max-width property do in responsive design?
A). Sets a fixed width
B). Allows an element to shrink below a specified width
C). Ensures an element does not exceed a specified width
D). Hides an element if it exceeds a certain width
How does the img { max-width: 100%; } CSS rule help in responsive design?
A). Forces images to a fixed size
B). Ensures images are never larger than their container
C). Prevents images from being displayed
D). Sets a minimum width for all images
How can jQuery be used to toggle a navigation menu on small screens?
A). By using .hide() and .show() methods
B). By using .toggleClass() method
C). By using .slideToggle() method
D). By using .fadeIn() method