Font size
WorksheetsWD1 Exercise 1
Total questions: 67
Worksheet time: 1hrs 13mins
Which of the following is an opening HTML tag?
</html>
<<html>>
<html>
<html/>
Which tag is used to add an image?
<image>
<img>
<<img>>
</image>
What symbol should you use to target an id in css?
.
+
id
#
What symbol should you use to target a class name in css?
#
()
.
class
What is the correct syntax to change the background color with css?
background-color: purple;
background-color = "purple";
backgroundcolor=orange
change-background-color: purple
What is missing from this HTML skeleton?
<!DOCTYPE html>
<html>
<body>
</body>
</html>
<head></head>
<div></div>
<img></img>
<head>
What tag do you use to make a numbered list?
<list>
<ol>
<li>
<ul>
How do you change the font color with CSS?
font-color: green;
color: green;
change-font-color: green;
fontcolor=green;
Where should you put the link tag to connect your CSS and HTML file?
Between the <head> </head> in HTML
Between the <body> </body> in HTML
None of the above.
Jerry wants to insert an attribute in image tag to represent broken image in his baking webpage. Which attribute should he use?
alt="cake"
src="cake"
style="cake"
img="cake"
What is the proper code to insert an image named 'frog.jpg'?
<img ="frog" width="100" height="150">
<img src="frog" width="100" height="150">
<img src="frog.jpg" width="100" height="150">
<img ="frog.jpg" width="100" height="150">
Which attribute tells the browser where the file is?
link
rel
href
style
________ is a form of CSS which is used to add styling to multiple HTML pages at a time.
External
Internal
Inline
Selector
Which line of code correctly creates a link to Amazon's website?
In CSS, a ___________ is used to apply CSS styles to only some elements and not to all of them
class
position
display
inline
Which is the correct CSS syntax?
body:color=yellow;
body {color: yellow;}
{body;color: yellow;}
{body:color= yellow;}
While building your webpage, you want to apply inline styles to a specific text element. Which HTML attribute should you use?
style
class
id
format
Where does this title appear?
What is the correct code for a paragraph in CSS?
P
<p> </p>
.p
p{
}
What type of tag is this: <!-- -->
comments
questions
paragraph
image
sets the color of words in a paragraph
h1 {
color: pink;
}
img {
color: pink;
}
body {
color: pink;
}
p {
color: pink;
}
Select the rule set to make all the text in your web page blue and centered.
p {
color: blue;
}
body {
text-align: left;
color: blue;
}
p {
text-align: center;
color: blue;
}
body {
text-align: center;
color: blue;
}
How can you create a box with rounded corners on the webs page-left-top corner and page-right-bottom edges?
border-radius: 10px, 0px ;
border-radius: 10px 0px ;
border-radius: 10px 10px ;
border-radius: 0px, 10px ;
4.
What is the proper way to code a website title using HTML
title{
New Website}
<title>New Website</title>
.tile New Website
<title>New Website<title>
Name the type of addressing that has been used here:
<a href="https://www.gov.scot/news">Click here for the latest news</a>
Absolute
Relative
We want to create a numbered list of the top 5 films.
Complete the missing tag
<_ _>
<li>Eternals</li>
<li>Avengers Infinity War</li>
<li>Thor Ragnarok</li>
<li>Black widow</li>
<li>Shang Chi</li>
</_ _ >
(a)
Complete the missing part of the image tag below.
<img _ _ _ = "pic1.jpg">
(a)
This attribute of the <img> provides a description of the image if the image fails to display on the web page.
<img src="pic2.png" _ _ _ = "Picture 2">
(a)
What is missing from the following audio tag?
<audio controls>
< (a) src="music.mp3" type="audio/mpeg">
</audio>
Write the missing tag from this HTML page
<!DOCTYPE html>
<html>
<____>
<title>Web page title</title>
</____>
<body>
</body>
</html>
(a)
What kind of hyperlink takes you to another page on another website?
Internal Link
Exit Link
External Link
Inside Link
<link type="stylsheet" href="exx.css"> belongs to
External
Internal
Inline
None of the above
Style will come inside head for
External
Inline
Internal
All of the above
External css file will be saved as
.css
.html
.php
None of the above
When you use class selector
What should present infront of classname
#
&
@
.
When you use id selector
What should present infront of idname
?
@
#
.
The CSS Property used to make the text bold is:
font-style
font-weight
font-size
font-bold
You want to ensure that an element with the class "box" has a width of 300px, including padding and border. Which CSS rule accomplishes this?
.box { width: 300px; box-sizing: content-box; }
.box { width: 300px; box-sizing: padding-box; }
.box { width: 300px; box-sizing: border-box; }
.box { width: 300px; box-sizing: margin-box; }
A graphical image file format commonly used for photographs.
.jpeg
.aiff
.mp4
.gif
Which of the following is a valid CSS rule?
h1 {
color: blue;
}
<h1> {
color: blue;
}
h1 {
color="blue";
}
h1 {
color=blue;
}
Suppose you have the following CSS rules:
p { color: green; }
.fire { color: red; }
#title { color: blue; }
What font color will the following HTML element have after being styled by the given CSS:
<h1 class="fire">Welcome!</h1>
Red
Green
Blue
Black
Suppose you have the following CSS rules:
p { color: green; }
.fire { color: red; }
#title { color: blue; }
What font color will the following HTML element have after being styled by the given CSS:
<p class="title">My First Paragraph</p>
red
blue
green
black
Suppose you have the following CSS rules:
p { color: green; }
.fire { color: red; }
#title { color: blue; }
What font color will the following HTML element have after being styled by the given CSS:
<p class="fire" id="title">Hello World!</p>
red
blue
green
black
How do you select elements with class name "test"?
*test
#test
.test
test
Which attribute specifies a unique alphanumeric identifier to be associated with an element?
class
id
article
html
What should be used for an unique element as attribute name in the following: <p ___=”_12t”>
accesskey
unique
id
class
How do you select an element with id "demo"?
demo
#demo
.demo
*demo
If there is a clash b/w a type selector and a class selector, who will win?
class
selector
type selector
<!DOCTYPE html>
<html>
<head>
<style>
#p-style { color: blue; background-color: red; }
#p-style{ background-color:blue; }
</style>
</head>
<body>
<p id="p-style" style="color:white;">
This is a paragraph
</p>
</body>
</html>
Which color and background-color, respectively would apply to the <p> tag?
red and blue
blue and red
white and blue
white and red
<!DOCTYPE html>
<html>
<head>
<style>
.p-class-style { font-size: 14px; background-color: red; }
#p-id-style{ background-color: lightgrey; text-transform: uppercase; }
.p-class-style { font-size: 10px; }
</style>
</head>
<body>
<p class="p-class-style" id="p-id-style">
This is a paragraph
</p> <
/body>
</html>
Which of the following properties would be applied on the <p> tag?
font-size: 14px;
background-color: red;
background-color: lightgrey;
text-transform: uppercase;
font-size: 10px;
When do you need to use an absolute link?
always
when link to a web page file on the same site
when linking to a web page on an external site
never
In what section of the HTML document does the <style> element located if you are using embedded style?
title
header
nav
head
