NEW
Font size
WorksheetsHTML and CSS Quiz
Total questions: 30
Worksheet time: 15mins
Which HTML tag is used to insert an image?
<pic>
<img>
<image>
<src>
Which attribute is required in the <img> tag?
href
src
link
id
Which code correctly inserts the image logo.jpg?
<img>logo.jpg</img>
<image src="logo.jpg">
<img src="logo.jpg" alt="logo">
<img href="logo.jpg">
Which tag is used to create an ordered list?
<ul>
<li>
<ol>
<list>
How do you add list items?
<item>
<li>
<ol>
<ul>
Which code correctly creates an ordered list?
<ol><li>Item</ol>
<ul><li>Item</li></ul>
<ol><li>Item</li></ol>
D.<list ordered>
Which HTML tag is used to create a table?
<tb>
<table>
<tab>
<t>
Which tag creates a table row?
<tr>
<td>
<th>
<row>
Which is correct to style table, th, td together?
table, th, td { ... }
table th td { ... }
<table th td>
table + th + td { ... }
Which is a correct CSS?
colour: white;
color: #222;
color- white;
colour: white
Which CSS property sets text color?
fontcolor
text-color
color
style-color
Identify the error: colour: white;
Wrong spelling
Missing semicolon
Value incorrect
Cannot style color in CSS
Identify the CSS error: margin: 5
Missing unit (px)
Wrong property
Must be percentage
Missing semicolon only
Error in fontfamily: georgia;
Should be font-style
Should be font-family
Value incorrect
Should be font-weight
Error in fontsize: 14pix;
Should be font-size
"pix" is invalid
Missing dash
All of the above
Correct list-style CSS?
list-style-type= circle;
list-style circle;
list-style-type: circle;
list: circle;
HTML tag for a hyperlink?
<link>
<a>
<href>
<url>
How to open a link in a new tab?
target='open'
target='_tab'
target='_blank'
new='tab'
Correct HTML link syntax:
<a src="page.html">
<a link="page.html">
<a href="page.html">
<a url="page.html">
CSS border syntax:
border: 2px blue;
border-size: 2px;
border-color-style;
border: 2px solid blue;
Which CSS line is correct?
background: gray
background: gray;
background: gray:
background gray;
Error in: border-top: 1px solid white
Wrong property
Missing semicolon
Value invalid
border-top cannot be used
Problems in: textalign: centre
textalign → text-align
centre → center
missing semicolon
all of the above
Correct CSS rule for h1:
h1(color)
h1 { color: #222; }
{h1: color white;}
h1 = color white;
Error in <title> Page <title>
Must be uppercase
Should be self-closing
Missing closing </title>
Title cannot contain spaces
Which tag contains CSS?
<style>
<script>
<css>
<head>
Correct border-radius syntax:
border-radius: 15
border-radius: 15px;
border-radius=15px;
radius: 15px;
HTML element for a footer:
<footer>
<foot>
<bottom>
<bottom>
Correct CSS selector for table, th, td:
table, th, td {}
table th td {}
C.
table + th + td {}
Correct CSS comment:
<!-- comment -->
/** comment **/
/* comment */
// comment
