Unit 3: Cascading Style Sheets - Subjective Questions

CSE326 — Internet Programming • Practice Questions with Detailed Answers

20 questions

1

Define CSS. Explain the different methods of applying CSS to an HTML document and state their relative advantages.

2

Explain the major types of CSS selectors with suitable examples.

3

What is CSS specificity? Explain how specificity and the cascade determine which declaration is applied.

4

Describe the different ways of specifying colors and backgrounds in CSS.

5

Distinguish between absolute and relative CSS units. Explain when px, %, em, rem, vw, and vh should be used.

6

Explain how typography and text styling are controlled in CSS. Include important properties and readability considerations.

7

Explain the CSS box model. How do content-box and border-box affect the computed size of an element?

8

Compare static, relative, absolute, fixed, and sticky positioning in CSS.

9

Describe the Flexbox layout model and explain the properties used to align and distribute flex items.

10

Explain CSS Grid Layout and show how explicit tracks, gaps, and item placement are defined.

11

Compare Flexbox and CSS Grid. Under what circumstances should each layout system be selected?

12

Distinguish between pseudo-classes and pseudo-elements. Give examples of their practical use.

13

Explain CSS attribute selectors and demonstrate the operators available for matching attribute values.

14

Describe how HTML forms can be styled with CSS while preserving usability and accessibility.

15

What are CSS custom properties? Explain their declaration, scope, inheritance, fallback values, and common applications.

16

Explain the principles of responsive web design and the role of media queries, fluid layouts, and responsive media.

17

Describe CSS animations using @keyframes. Explain the major animation properties and accessibility considerations.

18

What are CSS transitions? Explain their properties and illustrate how a transition is triggered.

19

Differentiate between CSS transitions and CSS animations with respect to triggering, control, complexity, and use cases.

20

Design and explain a responsive card gallery using CSS Grid, custom properties, pseudo-classes, transitions, and a media query.