wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

retake

Total questions: 105

Worksheet time: 58mins

Name
Class
Date
1.

You have a Hypertext Markup Language (HTML) page with an unordered list. You want browsers to render each element side-by-side, use a fixed width, and fit as many elements on each line as possible.

To which value should you set the display Cascading Style Sheet (CSS) property?

a)

inline-block

b)

BLOCK

c)

INLINE

d)

LIST-ITEM

2.

Which class provides a responsive fixed width container?

a)

.container-fixed

b)

.container

c)

.container-fluid

d)

None of above

3.

What will happen when you add a number of columns greater than 12?

a)

it will add up to the existing columns

b)

it will not be displayed properly in Bootstrap

c)

it will wrap up in a new line

d)

Nothing will happen

4.

Contextual color "text-muted" would result to what color of text?

a)

light color

b)

blue

c)

gray

d)

black

5.

How do you change the background color of a button to gold yellow?

a)

.bg-orange

b)

.background-yellow

c)

.btn-warning

d)

.bg-warning

6.

Which of the following codes below is needed to produce the sample screenshot in this question? Tick all that applies.

a)

<div class="d-inline p-2 bg-primary text-white">d-inline</div>

b)

<span class="d-block p-2 bg-primary text-white">d-block</span>

c)

<div class="d-inline p-2 bg-dark text-white">d-inline</div>

d)

<span class="d-block p-2 bg-dark text-white">d-block</span>

7.

Which of the following codes below is needed to produce the sample screenshot in this question? Tick all that applies.

a)

<div class="d-inline p-2 bg-primary text-white">d-inline</div>

b)

<span class="d-block p-2 bg-primary text-white">d-block</span>

c)

<div class="d-inline p-2 bg-dark text-white">d-inline</div>

d)

<span class="d-block p-2 bg-dark text-white">d-block</span>

8.

What is the meaning of this code in Bootstrap 5?

d-none .d-sm-block

a)

Hidden on all

b)

Hidden only on sm

c)

Hidden only on xs

d)

Hidden starting sm

9.

What is the meaning of this code in Bootstrap 5?

.d-sm-none .d-md-block

a)

Hidden on all

b)

Hidden only on sm

c)

Hidden only on xs

d)

Hidden starting sm then onwards

10.

What is the meaning of this code in Bootstrap 5?

.d-xl-none .d-xxl-block

a)

Hidden only on xl

b)

Hidden only on xxl then displays on xl block

c)

Hidden only on xl as well as xxl

d)

hidden starting xl and stops showing after that

11.

What is the meaning of this code in Bootstrap 5?

.d-none .d-xl-block .d-xxl-none

a)

Visible only on xs up to xl

b)

Visible only on xl to xxl

c)

Visible only on xl

d)

visible on all excelpt xl and sm

12.

What is the meaning of this code in Bootstrap 5?

<div class="d-print-none">

a)

its just a print display class

b)

hides on all breakpoints but always shows on print

c)

print only

d)

screen only, hides on print

13.

What is the meaning od pt-4 in the following codes?

<div class="pt-4 bg-warning">I only have a top padding (1.5rem)</div>

a)

padding at the top equal to 4

b)

padding with a value 4

c)

padding for all corners eqal to 4

d)

padding space of 4 outside the container

14.

What is the range of value for padding utility?

a)

0-5

b)

1-5

c)

0-7

d)

1-7

15.

How do you create a horizontal centering in Bootstrap 5?

a)

mx-center

b)

mx-0

c)

mx-auto-center

d)

mx-auto

16.

What Bootstrap class would you use to hide an element on small screens but show it on medium and larger screens?

a)

.d-md-none

b)

.d-none .d-md-block

c)

.d-hidden-md

d)

.hide-sm

17.

Which class would make text color white in Bootstrap?

a)

.text-dark

b)

.text-white

c)

.text-light

d)

.text-primary

18.

What form elements are used in creating this drop-down list?

a)

<select> and <option>

b)

<label> and <input>

c)

<textarea> and <input>

d)

<select> and <input>

19.

What form elements are used in creating this text field?

a)

<select> and <option>

b)

<label> and <input>

c)

<textarea> and <input>

d)

<select> and <input>

20.

What HTML input type is used to create this password field?

a)

<input type="text">

b)

<input type="submit">

c)

<input type="password">

d)

<input type="radio">

