CSS — Test 1
Page 1 of 3
Question 1
With the default box-sizing: content-box, what is the rendered width of a box with width: 200px; padding: 10px; border: 5px?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 2
Which selector has the highest specificity?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 3
Which declaration wins: an inline style="color: red", or a stylesheet rule #x { color: blue !important; }?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 4
What happens to the vertical margins of two adjacent block elements with margin-bottom: 20px and margin-top: 30px?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 5
What is an element with position: absolute positioned relative to?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 6
What is the difference between display: none and visibility: hidden?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 7
Why might z-index: 999 have no effect on an element?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 8
If the root font size is 16px and a parent element has font-size: 20px, what are 2em and 2rem for a child's font-size?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 9
In a flex container with flex-direction: row, what do justify-content and align-items control?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 10
What does grid-template-columns: 1fr 2fr do?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026