wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Creating a website | Introduction to CSS

Total questions: 32

Worksheet time: 17mins

Name
Class
Date
1.

Which of the following is the correct file extension for an HTML file?

a)

.htl

b)

.html

c)

.htm

d)

Both B and C

2.

HTML is considered which type of language?

a)

Programming Language

b)

Markup Language

c)

Styling Language

d)

Scripting Language

3.

Which part of an HTML document is visible in the web browser?

a)

<head>

b)

<body>

c)

<title>

d)

<meta>

4.

Which HTML tag is used to create a hyperlink?

a)

<link>

b)

<a>

c)

<href>

d)

<url>

5.

Which of the following is the correct tag to create a new paragraph in HTML?

a)

<p>

b)

<div>

c)

<br>

d)

<para>

6.

What is the purpose of the <title> tag in an HTML document?

a)

To create a heading on the page

b)

To specify the title of the document shown in the browser’s title bar

c)

To insert a title for a paragraph

d)

To link to a CSS file

7.

Which tag is used to create a line break in HTML?

a)

<lb>

b)

<br>

c)

<break>

d)

<newline>

8.

What tag is used to display an image in HTML?

a)

<picture>

b)

<img>

c)

<image>

d)

<src>

9.

Which HTML tag is used to create a numbered list?

a)

<ul>

b)

<ol>

c)

<li>

d)

<list>

10.

Which tag is used to create a heading in an HTML document?

a)

<head>

b)

<h1> to <h6>

c)

<header>

d)

<heading>

11.

What is the correct way to create a hyperlink to www.example.com?

b)

<a link="www.example.com">Example</a>

c)

<a href="www.example.com">Example</a>

d)

<link href="www.example.com">Example</link>

12.

What is the correct HTML tag for inserting a line across the page?

a)

<line>

b)

<break>

c)

<hr>

d)

<divider>

13.

Which of the following tags is used to create a table in HTML?

a)

<tbl>

b)

<tr>

c)

<table>

d)

<td>

14.

How do you add a comment in HTML?

a)

// This is a comment

b)

<!-- This is a comment -->

c)

/* This is a comment */

d)

<comment>This is a comment</comment>

15.

Which attribute is used to specify the URL of an image in the <img> tag?

a)

src

b)

href

c)

link

d)

url

16.

What does the <meta> tag typically provide?

a)

Information about the webpage, such as author and description

b)

Styling for the webpage

c)

Main content of the page

d)

A link to another webpage

17.

Which HTML attribute is used to define inline styles?

a)

css

b)

style

c)

class

d)

id

18.

How do you specify an external CSS file in an HTML document?

a)

<style src="styles.css">

b)

<css href="styles.css">

c)

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

d)

<stylesheet src="styles.css">

19.

What does CSS stand for?

a)

Computer Style Sheets

b)

Cascading Style Sheets

c)

Colorful Style Sheets

d)

Creative Style Sheets

20.

Which of the following is the correct CSS syntax to set a background colour to blue?

a)

background: blue;

b)

bg-color: blue;

c)

color: blue;

d)

background-color: blue;

21.

Which property is used to change the text color in CSS?

a)

text-color

b)

font-color

c)

color

d)

text-style

22.

What does :hover pseudo-class do in CSS?

a)

Selects an element when it's clicked

b)

Selects an element when it's hovered over by the mouse

c)

Selects the first element of a specified type

d)

Selects an element when it has focus

23.

Which property is used to change the font size of an element?

a)

text-size

b)

font-style

c)

font-size

d)

text-style

24.

How do you make the text bold in CSS?

a)

font-weight: bold;

b)

text-bold: true;

c)

font-style: bold;

d)

text-weight: bold;

25.

Match the following

a)

padding

1.

Add space inside an element, between the

b)

margin

2.

Controls the space outside of an element

c)

font-size

3.

Property is used to change the font size

d)

line-height

4.

Specify the space between lines of text

e)

background-image: url("image.jpg");

5.

Set the background image of a webpage i

26.

What is the primary difference between internal and external CSS?

a)

Internal CSS uses different syntax

b)

External CSS is placed in a separate file

c)

Internal CSS only works on certain browsers

d)

External CSS requires JavaScript

27.

Which of the following is an advantage of external CSS?

a)

Faster initial page load

b)

Easier to maintain across multiple pages

c)

Better for small, single-page websites

d)

Simpler to implement for beginners

28.

What is a disadvantage of internal CSS?

a)

It cannot be cached by browsers

b)

It requires additional HTTP requests

c)

It's not reusable across multiple pages

d)

It's slower to load than external CSS

29.

Which method of CSS implementation is generally preferred for large websites?

a)

Inline CSS

b)

Internal CSS

c)

External CSS

d)

Mixed CSS

30.

What is an advantage of internal CSS over external CSS?

a)

Better performance for single-page websites

b)

Easier to manage for large projects

c)

More compatible with older browsers

d)

Allows for more complex selectors

31.

What is a potential disadvantage of external CSS?

a)

It cannot be used for responsive design

b)

It may require an additional HTTP request

c)

It's more difficult to implement than internal CSS

d)

It doesn't work on all browsers

32.

In terms of code organization, what is an advantage of external CSS?

a)

It keeps HTML files smaller and cleaner

b)

It allows for faster rendering of web pages

c)

It provides better browser compatibility

d)

It eliminates the need for media queries