21.

What HTML input type is used to create this submit button?

a)

<input type="text">

b)

<input type="submit">

c)

<input type="password">

d)

<input type="radio">

22.

What are some common CSS properties used to style HTML forms?

a)

width, height, text-align, display, float

b)

background-color, text-decoration, outline, overflow, position

c)

border-radius, box-shadow, opacity, visibility, cursor

d)

color, font-size, padding, margin, border, background

23.

What is the purpose of using input types in HTML forms?

a)

To change the font style of the input

b)

To add a background color to the input

c)

To specify the type of data expected from the user

d)

To display a message to the user

24.

What attribute specifies if the submitted result will open in a new browser tab, or in the current window.

a)

name

b)

method

c)

target

d)

action

25.

How can you ensure that a user enters a required field in an HTML form?

a)

Require the user to enter the field in a separate confirmation page

b)

Use the 'mandatory' attribute in the HTML form

c)

Use the 'required' attribute in the HTML form

d)

Add a pop-up warning message for empty fields

26.

To group sections of a form to make it easier to read, use

a)

fieldset

b)

group

c)

groupset

d)

formset

27.

The action attribute of a form

a)

tells how the information should be sent to the server.

b)

tells what web page or script will process the form.

c)

lets the user select from a set of options

d)

is a button command that processes the form

28.

The method attribute of a form

a)

tells which web page or script should process the form

b)

lets a user select from a set of options

c)

tells how the form data should be sent to the server

d)

verifies whether an email address is valid

29.

<th> is used for:

a)

one cell in a row of headers

b)

one data cell

c)

one row of headers

d)

one column of headers

30.

rowspan="2"

a)

one td or th spans 2 columns

b)

all td or th spans 2 columns

c)

one td or th spans 2 rows

d)

one tr spans 2 rows

31.
Which of the following will create a column in an HTML table?
a)
<col>
b)
<td>
c)
<tcol>
d)
<data>
32.

The use of <tr> is to add:

a)

one column on the right

b)

one cell in a table

c)

one row of table

d)

one column of table

33.

This attribute is used to give the file name that should be loaded in the frame

a)

name

b)

border

c)

frame

d)

src

34.

What is the purpose of the <colgroup> element in an HTML table?

a)

A. Defining groups of columns

b)

B. Adding a title or caption to the table

c)

C. Merging cells horizontally or vertically

d)

D. Setting the background color of the table

35.

What is the purpose of the <tbody> element in an HTML table?

a)

A. Defining body cells

b)

B. Displaying tabular data

c)

C. Merging cells horizontally or vertically

d)

D. Adding a title to the table

36.

Which attribute is used to specify the width of the borders around table cells?

a)

D. cellspacing

b)

C. cellpadding

c)

B. width

d)

A. border

37.

True or False?

Border-Collapse Collapses the borders of adjacent cells into a single border instead of separating them.

a)

True

b)

False

38.

What is a rowspan?

a)

An attribute that is used with <th> or <td> element to horizontally span two or more columns.

b)

An open-source and front-end framework that contains HTML and CSS design templates.

c)

An attribute that is used with <th> or <td> element to vertically span two or more rows

d)

This is an element that we used on every website

39.

What is a colspan?

a)

An attribute that is used with <th> or <td> element to horizontally span two or more columns.

b)

An open-source and front-end framework that contains HTML and CSS design templates.

c)

An attribute that is used with <th> or <td> element to vertically span two or more rows

d)

This is an element that we used on every website

40.

What is padding?

a)

An Attribute that identifies the number of table rows a single cell can occupy

b)

A property used to manipulate the amount of space between cell content and the cell's inner border

c)

A property used to manipulate the amount of space between borders of adjacent table cells

d)

A property that determines how far the table or cell will extend horizontally across the page

41.

What is border-spacing?

a)

An Attribute that identifies the number of table rows a single cell can occupy

b)

A property used to manipulate the amount of space between cell content and the cell's inner border

c)

A property used to manipulate the amount of space between borders of adjacent table cells

d)

A property that determines how far the table or cell will extend horizontally across the page

42.

What is a table header?

a)

Creates a table. Contains all other table elements.

b)

Typically designates cells in the top row or left column. By default, text in a header cell will appear bold and centered.

c)

Contains all data for a table row

d)

Designates table cell contents. By default, the data is left-justified.

