wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

WD1 Exercise 1

Total questions: 67

Worksheet time: 1hrs 13mins

Name
Class
Date
1.

Which of the following is an opening HTML tag?

a)

</html>

b)

<<html>>

c)

<html>

d)

<html/>

2.

Which tag is used to add an image?

a)

<image>

b)

<img>

c)

<<img>>

d)

</image>

3.

What symbol should you use to target an id in css?

a)

.

b)

+

c)

id

d)

#

4.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

5.

What is the correct syntax to change the background color with css?

a)

background-color: purple;

b)

background-color = "purple";

c)

backgroundcolor=orange

d)

change-background-color: purple

6.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

7.

What tag do you use to make a numbered list?

a)

<list>

b)

<ol>

c)

<li>

d)

<ul>

8.

How do you change the font color with CSS?

a)

font-color: green;

b)

color: green;

c)

change-font-color: green;

d)

fontcolor=green;

9.

Where should you put the link tag to connect your CSS and HTML file?

a)

Between the <head> </head> in HTML

b)

Between the <body> </body> in HTML

c)

None of the above.

10.
What is the function of the <p> tag?
a)
Defines a paragraph.
b)
Makes the text purple.
c)
It pushes the text to the right.
d)
Prints the webpage.
11.
What is the correct HTML element for inserting a line break?
a)
<lb>
b)
<br>
c)
<break>
d)
<bk>
12.
Choose the correct tag for the largest heading:
a)
h6
b)
heading
c)
head
d)
h1
13.
http://www.google.com is an example of a what?
a)
URL
b)
IP address
c)
Browser
d)
Application
14.

Jerry wants to insert an attribute in image tag to represent broken image in his baking webpage. Which attribute should he use?

a)

alt="cake"

b)

src="cake"

c)

style="cake"

d)

img="cake"

15.

What is the proper code to insert an image named 'frog.jpg'?

a)

<img ="frog" width="100" height="150">

b)

<img src="frog" width="100" height="150">

c)

<img src="frog.jpg" width="100" height="150">

d)

<img ="frog.jpg" width="100" height="150">

16.

Which attribute tells the browser where the file is?

a)

link

b)

rel

c)

href

d)

style

17.

________ is a form of CSS which is used to add styling to multiple HTML pages at a time.

a)

External

b)

Internal

c)

Inline

d)

Selector

18.

Which line of code correctly creates a link to Amazon's website?

19.

In CSS, a ___________ is used to apply CSS styles to only some elements and not to all of them

a)

class

b)

position

c)

display

d)

inline

20.

Which is the correct CSS syntax?

a)

body:color=yellow;

b)

body {color: yellow;}

c)

{body;color: yellow;}

d)

{body:color= yellow;}

21.
Select the code below that uses CSS to configure a background color of #000000 for a web page.
a)
body { background-color: #000000; }
b)
body { bgcolor: #000000; }
c)
document { background­-page: #000000; }
d)
None of these
22.

While building your webpage, you want to apply inline styles to a specific text element. Which HTML attribute should you use?

a)

style

b)

class

c)

id

d)

format

23.

Where does this title appear?

a)
b)
24.

What is the correct code for a paragraph in CSS?

a)

P

b)

<p> </p>

c)

.p

d)

p{

}

25.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
26.

What type of tag is this: <!-- -->

a)

comments

b)

questions

c)

paragraph

d)

image

27.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

28.

Select the rule set to make all the text in your web page blue and centered.

a)

p {

color: blue;

}

b)

body {

text-align: left;

color: blue;

}

c)

p {

text-align: center;

color: blue;

}

d)

body {

text-align: center;

color: blue;

}

29.

How can you create a box with rounded corners on the webs page-left-top corner and page-right-bottom edges?

a)

border-radius: 10px, 0px ;

b)

border-radius: 10px 0px ;

c)

border-radius: 10px 10px ;

d)

border-radius: 0px, 10px ;

30.

4.

What is the proper way to code a website title using HTML

a)

title{

New Website}

b)

<title>New Website</title>

c)

.tile New Website

d)

<title>New Website<title>

31.

Name the type of addressing that has been used here:


<a href="https://www.gov.scot/news">Click here for the latest news</a>

a)

Absolute

b)

Relative

32.

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)  

33.

Complete the missing part of the image tag below.


<img _ _ _ = "pic1.jpg">

