Download (Intermediate HTML & CSS) Frameworks & Preprocessors Knowledge Assessment Guide 2024 and more Exams Computer Science in PDF only on Docsity!
INTERMEDIATE HTML & CSS
Frameworks &
Preprocessors
KNOWLEDGE ASSESSMENT GUIDE
- Which of the following is a feature of CSS preprocessors like Sass and LESS?
- A) Variables
- B) Functions
- C) Nesting
- D) All of the above
- Answer: D) All of the above
- Rationale: CSS preprocessors provide features like variables, functions, and nesting to enhance CSS capabilities.
- What is the primary purpose of using a CSS framework like Bootstrap?
- A) To simplify HTML structure
- B) To provide a responsive grid system
- C) To enhance JavaScript functionality
- D) To create animations
- Answer: B) To provide a responsive grid system
- Rationale: Bootstrap offers a responsive grid system to streamline the development of responsive web designs.
- In Sass, which symbol is used to define a variable?
Fill-in-the-Blank Questions
- In LESS, the symbol used to define a variable is ____.
- Answer: @
- Rationale: LESS uses the
@ symbol to define variables.
- The Bootstrap grid system is based on a ____-column layout.
- Answer: 12
- Rationale: Bootstrap's grid system is based on a 12-column layout to create responsive designs.
- In Sass, the
@mixin directive is used to create ____. - Answer: reusable styles
- Rationale: The
@mixin directive in Sass is used to create reusable styles that can be included in other selectors.
- The command to compile a Sass file into a CSS file is ____.
- Answer:
sass input.scss output.css - Rationale: The
sass command followed by the input and output file names is used to compile Sass into CSS.
- In BEM, the element separator is represented by ____.
- Rationale: In BEM, the element separator is represented by double underscores (
__).
True/False Questions
- True or False: CSS preprocessors can help reduce code redundancy.
- Answer: True
- Rationale: CSS preprocessors allow for the use of variables, mixins, and functions, which help reduce code redundancy.
- True or False: Bootstrap is a CSS preprocessor.
- Answer: False
- Rationale: Bootstrap is a CSS framework, not a preprocessor.
- True or False: In Sass, partials are used to split CSS into smaller, reusable files.
- Answer: True
- Rationale: Partials in Sass are used to split CSS into smaller, more manageable files.
- True or False: The
@extend directive in Sass is used to inherit styles from one selector to another.
- C)
.btn-success - D)
.btn-info - Answer: B)
.btn-primary - Rationale: The
.btn-primary class in Bootstrap is used to create a button with primary styling.
- Which Sass feature allows you to include one set of CSS rules inside another?
- A) Nesting
- B) Variables
- C) Mixins
- D) Functions
- Answer: A) Nesting
- Rationale: Nesting in Sass allows you to include one set of CSS rules inside another, following the HTML structure.
Fill-in-the-Blank Questions (Continued)
- In LESS, the
& symbol is used to reference the ____ selector.
- Answer: parent
- Rationale: The
& symbol in LESS is used to reference the parent selector.
- The command to install Bootstrap via npm is ____.
- Answer:
npm install bootstrap - Rationale: The command
npm install bootstrap is used to install Bootstrap via npm. Multiple Choice: Which of the following is a popular CSS preprocessor? A) SASS B) JavaScript C) HTML D) Python
Correct Answer: A) SASS
Rationale: SASS is a widely used CSS preprocessor that extends the functionality of CSS with features like variables, nesting, and mixins. Fill-in-the-Blank: In Bootstrap, the grid system is based on a total of 12 columns.
Correct Answer: 12
Rationale: Bootstrap's grid system is divided into 12 columns, allowing for flexible and responsive layouts. True/False:
True/False: The main purpose of a CSS reset is to standardize the default styles across different browsers.
Correct Answer: True
Rationale: CSS resets are used to normalize default styles across browsers, ensuring consistent rendering of web elements. Multiple Choice: Which of the following is NOT a popular CSS framework? A) Bootstrap B) Foundation C) Semantic UI D) jQuery
Correct Answer: D) jQuery
Rationale: jQuery is a JavaScript library, not a CSS framework, and is used for DOM manipulation and event handling. Fill-in-the-Blank: The key function of a CSS preprocessor is to enhance the development process.
Correct Answer: development
Rationale: CSS preprocessors streamline the development process by offering features like variables, functions, and mixins.
True/False: CSS Grid Layout is a two-dimensional layout system that provides precise control over both rows and columns.
Correct Answer: True
Rationale: CSS Grid Layout allows for intricate control over both rows and columns, enabling complex and responsive layouts. Multiple Choice: Which CSS preprocessor compiles into standard CSS that can be interpreted by the browser? A) Less B) SASS C) Stylus D) PostCSS
Correct Answer: B) SASS
Rationale: SASS is a CSS preprocessor that compiles into standard CSS, which browsers can interpret for styling web content.
- Multiple Choice: Which of the following is a feature of a CSS preprocessor? A) Native browser support B) Variables C) Inline styling D) Conditional statements
D) Express
Answer: A) Bootstrap
Rationale: Bootstrap is a widely used CSS framework that offers a grid system and components for creating responsive web designs.
- Fill in the Blank: In SASS, the ampersand symbol (&) is used to refer to the ________ selector in nested styles.
Answer: Parent
Rationale: The & symbol in SASS helps reference the parent selector in nested styles, enabling more structured and concise CSS code.
- True/False: CSS preprocessors introduce variables to allow for the reuse of values throughout a stylesheet.
Answer: True
Rationale: CSS preprocessors enable the use of variables to store and reuse values, improving code readability and maintainability.
- Multiple Choice: Which preprocessor language allows the use of functions for manipulating values? A) SCSS B) Stylus
C) SASS
D) LESS
Answer: B) Stylus
Rationale: Stylus is a preprocessor language that supports functions for manipulating values, offering flexibility in styling options.
- Fill in the Blank: The mixin feature in CSS preprocessors allows developers to define reusable blocks of ________.
Answer: Styles
Rationale: Mixins in CSS preprocessors help streamline development by defining reusable blocks of styles that can be included in multiple CSS rules.
- True/False: CSS frameworks like Foundation provide a set of JavaScript functionalities in addition to CSS styling.
Answer: True
Rationale: Some CSS frameworks like Foundation include JavaScript components along with CSS styling to enhance the functionality of websites.
- Multiple Choice: Which of the following is an advantage of using a CSS framework? A) Increased file size
- Multiple Choice: Which CSS framework provides a grid system for layout structure and responsiveness? A) Bulma B) Tailwind CSS C) Foundation D) Materialize
Answer: A) Bulma
Rationale: Bulma CSS framework is known for its robust grid system that helps in creating responsive layouts with ease.
- Fill in the Blank: The process of nesting in a CSS preprocessor simplifies the targeting of ________ elements.
Answer: Child
Rationale: Nesting in a CSS preprocessor enables targeting specific child elements within a parent, making the code more organized and readable.
- True/False: CSS preprocessors can significantly reduce redundancy in CSS code by allowing the reuse of classes and styles.
Answer: True
Rationale: CSS preprocessors streamline coding by reducing redundancy through features like mixins, variables, and nesting, leading to more efficient stylesheets.
- Multiple Choice: Which CSS preprocessor language is a superset of CSS and is supported by popular platforms like Bootstrap? A) SASS B) Stylus C) SCSS D) LESS
Answer: C) SCSS
Rationale: SCSS is a CSS preprocessor language that maintains compatibility with standard CSS syntax, making it widely supported by frameworks like Bootstrap.
- Fill in the Blank: The @media query in CSS preprocessors enables developers to apply styles based on specific ________ criteria.
Answer: Media
Rationale: @media queries in CSS preprocessors allow for responsive design by applying styles based on specific criteria like screen size or device type.
- True/False: CSS frameworks like Materialize provide a standardized set of components and styles to facilitate rapid prototyping.
Answer: True
Answer: True
Rationale: CSS preprocessors can automate the process of adding vendor prefixes to CSS properties, ensuring better browser compatibility without manual intervention.
- Multiple Choice: Which CSS framework is known for its utility-first approach and customizable design system? A) Bulma B) Tailwind CSS C) Foundation D) Semantic UI
Answer: B) Tailwind CSS
Rationale: Tailwind CSS employs a utility-first approach that offers a customizable design system, allowing developers to create unique and efficient styles.
- Fill in the Blank: The ________ function in SASS calculates values and units, enabling dynamic styling based on mathematical operations.
Answer: calc()
Rationale: The calc() function in SASS allows for the calculation of values and units, facilitating dynamic styling based on mathematical operations within stylesheets.
- True/False: CSS preprocessors cannot be used in conjunction with standard CSS files within the same project.
Answer: False
Rationale: CSS preprocessors can coexist with standard CSS files in the same project, allowing developers to gradually transition or mix stylesheets based on requirements.
- Multiple Choice: Which CSS framework provides a comprehensive set of UI components and an emphasis on material design principles? A) Semantic UI B) Bootstrap C) Foundation D) Materialize
Answer: D) Materialize
Rationale: Materialize is a CSS framework that emphasizes material design principles and offers a wide range of UI components for creating modern web interfaces.
- Fill in the Blank: The ________ feature in CSS preprocessors helps avoid specificity issues by generating unique class names automatically.
Answer: Auto-prefixing