43.

Which tag declares that the document is a HTML document

a)

<body>

b)

<head>

c)

<title>

d)

<html>

44.

Which tag contains information about your HTML file

a)

<head>

b)

<title>

c)

<p>

d)

<h1>

45.

Which tag creates the most important heading?

a)

<h4>

b)

<h2>

c)

<h1>

d)

<h3>

46.

Which tag is used in ordered lists and unordered lists to define a list item

a)

<b>

b)

<i>

c)

<p>

d)

<li>

47.

This element is used to separate content or define a change in an HTML page

a)

<br>

b)

<hr>

c)

<ol>

d)

<body>

48.

Fill in the blank on the code above.

a)

src

b)

href

c)

hrf

d)

target

49.

What is the purpose of the target attribute in the code above?

a)

It tells the browser to make your screen blank when you click the link.

b)

It tells the browser to open the link in the same tab when you click the link.

c)

It tells the browser to open the link in a new tab when you click the link.

d)

It tells the browser to open the link in a different browser when you click the link.

50.

Mr. Sutton is ranking his favorite nicknames for his dog Pippin. What tags should he use for his list?

a)

ol

b)

ul

c)

a

d)

li

51.

What tag is always included in the code for an ordered or unordered list?

a)

<li>

b)

<ol>

c)

<ul>

d)

<list>

52.

Ordered lists are used...

a)

To display a list of items that need to be in a specific order

b)

To display a list of items that can be in any order

c)

To display descriptions of items in a list

d)

To display a list of randomly generated items

53.

TRUE OR FALSE:

Ordered Lists can only order items by using numbers

a)

True

b)

False

54.

The <img> tag needs the following attribute to display an image...

a)

src="image location"

b)

scr="image location"

c)

loc="image location"

d)

file="image location"

55.

An attribute does which of the following...

a)

Applies changes to everything

b)

Provides different options for each tag

c)

Prevents changes to the site

d)

Gives structure and text

56.

Which of these are used when adding a picture to a webpage?

a)

src

b)

alt

c)

img

d)

pic

e)

file

57.

Which of these tags creates a bulleted list?

a)

<LI>

b)

<OL>

c)

<UL>

d)

<BL>

58.

An unordered list is often called a(n) _______ list.

a)

Numbered

b)

Bulleted

c)

Documented

d)

Sequential

59.

A numbered list is called a(n) ______ list in HTML.

a)

Numbered

b)

Ordered

c)

Sequential

d)

Indexed

60.

Which of these correctly adds a picture to a webpage?

a)

<img src="tree.jpg" alt="Grand Oak" />

b)

<img src="Grand Oak" alt="tree.jpg" />

c)

<img src="tree.jpg" />

d)

<img alt="tree.jpg" />

61.
Why should the alt attribute be used in an HTML image element?
a)
To find an alternative image if the one you want isn't working
b)
To send the user to another webpage where they might find the right image
c)
It is a brief description of an image if for some reason the user cannot see the image
d)
It allows a user to report an image that isn't working on a website
62.

What should I change about this tag to change the image that will appear?


<img src="cat.jpeg" alt="cat jumping"/>

a)

img

b)

src

c)

cat.jpeg

d)

cat jumping

63.

Which of the following BEST explains the difference between a <p> tag and a <br> tag?

a)

The <br> tag produces a blank line, while the <p> tag does not

b)

The <p> tag produces a blank line, while the <br> tag does not

64.
The <strong> tag will ___________ the text.
a)
Capitalize
b)
Bold
c)
Italicize
d)
Underline
65.

A shorthand property used to specify the individual border properties: border-width, border-style and border-color.

a)

border-bottom

b)

border

c)

border-left

d)

border-top

66.

Select the correct code.

a)

h1 {border: 8 px dotted green;}

b)

h1 {border: 8px dotted solid;}

c)

h1 {border: 8px dotted #008080;}

67.

Identify the CSS code use to create this border.

a)

p {border: 5px solid pink;

border-radius:25px; }

b)

p {border: 5px double pink;

border-radius:25px; }

c)

p {border: 5px solid pink; }

d)

p {border: 5px dotted pink;

border-radius:25px; }

68.

Which CSS code create a white and dotted styled border.

a)

h3 {border: 10px white pink;}

b)

h3 {border: 10px dotted gold;}

c)

h3 {border: 10px white dotted;}

d)

h3 {border: 10px dotted white;}

69.

Which is the correct way to code CSS.

a)

p {border-left: 10px dotted orange}

b)

p {border-right: 80px gold red;}

c)

p {border-right: 80px outset solid;}

d)

p {border-right: 80px inset silver;}

70.
Where in the HTML document is the correct location to insert code to link to your external CSS? 
a)
In the <head> section
b)
In the <body> section
c)
At the very end of the document
d)
At the very beginning of the document
71.

Which of the following values does not belong to the overflow property?

a)

visible

b)

hidden

c)

scroll

d)

invisible

72.

The CSS overflow property controls what happens to content that is too big to fit into an area.

a)

True

b)

False

73.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

74.

Which of the following property of a table element specifies whether the browser should control the appearance of the adjacent borders that touch each other or whether each cell should maintain its style?

a)

nth-child

b)

border-spacing

c)

border-collapse

d)

empty-cells

75.

Select the most appropriate CSS declaration to position a <div> element so that other elements that follow after it may occupy space to the left of it.

a)

float: right;

b)

position: left;

c)

float: none;

d)

position: right;

76.

Label the box model diagram below based on their respective number.

a)

margin, padding, border, content

b)

margin, border, padding, content

c)

padding, border, margin, content

d)

padding, margin, border, content

77.

How can one have more control over the background image they have selected for an element?

a)

Use background-repeat

b)

Use image-control

c)

Use the Float Property

d)

Use img src

78.

If you would like to have a block element and restrict everything around it to a gap of 20 pixels. What code snippet should you use to do this?

a)

{margin: 20px;}

b)

{padding: 20px;}

c)

{spacing: 20px;}

d)

{border: 20px;}

79.

How would you style an element so that the next element would appear right next to it not underneath it if both elements widths were collectively smaller than the container element?

a)

display and bottom

b)

display:inline-block;

c)

display:inline

d)

display:left

80.

How do you set a particular style for a link that a user has already been to before arriving at your page?

a)

a:visited

b)

a:hover

c)

a:active

d)

a:link

81.

Which of the following properties controls how to display content that is too large for its container?

a)

overflow

b)

display

c)

float

d)

position

82.

What will be the final color of the <div>?

a)

red

b)

blue

c)

purple because both colors will be combined

d)

uses the default white background color

83.

What CSS code is needed if you ONLY wanted to select a password field?

a)

.password

b)

input#password

c)

input[type="password"]

d)

input.password

84.

You have a Hypertext Markup Language (HTML) page with an unordered list. You want browsers to render each element side-by-side, use a fixed width, and fit as many elements on each line as possible.

To which value should you set the display Cascading Style Sheet (CSS) property?

a)

inline

b)

block

c)

inline-block

d)

list-item

85.

One of your clients has asked for a new form to be added to their HTML5 friendly website. This form accepts several pieces of information including first name, surname and phone number. You want to ensure that the user enters information into each of the fields before the form is submitted. Which attribute should you use?

a)

disabled

b)

readonly

c)

compulsory

d)

required

86.

Consider the following code for a text box in a Web form:
<input type="text" name="UserName"/>
Which modified tag should you use if you want the text box to appear with default text that reads "Enter Name Here"?

a)

<input value="text" name="UserName" placeholder="Enter Name Here"/>

b)

<input type="name" text="Enter Name Here" value="text"/>

c)

<input type="area" value="default" text="UserName"/>

d)

<input type="text" name="UserName" value="Enter Name Here"/>

87.

You are creating a Web form in HTML5 for your site. You want to make sure you code it correctly to process data. You have included the action attribute in the <form> element. What else do you need to include?

a)

The method attribute of the <form> element

b)

The method attribute of the <input> element

c)

The type attribute of the <form> element

d)

The type attribute of the <input> element

88.

In the Web form you are creating, you want a multiple-option select list to appear with five options. Which line of HTML code will help accomplish this?

a)

<input type="multiselect" name="work" default="5"/>

b)

<select name="work" multiple="multiple" size="5">

c)

<input type="select" name="work" multiple="yes" default="5"/>

d)

<select name="work" multiple="multiple" defaultsize="5">

89.

Consider the following example code from a Web form:
How often do you want to be updated about Habitat for Humanity?
<select name="Frequency">
<option> Once a month </option>
<option> Once a quarter </option>
<option> Once a year </option>
<option value="NotAtAll"> Never </option>
</select>
Which Web form field will this code create?

