wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML & CSS Basics Quiz 3

Total questions: 15

Worksheet time: 10mins

Name
Class
Date
1.

What does <!DOCTYPE html> indicate at the top of the code?

a)

It defines the title of the page

b)

It declares the document type and HTML version

c)

It loads external CSS

d)

It links JavaScript

2.

Where should metadata and CSS styling typically be placed?

a)

Inside the <body>

b)

Inside the <footer>

c)

Inside the <head>

d)

Inside the <header>

3.

Which HTML element contains all the visible content of the web page?

a)

<meat>

b)

<div>

c)

<head>

d)

<body>

4.

Which tag is used to define the top section of the page with the title?

a)

<section>

b)

<header>

c)

<head>

d)

<title>

5.

Which CSS property makes the profile picture circular?

a)

background-color

b)

border-radius

c)

text-align

d)

box-shadow

6.

In the skills and hobbies sections, which HTML tags are used for lists?

a)

<table> and <tr>

b)

<ul> and <li>

c)

<ol> and <p>

d)

<div> and <span>

7.

What does the following CSS code do? header { background-color: #007BFF; color: #222; text-align: center; }

a)

Adds a white border to the header

b)

Centers the page

c)

Styles the header with a blue background, white text, and center alignment

d)

Hides the header

8.

What does the <section> tag represent in this portfolio?

a)

Breaks the text into paragraphs

b)

Defines different parts of the web page (About, Skills, etc.)

c)

Inserts images

d)

Creates a table

9.

If you wanted to change the font for the whole page, which selector would you modify?

a)

.container

b)

body

c)

header h1

d)

section

10.

How should you correctly display your profile picture so that it appears wherever the file is sent?

4 lines
11.

What is JavaScript primarily used for?

a)

Structuring web paces (layout and elements)

b)

Styling web pages with colors and fonts

c)

Adding interactivity and functionality to web pages

d)

Hosting websites online

12.

Which command is commonly used to print messages or test code in JavaScript?

a)

print()

b)

echo()

c)

console.log()

d)

alert.write()

13.

Which of the following is a valid way to write a single-line comment in JavaScript?

a)

<!-- This is a comment -->

b)

This is a comment

c)

//This is a comment

d)

** This is a comment

14.

What is the result of the following JavaScript expression?

'Hello' + ' ' + 'World'

a)

HelloWorld

b)

Hello World

c)

Hello+World

d)

Error

15.

Which JavaScript built-in object provides mathematical operations like Math.random() and Math.floor()?

a)

Number

b)

Math

c)

String

d)

Object