wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Basic HTML and CSS Quiz 1.0

Total questions: 35

Worksheet time: 18mins

Name
Class
Date
1.

What does HTML stand for?

a)

Hypertext Markup Language

b)

Hyperlink and Text Markup Language

c)

Hypertext Markup Link

d)

Hypertext Multi Language

2.

Who wrote the first memo proposing an Internet-based hypertext system?

a)

Tim Berners-Lee

b)

Marc Andreessen

c)

Paul Fodor

d)

Vint Cerf

3.

What is the purpose of the <head> tag in HTML?

a)
The tag is used to define the body of the HTML document.
b)
The tag contains meta-information about the HTML document.
c)
The tag contains the main content of the webpage.
d)
The tag is used for styling the HTML elements.
4.

What does CSS stand for?

a)
Cascading Style System
b)
Creative Style Sheets
c)
Computer Style Sheets
d)
Cascading Style Sheets
5.

What is the correct format of a hyperlink in HTML?

a)

<link href="url">

b)

<link src="url">

c)

<a src="url">text </a>

d)

<a href="url">text </a>

6.

What does the img tag do in HTML?

a)

Defines a table

b)

Formats text

c)

Creates a hyperlink

d)

Displays an image

7.

Which attribute is used to specify the action of a form in HTML?

a)

type

b)

submit

c)

action

d)

method

8.

What is the purpose of CSS?

a)

To style web pages

b)

To structure web pages

c)

To link web pages

d)

To create web pages

9.

Which of the following is a valid CSS selector?

a)

#idName

b)

h1, h2, p

c)

.className

d)

All of the above

10.

What does the 'margin' property in CSS do?

a)

Sets the height of an element

b)

Adds space outside an element

c)

Adds space inside an element

d)

Sets the width of an element

11.

Which of the following is NOT a valid HTML tag?

a)

<nav>

b)

<header>

c)

<footer>

d)

<sectioned>

12.

What is the default value for the 'display' property in CSS?

a)

inline

b)

inline-block

c)

block

d)

none

13.

Which CSS property is used to change the text color?

a)

background-color

b)

font-color

c)

text-color

d)

color

14.

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

a)

To define the main heading of the page

b)

To provide a title for the document

c)

To include external scripts

d)

To create a navigation menu

15.

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

a)

background-color

b)

color

c)

bgcolor

d)

background

16.

What does the 'float' property do in CSS?

a)

Positions an element to the left or right

b)

Sets the opacity of an element

c)

Changes the font size of an element

d)

Aligns text within an element

17.

What is the purpose of the <meta> tag in HTML?

a)

To define the character set of the document

b)

To include external stylesheets

c)

To create a footer for the webpage

d)

To add JavaScript to the document

18.

Which CSS property is used to control the spacing between lines of text?

a)

line-height

b)

spacing

c)

text-spacing

d)

letter-spacing

19.

What does the 'z-index' property do in CSS?

a)

Controls the stacking order of elements

b)

Sets the opacity of an element

c)

Defines the size of an element

d)

Changes the position of an element

20.

What is the purpose of the 'display' property in CSS?

a)

To control the visibility of an element

b)

To set the position of an element

c)

To define how an element is displayed on the page

d)

To change the size of an element

21.

Which HTML tag is used to create an ordered list?

a)

<ul>

b)

<ol>

c)

<list>

d)

<li>

22.

What does the 'padding' property do in CSS?

a)

Adds space outside an element

b)

Adds space inside an element

c)

Sets the border of an element

d)

Changes the background color of an element

23.

What is the function of the 'border' property in CSS?

a)

To create space around an element

b)

To define the outline of an element

c)

To set the color of an element

d)

To add a shadow effect to an element

24.

Which CSS property is used to control the font size of text?

a)

font-size

b)

text-size

c)

size

d)

font-style

25.

What does the 'visibility' property do in CSS?

a)

Hides an element but keeps its space

b)

Removes an element from the document flow

c)

Changes the opacity of an element

d)

Controls the display of an element

26.

Which of the following is a valid way to include a CSS file in HTML?

a)

<style src="styles.css">

b)

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

c)

<css src="styles.css">

d)

<script src="styles.css">

27.

Which CSS property is used to control the width of an element?

a)

width

b)

element-width

c)

size

d)

box-width

28.

Who invented the World Wide Web?

a)
Steve Jobs
b)
Bill Gates
c)
Mark Zuckerberg
d)
Tim Berners-Lee
29.

Which organization is responsible for opening standards to ensure the long-term growth of the Web

a)
World Wide Web Consortium (W3C)
b)

PLDC

c)
World Wide Web Foundation
d)
Internet Engineering Task Force (IETF)
30.

What web era are we currently in?

a)
Web 3.0
b)
Web 1.0
c)
Web 2.0
d)
Web 4.0
31.

A unique address used to identify a website on the internet. It is part of the URL and is composed of several parts.

a)

Domain

b)
URL path
c)
Web server
d)
IP address
32.

What is DNS?

a)
DNS is a programming language.
b)
DNS stands for Domain Name System.
c)
DNS stands for Digital Network Service.
d)
DNS is a type of web browser.
33.

What is TLD?

a)
Top-Level Domain
b)
Total Link Data
c)
Top-Level Directory
d)
Temporary Local Domain
34.

Define a URL

a)
A URL is a type of programming language.
b)
A URL is a file format for images.
c)
A URL is a software application for browsing the internet.
d)
A URL is a web address that specifies the location of a resource on the internet.
35.

What does HTTPS mean?

a)
Hypertext Transfer Protocol Secure Connection
b)
Hypertext Transfer Protocol Standard
c)
Hypertext Transfer Protocol Secure
d)
Hypertext Transfer Protocol