a)

A group of radio buttons

b)

A group of check boxes

c)

A multiple-select drop-down list

d)

A single-select drop-down list

90.

In an HTML form, what is the purpose of the name attribute in an <input> tag?

a)

It labels the form field so the user knows the type of input expected.

b)

It identifies the form input received in a name=value pair by the site's administrator.

c)

It is required for the form to render in all browsers.

d)

It identifies the type of field or button that will appear in the form.

91.

Consider the following example code from a Web form:
What is your favorite hobby?
<select name="Hobby">
<option> Kayaking </option>
<option> Swimming </option>
<option> Fishing </option>
<option value="NoneAbove" > None of the Above </option>
</select>
You have been directed to change this form field so that users can select more than one option from this list. In addition to rewording the page text, which change must you make to the code?

a)

Change the <select name="Hobby"> tag to <select list="Hobby>.

b)

Create a drop-down list, remove all references to the <select> element, then replace <option> with <list>.

c)

Add the multiple="multiple" attribute and value to the <select> element.

d)

Remove the <select> element and replace it with the <list> element.

92.

You are creating form fields on a Web page. Which attribute should you include in the <input> element to specify the type of form fields that will appear in the form?

a)

The type attribute

b)

The name attribute

c)

The value attribute

d)

The placeholder attribute

93.

Where do you put the attribute and value autocomplete="on"  in the HTML forms?

a)

inside the <form> tag

b)

before the body section, include the code inside any element or tag declared in the HTML body

c)

inside any <input> tag

d)

inside the <textarea> only

94.

What CSS code is needed in order to prevent textarea from being resized?

a)

resize:disabled;

b)

resize:off;

c)

resize

d)

resize:none;

95.

The iframe has a border around it by default. However, if you want to modify or remove the iframe borders, the best way to do it is by ______________?

a)

setting the value of the border to none

b)

setting the value of the border to 0

c)

setting the value of the border to off

d)

setting the value of the border to disable

96.

Which of the following statement is NOT true about <colgroup>?

a)

column groups are declared from right to left so that the first group will hold the first column

b)

colgroup must be declared at the beginning of the table

c)

colgroup are used to group columns together if they refer to the same product or same magnitude

d)

colgroup is defined with the help of the span attribute

97.

You need to create an HTML table to display summary information for an online checkout page. This table will display all the products that the visitor has added to their basket, in addition to a total price for all the items.

Which of the following HTML tags is not a valid child item for the table element?

a)

table

b)

tr

c)

td

d)

th

98.

What property is used in CSS to create a "zebra striped tables"?

a)

nth-child

b)

border-collapse

c)

border shorthand property

d)

border-box

99.

Which of the following class applies the hover color to a particular row or cell of a table?

a)

.active

b)

.success

c)

.warning

d)

.danger

100.

Which of the following class will style a table with  a nice alternating stripes?

a)

table-stripes

b)

table-stripe

c)

table-striped

d)

striped-table

101.

What is the meaning of the following Boostrap code?

<table class="table border-warning table-bordered">

a)

table with full border colored yellow

b)

table with a yellow border on the left and right side

c)

table with no borders

d)

table with full border and a background color of yellow

102.

What Boostrap code should be used in order to create a borderless table

a)

table-borderless

b)

table-border-0

c)

table-border{border-0)

d)

border{table:0;}

103.

What contextual class color should be used in a table to give it a cyan background color?

a)

class="table-primary"

b)

class="table-info"

c)

class="table-danger"

d)

class="table-cyan"

104.

What is the meaning of the following Boostrap code?

<h1 class="bg-danger text-white d-none">This is a heading one </h1>

a)

The value of heading one will be displayed in a red text and white background

b)

The value of the heading one will be displayed with a background color of red and a text color of white.

c)

The value of the heading one will NOT be displayed.

d)

The value of the heading one will be displayed with a background color of red and a text color of white and without a padding.

105.

What will happen to a table when you use the class="table-responsive"?

a)

the table will behave normally and no horizontal scrollbar will be displayed

b)

the table will automatically adjust depending on the size of the viewport

c)

the table will be displayed properly with respect to its breakpoint.

d)

the table will behave normally and no vertical scrollbar will be displayed