HTML and CSS Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 HTML and CSS flashcards as text
Which CSS property controls the stacking order of overlapping elements?
Answer: z-index
The z-index property sets the stack order of a positioned element; higher values appear on top.
What does the HTML `` element semantically represent?
Answer: Self-contained content like images or diagrams with an optional caption
`` wraps self-contained media content (images, code, charts) that can be referenced from the main flow.
Which CSS selector targets an element only when it is the last child of its parent?
Answer: :last-child
:last-child matches an element that is the very last child node of its parent.
What is the correct HTML attribute to make a form input field required before submission?
Answer: required
The boolean `required` attribute on an input triggers built-in browser validation and prevents form submission if the field is empty.
In CSS Flexbox, which property defines the main axis direction?
Answer: flex-direction
`flex-direction` sets whether flex items are placed in a row or column, establishing the main axis.
Which HTML element is used to embed an inline scalable vector graphic without an external file?
Answer:
The `` element lets you write SVG markup inline within HTML, making it directly part of the DOM.
What does `box-sizing: border-box` change about the CSS box model?
Answer: Padding and border are included in the element's total width and height
With `border-box`, padding and border widths are subtracted from the content area so the element's total size matches the declared width/height.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy