HomeCode HereHTML and CSS final quiz HTML and CSS final quiz Admin 1 min read Updated November 16, 2026 Ten mixed questions covering structure, accessibility, Flexbox, Grid, responsiveness and performance. HTML & CSS HTML and CSS final quiz 10 questions, instant feedback Question 1 of 10 Which structure puts the page in the most useful reading order? A A div for everything B header, nav, main, footer with one h1 in main C A table layout D Absolute positioning for every section Landmarks and a single h1 give assistive technology and search engines a clear outline, and they still work when CSS fails. Question 2 of 10 An icon button has no visible text. What does it need? A A title attribute only B An accessible name, such as aria-label or visually hidden text C A larger size D A background image An icon conveys nothing to a screen reader without a name. aria-label works, and visually hidden text is often more robust for translation. Question 3 of 10 Which input setup gives the best tap target on mobile? A Tiny inputs in a row B Labels tied to inputs with at least 44px height C Placeholder-only fields D Inputs with no labels A 44px target and a real label improve accuracy and comprehension. Placeholders disappear as soon as typing starts and are not labels. Question 4 of 10 Which Flexbox declaration wraps cards onto new lines? A flex-wrap: wrap B flex-flow: column C display: block D align-content: stretch flex-wrap: wrap lets items move to the next line when they run out of space, which is the basis of many card layouts. Question 5 of 10 Which Grid setup reflows cards without a media query? A grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) B grid-template-columns: 240px 240px C display: block D width: 100% auto-fit with minmax lets the grid decide how many columns fit. It is responsive by construction, though media queries are still useful for larger layout changes. Question 6 of 10 What is the main risk of fixed pixel widths on a page? A Faster rendering B Horizontal scrolling on small screens C Too much whitespace D Fonts do not load A fixed width wider than the viewport forces horizontal scrolling. Fluid widths with max-width avoid it. Question 7 of 10 Why should images include width and height attributes? A To make them load faster B To reserve space and prevent layout shift C To improve colour accuracy D To add alt text The browser can reserve the correct aspect ratio before the image arrives, which keeps the page from jumping as it loads. Question 8 of 10 Which practice improves contrast on a coloured hero section? A Thin light text on a busy photo B A dark overlay or solid panel behind the text C Red text on green D Text with low opacity Text over an image needs a reliable background. An overlay or panel makes contrast predictable and readable. Question 9 of 10 What does a design token in a custom property buy you? A Smaller HTML B One place to change a value used across the site C Automatic translation D Faster fonts Tokens such as --space-2 or --color-brand centralise decisions, which is what makes a theme change a few lines instead of a search-and-replace. Question 10 of 10 A user has reduced motion enabled. What should happen to your animations? A Nothing B Respect prefers-reduced-motion and remove or shorten non-essential motion C Double the speed D Only animate on mobile Motion can cause discomfort. A reduced-motion query that disables transforms and long transitions is a basic accessibility requirement. Check my answers Try again Your answers stay in this browser. Nothing is sent to a server.