(a)  

34.

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)  

35.

What is missing from the following audio tag?


<audio controls>


< (a)   src="music.mp3" type="audio/mpeg">


</audio>

36.

Write the missing tag from this HTML page

<!DOCTYPE html>

<html>

<____>

<title>Web page title</title>

</____>

<body>

</body>

</html>

(a)  

37.
If you want to have more than one property for a CSS selector, what character separates them?
a)
comma ,
b)
semi-colon ;
c)
colon :
38.
What code links your CSS to your HTML file?
a)
<link href="stylesheet.css"/>
b)
<link type="text/css" href="stylesheet.css"/>
c)
<link type="text/css" rel="stylesheet" href="stylesheet"/>
d)
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
39.

What kind of hyperlink takes you to another page on another website?

a)

Internal Link

b)

Exit Link

c)

External Link

d)

Inside Link

40.
Which is the correct way to format a Font Family for a paragraph?
a)
p { font-face: Arial; }
b)
p { family-font: Arial; }
c)
p { font-family: Arial; }
d)
p { font: Arial; }
41.

<link type="stylsheet" href="exx.css"> belongs to

a)

External

b)

Internal

c)

Inline

d)

None of the above

42.

Style will come inside head for

a)

External

b)

Inline

c)

Internal

d)

All of the above

43.

External css file will be saved as

a)

.css

b)

.html

c)

.php

d)

None of the above

44.

When you use class selector

What should present infront of classname

a)

#

b)

&

c)

@

d)

.

45.

When you use id selector

What should present infront of idname

a)

?

b)

@

c)

#

d)

.

46.

The CSS Property used to make the text bold is:

a)

font-style

b)

font-weight

c)

font-size

d)

font-bold

47.

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?

a)

.box { width: 300px; box-sizing: content-box; }

b)

.box { width: 300px; box-sizing: padding-box; }

c)

.box { width: 300px; box-sizing: border-box; }

d)

.box { width: 300px; box-sizing: margin-box; }

48.

A graphical image file format commonly used for photographs.

a)

.jpeg

b)

.aiff

c)

.mp4

d)

.gif

49.

Which of the following is a valid CSS rule?

a)

h1 {

color: blue;

}

b)

<h1> {

color: blue;

}

c)

h1 {

color="blue";

}

d)

h1 {

color=blue;

}

50.

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>

a)

Red

b)

Green

c)

Blue

d)

Black

51.

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>

a)

red

b)

blue

c)

green

d)

black

52.

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>

a)

red

b)

blue

c)

green

d)

black

53.

How do you select elements with class name "test"?

a)

*test

b)

#test

c)

.test

d)

test

54.

Which attribute specifies a unique alphanumeric identifier to be associated with an element?

a)

class

b)

id

c)

article

d)

html

55.

What should be used for an unique element as attribute name in the following: <p ___=”_12t”>

a)

accesskey

b)

unique

c)

id

d)

class

56.

How do you select an element with id "demo"?

a)

demo

b)

#demo

c)

.demo

d)

*demo

57.

If there is a clash b/w a type selector and a class selector, who will win?

a)

class

selector

b)

type selector

58.

<!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?

a)

red and blue

b)

blue and red

c)

white and blue

d)

white and red

59.

<!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?

a)

font-size: 14px;

b)

background-color: red;

c)

background-color: lightgrey;

d)

text-transform: uppercase;

e)

font-size: 10px;

60.
The <header> tag comes after the <body> tag - true or false?
a)
True
b)
False
61.
The <head> tag comes after the <body> tag - true or false?
a)
True
b)
False
62.
  <link rel = "stylesheet"  href="mystyle.css"> is in the <head> tag - true or false?
a)
True
b)
False
63.
The <nav> tag is in the <head> - true or false ?
a)
False
b)
True
64.
What is missing from this html snippet : <footer>Copyright &copy; Rachael Folds 2017<footer>
a)
</html>
b)
</footer>
c)
</>
65.
What is missing from this CSS snippet : div.container  width: 100%;}
a)
</nav>
b)
{
c)
}
66.

When do you need to use an absolute link?

a)

always

b)

when link to a web page file on the same site

c)

when linking to a web page on an external site

d)

never

67.

In what section of the HTML document does the <style> element located if you are using embedded style?

a)

title

b)

header

c)

nav

d)

head