WorksheetsPT Prelim Exam
Total questions: 45
Worksheet time: 27mins
Create the correct HTML5 DOCTYPE declaration:
<! (a) html>
What does HTML stand for?
Hyper Text Markup Language
Hyperlinks and Text Markup Language
Home Tool Markup Language
Hyper Tool Multi Language
Which HTML tag is used for the largest heading?
<h1>
<h6>
<heading>
<head>
Which HTML tag is used for an unordered list?
<ol>
<ul>
<li>
<list>
Which attribute is used to add alternative text to an image?
text
title
src
alt
Which HTML tag is used to display a paragraph?
<p>
<para>
<paragraph>
<text>
Which tag is used to make text bold?
<b>
<strong>
<bold>
Both <b> and <strong>
What does CSS stand for?
Colorful Style Sheets
Creative Style Sheets
Cascading Style Sheets
Computer Style Sheets
Which property is used to change the background color in CSS?
bgcolor
background-color
color
bg-color
Which HTML tag is used to define an image?
<img>
<image>
<pic>
Which CSS property is used to change the text color?
color
font-color
text-color
fgcolor
What is the correct HTML element for inserting a line break?
<break>
<lb>
<br>
<line>
Which is the correct HTML element for inserting a horizontal rule?
<hr>
<break>
<line>
<rule>
Which CSS property controls the spacing between letters?
letter-spacing
word-spacing
spacing
What is wrong in this HTML?
No error
The closing tag is incorrect. It should be </p>
<p> cannot be used
Missing attributes
Find the error and write the correct code:
(a)
Missing colon after property
Missing semicolon
Wrong property name
Extra brackets
Create a hyperlink to https://google.com with the text “Google”
(a)
Find the error and write the correct code:
(a)
Find the error and write the correct code:
(a)
Find the error and write the correct code:
(a)
Which CSS property changes the font family?
font-family
typeface
font-type
font
In the CSS rule below, identify the selector, property, and value:
Selector: font-size;
Property: h2;
Value: 24px
Selector: 24px; Property: h2;
Value: font-size
Selector: h2;
Property: font-size; Value: 24px
Selector: h2;
Property: 24px;
Value: font-size
Which of the following is an example of inline CSS?
<style> p { color: red; } </style>
p { color: red; }
<link rel="stylesheet" href="style.css">
<p style="color: red;">Hello</p>
Set the font size to 32 pixels.
(a)
Center-align the text using inline CSS.
(a)
Which of the following is NOT a way to add CSS to an HTML document?
Inline CSS
External CSS
Server-side CSS
Internal CSS
What is the correct way to make all <p> tags have blue text using internal CSS
Which is the correct syntax to add an external CSS file named theme.css?
Which code correctly creates an unordered list with three items?
h1 style="color:red;">Heading</h1>
Which code correctly sets the background color of a page to lightblue using internal CSS?
Which code correctly creates a CSS rule to change all links to green when hovered?
Which code correctly sets the font size of all paragraphs to 16px?
What HTML5 element is used for navigation links?
<navigate>
<menu>
<nav>
<links>
What HTML element is used to define the title of a document (shown in the browser’s tab)?
<name>
<title>
<header>
<heading>
Which HTML code shows a
element with two links: Home and About?
<nav>
<a>Home</a>
<a>About</a>
</nav>
<nav href="#">
Home | About
</nav>
<nav>
<a href="home.html">Home</a>
<a href="about.html">About</a>
</nav>
What is the purpose of the <dl> tag in HTML?
To define a table
To define a dropdown list
To define a description list
To define a div layout
What does the <dd> tag do in a description list?
Describes the term defined by <dt>
Defines a dropdown option
Defines a data entry
Defines a clickable button
In which situation would you most likely use <dl>, <dt>, and <dd>?
For creating form input fields
For creating dropdown menus
For organizing table rows
For listing definitions or descriptions
Where should the <title> tag be placed?
Inside <body>
Anywhere
Inside <head>
Outside <html>
Which property changes the font size?
font-family
font-size
text-size
size
Which property changes the width of an element
height
width
size
Which property changes the height of an element?
height
width
size
What is the difference between <ol> and <ul> in HTML?
<ol> creates a numbered list, while <ul> creates a bulleted list.
<ol> creates a bulleted list, while <ul> creates a numbered list.
<ol> is used for headings, while <ul> is used for paragraphs.
<ol> and <ul> do the same thing.
Which HTML element is used to define the footer of a page?
<footer>
<foot>
<end>
<bottom>
