wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML CSS2025

Total questions: 43

Worksheet time: 30mins

Name
Class
Date
1.

The first web browser developed by Tim Berners-Lee was called (a)   .

2.

The “Web 2.0” era is characterized mainly by:

a)
Increased corporate control over content.
b)
Static web pages with no interactivity.
c)
Limited access to online resources.
d)
User-generated content and social media.
3.

Which of the following best describes Web 3.0?

a)
Web 3.0 is primarily focused on social media integration.
b)
Web 3.0 refers to the next version of HTML.
c)
Web 3.0 is the decentralized web that empowers users with control over their data.
d)
Web 3.0 is a centralized platform for data storage.
4.

A webpage is best described as:

a)
A programming language used for web development.
b)
A type of software used to create websites.
c)
A document displayed in a web browser, typically written in HTML.
d)
A collection of images stored on a server.
5.

A web application differs from a static website because it _____.

a)
is only accessible offline.
b)
is dynamic and interactive.
c)
contains no user interaction.
d)
is built with only HTML and CSS.
6.

The correct syntax for declaring a DOCTYPE in HTML5 is:

a)

<!DOCTYPE html>

b)

<doctype html>

c)

<!DOCTYPE HTML>

d)

<DOCTYPE html>

7.

HTML stands for (a)   .

8.

Which tag defines the main content of an HTML document?

a)

<main>

b)

<section>

c)

<body>

d)

<div>

9.

Semantic HTML refers to:

a)
HTML that uses meaningful tags to describe content.
b)
HTML that uses only div and span tags.
c)
HTML that is only used for styling purposes.
d)
HTML that does not require any tags.
10.

Which HTML element is best used for navigation links?

a)

<div>

b)

<header>

c)

<section>

d)

<nav>

11.

The <iframe> element is used to _____.

a)
embed another document
b)
link to an external site
c)
create a new webpage
d)
display a video player
12.

CSS stands for (a)   .

13.

Which CSS property changes the text color?

(a)  

14.

Which selector targets all <p> elements in a document?

a)

.p

b)
p
c)

#p

d)

paragraph

15.

Inline CSS is defined using which attribute?

(a)  

16.

The CSS position: absolute; positions an element relative to _____.

a)

The browser window

b)

Its nearest positioned ancestor

c)

The parent container only

d)

The <body> element

17.

The Flexbox model is mainly used for _____.

a)
building static websites
b)
designing print layouts
c)
creating animations
d)
creating responsive layouts
18.

The main axis in a flex container is controlled by the property _____.

a)
flex-wrap
b)
align-items
c)
justify-content
d)
flex-direction
19.

CSS Grid is mainly used to _____

a)
style text with colors
b)
add animations to elements
c)
create responsive images
d)
create complex layouts on the web
20.

The CSS property grid-template-columns defines _____.

a)
the background color of grid items
b)
the alignment of items in a grid layout
c)
the spacing between rows in a grid layout
d)
the size and number of columns in a grid layout
21.

Identify the correct structure of an HTML document:

a)

<html>
<head>
<title></title>
<body></body></head>
</html>

b)

<html>
<body>
<head></head></body>
</html>

c)

<html>

<head></head>

<body></body>

</html>

d)

<html>

<meta></meta>

<body></body>

</html>

22.

To create a link to another webpage, we use the <a> tag with the attribute (a)   .

23.

Which of the following correctly embeds an external CSS file?

a)

<style src="style.css">

b)

<link rel="stylesheet" href="style.css">

c)

<script src="style.css">

d)

<css href="style.css">

24.

The <header> and <footer> elements belong to (a)   HTML.

25.

The <iframe> tag can be used to embed:

a)

HTML documents or other web pages

b)

Video files

c)

Local CSS files

d)
Images or graphics
26.

Which CSS selector will style all elements with the class name “box”?

a)
[class='box']
b)
box{}
c)
#box
d)
.box
27.

Which positioning method allows elements to scroll with the page until a specific position is reached?

a)
sticky positioning
b)
absolute positioning
c)
fixed positioning
d)
relative positioning
28.

To make a container a flex container, we use:

a)
container: flex;
b)
display: flex;
c)
flex: display;
d)
display: grid;
29.

In Flexbox, to center an item horizontally, use:

a)
align-items: center
b)
justify-content: center
c)
margin: auto
d)
flex-direction: column
30.

In Grid, to merge multiple columns into one area, use the property (a)   .

31.

Web 1.0 is often referred to as the (a)   web.

32.

Identify which example represents a web application:

a)
A video game console
b)
An online banking system
c)

Tutorial page

d)
A local file storage system
33.

The HTML5 tag <article> is used for _____.

a)
footer content
b)
navigation links
c)
self-contained content
d)
header information
34.

To position an element 20px from the top and 10px from the left using CSS absolute positioning:
position: absolute;

____: 20px;

____: 10px;

(a)  

35.

The CSS rule to create a grid with 3 equal columns:

(a)  

36.

To apply CSS only to <p> tags inside a <div> element:

(a)  

37.

Which Flexbox property reverses the direction of items in a row?

(a)  

38.

In Grid, justify-items: center; aligns items (a)   .

39.

Which property makes an element fixed at the top of the page even when scrolling?

(a)  

40.

The CSS selector p.intro targets:

a)

All

paragraphs with the class 'intro'

b)
All

elements regardless of class

c)

Only

elements with the id 'intro'

d)

All

paragraph without any class

41.

Provide a CSS declaration that creates a responsive image.

a)
img { width: 50%; height: auto; }
b)
img { width: auto; height: 100%; }
c)
img { width: 100%; height: auto; }
d)
img { max-width: 100%; height: 100%; }
42.

Evaluate: Which layout model is better for one-dimensional layouts?

(a)  

43.

Identify one difference between relative and absolute positioning in CSS.

a)
Absolute positioning is always relative to the viewport.
b)
Relative positioning is used for fixed layouts only.
c)
Relative positioning removes the element from the document flow entirely.
d)

relative positions an element relative to itself; absolute positions it relative to its nearest positioned ancestor