Font size
WorksheetsLast HTML and CSS Quiz
Total questions: 23
Worksheet time: 17mins
Which HTML tag is used to define an internal style sheet?
<css>
<style>
<script>
<link>
What is the correct CSS property to make a text bold?
font-weight: bold;
text-style: bold;
font-bold: true;
bold: yes;
Which of the following is the correct syntax to apply a class in CSS?
#classname {}
.classname {}
classname {}
@classname {}
What is the default position property of an HTML element?
relative
absolute
static
fixed
In CSS, how do you select all <p> elements inside a <div>?
div p {}
div > p {}
div + p {}
div, p {}
Which CSS property is used to control the space between elements' borders and their content?
margin
padding
spacing
border-spacing
What is the correct way to include an external CSS file in an HTML document?
<link href="styles.css">
<style src="styles.css">
<css link="styles.css">
<link rel="stylesheet" href="styles.css">
In HTML, the < (a) > tag is used to create a hyperlink.
The CSS property used to change the background color of an element is (a) .
In CSS, display: (a) ; is used to make an element take up the full width available and start on a new line.
The HTML5 tag < (a) > is used to define self-contained content, such as blog posts or news articles.
To apply a CSS file to an HTML document, we use the <link> tag inside the < (a) > section.
Which HTML attribute specifies an alternative text for an image?
alt
title
src
href
Which CSS property is used to make text italic?
font-italic
text-style
font-style
text-italic
In HTML, which tag is used to define a table row?
table
td
th
tr
In HTML, the < (a) > tag is used to define a form input field.
In CSS, (a) is the property used to set the space between letters in a text.
Which CSS property controls the transparency of an element?
(a)
The < (a) > tag is used to create an unordered list in HTML.
In CSS, the (a) property is used to specify a custom font for a webpage.
What is the correct syntax for applying a box shadow to an element?
box-shadow: 5px 5px 10px gray;
shadow-box: gray 5px 5px 10px;
box-shadow: gray (5px, 5px, 10px);
shadow: 5px 5px 10px gray;
How many values can the text-shadow property take at a minimum?
1
2
3
4
In CSS, the (a) property is used to apply a shadow effect to text elements.
