The ________ value of the animation-direction property in CSS is used to alternate the animation cycle.
- normal
- reverse
- alternate
- alternate-reverse
The correct option is 'alternate'. When 'animation-direction' is set to 'alternate', the animation plays forward, then backward, creating an alternating cycle. This is useful for creating back-and-forth animations, adding variety to the visual experience.
The ________ value of the CSS display property is used to contain floats within a flex or grid context.
- inline-block
- inline-flex
- block
- inline
The correct option is "block." The block value of the CSS display property establishes a block container, and it's often used to contain floats within a flex or grid context.
In Flexbox, the flex-________ property allows an item to grow or shrink to fit the space available in the flex container.
- sizing
- growshrink
- flexsize
- basis
The correct option is 4. The flex-basis property in Flexbox allows an item to specify its initial size and can grow or shrink to fit the available space in the flex container.
How does the proper use of the 'alt' attribute in HTML improve accessibility in web design?
- alt="Description of the image"
- aria-label="Image description"
- data-alt="Image"
- title="Image"
The 'alt' attribute in HTML is vital for accessibility as it provides alternative text for images. Screen readers use this text to describe images to users with visual impairments. Using descriptive and accurate 'alt' text ensures that all users, including those using assistive technologies, can understand the content.
The CSS methodology ________ focuses on the modularity of CSS by breaking down styles into smaller, reusable parts.
- BEM
- ITCSS
- OOCSS
- SMACSS
BEM (Block Element Modifier) is a methodology that focuses on modularity in CSS, breaking down styles into smaller, reusable parts.
A major challenge in cross-browser testing is ensuring that the layout and functionality remain consistent, especially in ________ browsers.
- Mobile
- Legacy
- Modern
- Text-only
The correct option is Legacy. Cross-browser testing is challenging, especially in legacy browsers, as they may not support modern CSS features, leading to inconsistent layouts and functionality.
________ is a technique in CSS where multiple images are combined into a single image to reduce the number of server requests.
- CSS Sprites
- Data URI
- Minification
- Shorthand Properties
CSS Sprites is a technique where multiple images are combined into a single image, reducing server requests and improving performance.
In a Flexbox layout, how can you ensure that some items take up more space than others, depending on the available space?
- Apply flex-basis: 200px; to the items requiring more space.
- Set flex-grow: 2; on the items that should take up more space.
- Use the order property to prioritize the larger items.
- Utilize flex: 2; on the items needing extra space.
To make certain items take up more space in a Flexbox layout, use the flex-grow property. By assigning a higher value to flex-grow, you instruct the container to allocate more space proportionally to items with higher values, based on the available space.
In Tailwind CSS, how does the approach of "utility-first" differ from traditional CSS frameworks like Bootstrap?
- Utilizes a large set of single-purpose utility classes that directly apply styles in the HTML, promoting flexibility and customization.
- Uses predefined components and a fixed set of class names for styling, limiting customization.
- Tailwind and Bootstrap follow the same "utility-first" approach.
- Tailwind only supports utility classes for typography, not for layout and spacing.
Tailwind CSS embraces a "utility-first" approach, offering a vast set of single-purpose utility classes that can be applied directly in the HTML. This approach provides flexibility and allows developers to customize styles efficiently. In contrast, traditional frameworks like Bootstrap rely on predefined components with fixed class names, which can limit customization options.
Bootstrap and Tailwind are examples of what kind of tools in web development?
- CSS preprocessors
- Front-end frameworks
- JavaScript frameworks
- Server-side scripting tools
Bootstrap and Tailwind are popular front-end frameworks that provide pre-designed components and styles, simplifying the development of responsive and visually appealing web interfaces.