NEW
Font size
WorksheetsWeb Dev Quiz
Total questions: 40
Worksheet time: 13mins
Which one of these is not a purpose of HTML?
To add structure to a webpage
To define the content of a webpage
To style a webpage’s appearance
To create headings and paragraphs
Which of the following is a type of code editor?
Google Docs
Atom
Paint
VLC Media Player
The opening tag for a paragraph is:
<paragraph>
<pg>
<p>
<para>
What should every HTML file start with?
<html version="5">
<head>
<!DOCTYPE html>
<meta charset="UTF-8">
What is the purpose of the <head> section in an HTML file?
To display all visible content
To write JavaScript only
To store meta-information like the title
To display images
What tag would you use to show a large heading?
<h6>
<head>
<h1>
<title>
You want to add a picture to your webpage. Which tag should you use?
<picture>
<img>
<media>
<src>
Which part of the website contains what the user actually sees?
<footer>
<head>
<body>
<meta>
Which of these is used to group content but has no specific meaning?
<meta>
<div>
<h1>
<section>
What is the correct way to write a comment in HTML?
<!-- This is a comment -->
// This is a comment
# This is a comment
/* This is a comment */
What does CSS mainly help you do?
Write the structure of the page
Create loops and conditions
Style and design your webpage
Store data in a database
What does a CSS rule always contain?
A heading and a border
A tag and an image
A selector and styling instructions
A div and a footer
What does a CSS declaration represent?
A complete HTML page
A style instruction inside a CSS rule
A comment block
A JavaScript line
Which of these correctly selects all <h1> elements in CSS?
h1 {}
#h1 {}
.h1 {}
element.h1 {}
What symbol is used for a class selector in CSS?
#
/
.
*
Which is the correct syntax for an inline CSS style on a heading?
<h1 color="blue">Hello</h1>
<h1 style="color: blue;">Hello</h1>
<h1 css="color: blue;">Hello</h1>
<h1>style: color=blue;</h1>
What tag do you use in the <head> section for internal styling?
<css>
<design>
<style>
<script>
Which of these is NOT a valid CSS property?
font-size
text-align
margin
html-structure
Which element would typically go at the very bottom of a webpage?
<header>
<body>
<section>
<footer>
Which tag contains the main visible parts of your webpage?
<title>
<footer>
<body>
<style>
Which element is used to represent the top part or intro of a webpage?
<intro>
<meta>
<header>
<nav>
What is the <div> tag mainly used for?
Adding animations
Grouping elements in a container
Creating links
Loading scripts
In HTML, how many heading levels are there?
4
5
6
7
A proper project folder name should:
Contain spaces
Be short and lowercase
Be called “New Folder”
Use special characters
What is the purpose of using comments in code?
To display images
To style the website
To explain the code for humans
To delete sections
What is a selector in CSS?
The part that displays text
The tag you style in CSS
The footer element
The browser’s theme
What is a reason to learn HTML and CSS together?
To design websites with both structure and style
To write Python code
To send emails
To upload YouTube videos
Which of the following file types can you write HTML in?
.docx
.html
.exe
What kind of folder is best for web projects?
Randomly named folders
A single folder for all files
Desktop screen
Temporary folders
Which of these helps make a webpage look better?
HTML
CSS
JS
PHP
Which of these is a real code editor used by developers?
Notepad
Chrome
VS Code
File Explorer
What does the <title> tag affect?
Page background color
Image loading
Tab text in the browser
Font size
Why do developers often comment their code?
To make the website faster
To help others understand the code
To remove bugs
To copy HTML tags
CSS stands for:
Coding Style Syntax
Cascading Style Sheets
Common Style System
Clean Syntax Style
Which of these represents a complete CSS rule?
color: blue;
h1 { color: blue; }
{ font-size: 12px }
#header color: red;
If a CSS rule says p { text-align: center; }, what happens?
The page scrolls
The text moves to the left
The paragraph text is centered
The paragraph is hidden
You want to write CSS inside your HTML document. What method is this?
External
Internal
Inline
Modular
Which of these tags is used to contain your page title?
<style>
<head>
<meta>
<title>
A simple class selector in CSS looks like:
#button {}
.button {}
/button/ {}
button = {}
The <img> tag needs which attribute to work?
href
alt
src
link
