True or false: A web page can remain readable even when it has no author stylesheet because browsers apply default styles.
3 CSS Styling and Layout Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 CSS Styling and Layout, test your knowledge, and prepare for your next test or exam.
Which element does the CSS selector #main target?
- A
Every element with the class
main - B
The element with ID
main - C
Every
<main>element - D
Every paragraph inside an element with ID
main
A comma-separated group such as h1, h2 that applies the same declarations to each match is called a selector .
In the typography example, what numeric value is assigned to body's line-height? Enter the number only.
Which CSS property should you use to provide a fallback font stack if your first-choice font is unavailable?
- A
font-style - B
font-weight - C
font-family - D
line-height
True or false: In normal flow, block boxes such as paragraphs usually start on a new line and take the available width.
- A
True
- B
False
In the CSS box model, the region that creates space outside an element's border is the .
Select all the properties that normally inherit their values from an element's parent.
- A
colornormally inherits from a parent. - B
marginnormally inherits from a parent. - C
font-familynormally inherits from a parent. - D
bordernormally inherits from a parent.
Which CSS property controls the alignment of text?
- A
font-weight - B
text-align - C
font-family - D
font-style
Select all the correct statements about Grid and responsive layout.
- A
Grid arranges items in rows and columns.
- B
Grid is designed only for one-dimensional toolbars.
- C
Responsive layout can use flexible sizing and media queries to adapt to available space and screen sizes.
- D
Responsive layout prevents content from adapting to different screen sizes.
What CSS selector targets paragraphs inside an <article> element? Enter the selector exactly.
A grid uses grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)). What happens to the number of columns when the available screen width becomes narrower?
- A
The grid always keeps the same number of columns, regardless of screen width.
- B
The grid forces every column to become narrower than
14rem. - C
Fewer columns fit on narrower screens.
- D
The grid changes into a Flexbox layout.
Consider the CSS rules p { color: #333; } and article p { color: #145a32; }. What color does a paragraph inside an <article> use, and why?
You want one CSS rule to target every element assigned the notice class, regardless of element type. Which selector should you use?
- A
#notice - B
.notice - C
notice - D
article notice
In normal flow, a paragraph displayed as a block usually starts on a new line and takes the available width.
- A
True
- B
False
A page's background is already correct, but its text needs a different foreground color. Which CSS property should you change?
- A
background-color - B
font-color - C
color - D
text-background
A navigation bar needs its items aligned across a row. Which CSS layout system is a suitable choice for arranging and aligning those items along one axis?
- A
Flexbox
- B
Grid
- C
Normal flow only
- D
The box model
A page section contains a collection of cards that should be arranged in both rows and columns. Which layout system best matches that two-dimensional structure?
- A
Flexbox
- B
A type selector
- C
Normal flow
- D
Grid
You want a text block's line spacing to scale with its text size, using a unitless value such as 1.5. Which CSS property should you set?
A design specifies a preferred font that may not be installed on every device. What should the font-family declaration include so the browser can use another available font?
Related study packs and tools
2 Digital Logic
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
03 — Python Programming Fundamentals
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
05 — Data Structures: Concepts, Operations, and Trade-Offs
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
6 Computer Memory
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
07 Trees and Binary Search Trees
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
08 — Discrete Mathematics for Computer Science
A focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
Interrupts
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
OS Processes
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
Systemcalls
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.