WorksheetsHTML & CSS
Total questions: 20
Worksheet time: 11mins
What does HTML stand for?
HyperText Markup Language
Hyperlinks and Text Markup Language
Home Tool Markup Language
Hyperlinking Text Markup League
Which tag is used to create a hyperlink?
<img>
<a>
<link>
<href>
Which attribute is used to give an image alternative text?
title
src
alt
desc
Where do you place the CSS file link in an HTML document?
Inside <body>
Inside <head>
After </html>
Inside a <div>
Which CSS property changes the text color?
background-color
font-weight
color
text-style
Which HTML element is semantic for main navigation links?
<nav>
<div class="nav">
<menu>
<section>
How do you select an element with id="header" in CSS?
.header
#header
header
*header
Which CSS property controls the spacing between the border and content?
margin
padding
border-spacing
gap
What is the default display value of a <div> element?
inline
block
flex
inline-block
Which tag sets the HTML document's character encoding?
<meta name="viewport">
<meta charset="UTF-8">
<link charset="UTF-8">
<script charset="UTF-8">
The <section> element should always be used instead of <div>.
True
False
Which CSS rule has higher specificity?
.menu
#menu
div.menu
p
How do you write a CSS comment?
//comment
<!--comment-->
/*coment*/
*/comment /*
Which property makes an element positioned relative to the viewport (stays when scrolling)?
position:absolute;
position:relative;
position:fixed;
position:static;
Which HTML element is used to include JavaScript?
<script>
<javascript>
<js>
<code>
(Multi-select — choose TWO) Which units are relative CSS units?
px
em
%
cm
What does the CSS box-sizing: border-box; do?
Adds extra border around the box
Includes padding and border in the element's total width and height
Removes margins from the element
Hides the border
Which meta tag is essential for responsive design on mobile devices?
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="responsive" content="true">
<meta name="mobile" content="yes">
Which CSS pseudo-class applies when the mouse is over a link?
:active
:visited
:hover
:focus
In HTML, the tag used to create a numbered list is < (a) >
