Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CP12-Q2

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

Which HTML tag is used to embed another webpage into the current document?

a)

<embed>

b)

<iframe>

c)

<div>

d)

<object>

2.

Which attribute specifies the URL of an iframe’s content?

a)

href

b)

src

c)

path

d)

link

3.

Which attribute allows a YouTube video inside an iframe to play in fullscreen mode?

a)

allowfullscreen

b)

frameborder

c)

autoplay

d)

display

4.

Which CSS property can align two <div> elements side by side?

a)

float

b)

align

c)

position

d)

margin

5.

The <div> tag is mainly used to ___.

a)

Insert Images

b)

Group and Style Contents

c)

Create Links

d)

To organize html elements

6.

You want to embed Google Maps showing your school location into your webpage. Which HTML element is most appropriate?

a)

<div>

b)

<map>

c)

<frame>

d)

<iframe>

7.

Which layout method gives the most flexible and modern design?

a)

Table

b)

Float

c)

Flexbox

d)

Frameset

8.

What is the BEST reason for replacing frames with <div> and CSS layout?

a)

Frames are not mobile-friendly.

b)

Divs make scrolling difficult.

c)

Frames use less code.

d)

Divs cannot include content.

9.

The <form> element in HTML is primarily used to ___.

a)

Display videos

b)

Collect user input

c)

Add headers

d)

Format paragraphs

10.

Which attribute defines where form data will be sent?

a)

action

b)

name

c)

method

d)

id

11.

The attribute that determines how form data is sent is ___.

a)

type

b)

value

c)

class

d)
method
12.

Which input type allows a user to choose only one option from a group?

a)

checkbox

b)

text

c)

radio

d)

select

13.

Which control is best for long written feedback?

a)

<input type="text">

b)

<textarea>

c)

<select>

d)

<output>

14.

A form uses method="get" for login credentials. What is the possible issue?

a)

Data appears in the URL

b)

Data is hidden

c)

Data is encrypted

d)

Data is not sent

15.

Why is it important to add for attribute to <label> tags in a form?

a)

It adds spacing

b)

It validates data automatically  

c)

It adds color to labels

d)

It links text to form inputs

16.

Which input type allows user input to be automatically hidden or in a bullet form.

a)

Text

b)

Password

c)

Number

d)

Symbol

17.

Which of the following attributes allows users to increment or decrement a specific value when using <input type=“number”>

a)

skip

b)

value

c)

++

d)

step

18.

What does CSS stand for?

a)

Creative Style System

b)

Computer Script Syntax

c)

Cascading Style Sheet

d)

Color Sheet Style

19.

Who proposed CSS IN  1994?

a)

Håkon Wium Lie

b)

Tim Berners-Lee

c)

Bill Gates

d)

Steve Jobs       

20.

What is the main purpose of CSS?

a)

Create structure

b)

Control the layout and design

c)

Store data

d)

Add hyperlinks

21.

What is the most important reason in creating an external CSS?

a)

To save data faster

b)

To make updating easier

c)

To encrypt data

d)

To allow developers have freedom in styling

22.

Which CSS version introduced animations, transitions, and grid layout?

a)

CSS1

b)

CSS2

c)

CSS3

d)

CSS4

23.

Cascading is best described as ___.

a)

Styles are applied in alphabetical order.

b)

Styles are random.

c)

Styles follow a priority order.

d)

Styles apply only once.

24.

Which CSS feature allows websites to adapt to screen sizes?

a)

Media Queries

b)

Transitions

c)

Animations

d)

Overflow

25.

Why is CSS essential in web design?

a)

It removes layout

b)

It replaces HTML tags.

c)

It slows down browsers.

d)

It helps webpages look organized

26.

Which of the following shows correct CSS syntax?

a)

selector: value;

b)

property=value;

c)

style {property:value}

d)

selector { property: value; }

27.

Inline CSS is defined in ___.

a)

the head section

b)

the start tag

c)

a separate CSS file

d)

browser default

28.

Internal CSS is defined in ___.

a)

the head section

b)

the start tag

c)

a separate CSS file

d)

browser default

29.

External CSS is linked by  ___.

a)

<import="style.css">   

b)

<style src="style.css">

c)

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

d)

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

30.

Which is an advantage of using external CSS?

a)

Allows reusability

b)

Works for one page only

c)

Needs no linking

d)

Slows webpage loading

31.

When multiple CSS rules apply to the same element, which one takes the highest priority?

a)

Inline

b)

Internal

c)

External

d)

Browser Default

32.

You are building a three-page portfolio website. How can you ensure all pages share the same color scheme and layout?

a)

Use inline CSS on every element.

b)

Repeat internal CSS on each page.

c)

Use HTML tables for design.

d)

Create an external CSS file and link it to all.

33.

Which of the styles has the lowest priority?

a)

External

b)

Browser Default

c)

Inline

d)

Internal

34.

Which of the following comes before the declaration block?

a)

property

b)

selector

c)

value

d)

CSS rule

35.

The symbol # represents which selector type?

a)

element

b)

class

c)

ID

d)

group

36.

The symbol . represents which selector?

a)

element

b)

class

c)

ID

d)

group

37.

The universal selector * means:

a)

Apply styles to all elements

b)

Apply styles to IDs and class

c)

Apply styles to all IDs

d)

Apply styles to all class

38.

Which selector is used to style both <h1> and <p> elements?

a)

#h1, #p

b)

h1 + p

c)

.h1, .p

d)

h1, p

39.

The ID selector should be used when ___.

a)

You need to style all elements  

b)

You have to reuse a specific rule

c)

You need to style one unique element

d)

You style nested class

40.

Why are class selectors better than inline styles in large projects?

a)

They improve reusability

b)

They slow rendering

c)

They are easier to look at

d)

Inline style is better than class selectors

41.

Which selector is most efficient for applying the same style to multiple different tags?

a)

Universal selector

b)

ID selector

c)

Class selector

d)

Group selector

42.

Which CSS rule correctly centers all paragraphs with class “center”?

a)

.center p { text-align: center; }

b)

p.center { text-align: center; }

c)

#center p { align: center; }

d)

p#center { align: center; }

43.

The selector .highlight applies style to ___.

a)

All elements

b)

Elements with class “highlight”

c)

Elements with id “highlight”

d)

All headings, for emphasis

44.

The selector #main applies to ___.

a)

One unique element

b)

Multiple class element

c)

Across different element elements

d)

All elements inside the body

45.

Which selector targets multiple elements with shared style?

a)

Group selector

b)

ID selector

c)

ID selector

d)

Inline style

46.

Which of the following is the correct syntax for a group selector?

a)

.group1, .group2{ color: blue; }

b)

h1, #p { color: blue; }

c)

h1, p { color: blue; }  

d)

h1.group1 { color: blue; }

47.

Which selector allows you to center all paragraphs?

a)

#p {text-align: center;}

b)

.p {align: center;}

c)

p {text-align: center;}

d)

*p {align: center;}

48.

Which of the following is true if you do the code div {align: center;} ?

a)

One div will be centered

b)

All the text inside the div will be centered

c)

All div will be centered

d)

Nothing will change in the design

49.

You are designing a webpage where only the paragraphs with class “note” should appear in red, while other elements with the same class keep their original color. Which CSS rule should you use?

a)

#note p { color: red; }  

b)

.note { color: red; }

c)

p.note { color: red; }

d)

p { color: red; }

50.

Which selector applies Arial font to every element on the page?

a)

#all { font-family: Arial;}

b)

* { font-family: Arial; }

c)

p { font-family: Arial; }

d)

.font { font-family: Arial;}