Font size
WorksheetsHTML & CSS Basics Quiz 3
Total questions: 15
Worksheet time: 10mins
What does <!DOCTYPE html> indicate at the top of the code?
It defines the title of the page
It declares the document type and HTML version
It loads external CSS
It links JavaScript
Where should metadata and CSS styling typically be placed?
Inside the <body>
Inside the <footer>
Inside the <head>
Inside the <header>
Which HTML element contains all the visible content of the web page?
<meat>
<div>
<head>
<body>
Which tag is used to define the top section of the page with the title?
<section>
<header>
<head>
<title>
Which CSS property makes the profile picture circular?
background-color
border-radius
text-align
box-shadow
In the skills and hobbies sections, which HTML tags are used for lists?
<table> and <tr>
<ul> and <li>
<ol> and <p>
<div> and <span>
What does the following CSS code do? header { background-color: #007BFF; color: #222; text-align: center; }
Adds a white border to the header
Centers the page
Styles the header with a blue background, white text, and center alignment
Hides the header
What does the <section> tag represent in this portfolio?
Breaks the text into paragraphs
Defines different parts of the web page (About, Skills, etc.)
Inserts images
Creates a table
If you wanted to change the font for the whole page, which selector would you modify?
.container
body
header h1
section
How should you correctly display your profile picture so that it appears wherever the file is sent?
What is JavaScript primarily used for?
Structuring web paces (layout and elements)
Styling web pages with colors and fonts
Adding interactivity and functionality to web pages
Hosting websites online
Which command is commonly used to print messages or test code in JavaScript?
print()
echo()
console.log()
alert.write()
Which of the following is a valid way to write a single-line comment in JavaScript?
<!-- This is a comment -->
This is a comment
//This is a comment
** This is a comment
What is the result of the following JavaScript expression?
'Hello' + ' ' + 'World'
HelloWorld
Hello World
Hello+World
Error
Which JavaScript built-in object provides mathematical operations like Math.random() and Math.floor()?
Number
Math
String
Object
