wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz-4 Sec-B 28-9-2022

Total questions: 80

Worksheet time: 40mins

Name
Class
Date
1.

Assume you have two files for your website, and these files exist in the same folder:

about.html

style.css

Which of the following is the proper way to apply the CSS code inside style.css to the about.html file?

a)

Inside style.css:

applyTo { href: about.html; }

b)

Inside about.html:

<head>

<style href="style.css"></style>

</head>

c)

Inside style.css:

<html href="about.html">

d)

Inside about.html:

<head>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

2.

Which of the following would you use an IFrame for?

a)

Embedding a map from Google Maps in your website

b)

Adding an image to your website

c)

Changing an image’s opacity when the user hovers over the image

d)

Adding a filter to an image on your website

3.

You are trying to apply the same style to several different elements in a block, with line breaks before and after. Which tag should you use?

a)

<span>

b)

<div>

c)

<style>

d)

<src>

4.

Which of the following selects all elements with the class footer that are inside of divs?

a)

div { .footer { ... } }

b)

.footer div { ... }

c)

div > .footer { ... }

d)

div .footer { ... }

5.

Which of the following selects all a tags that are immediate children of div tags?

a)

div > a { ... }

b)

div a { ... }

c)

div < a { ... }

d)

div + a { ... }

6.

Why is it important to avoid repetitive code while creating a website?

a)

Excessive code is harder to read and understand

b)

It is easier to make edits to websites when CSS rules are strategically grouped and organized

c)

It demonstrates good coding style

d)

All of the above

7.

Which of the following will turn the first letter of all p elements blue?

a)

p::first-letter {

color=blue;

}

b)

p:first-letter {

color=blue;

}

c)

p::first-letter {

color: blue;

}

d)

p:first-letter {

color: blue;

}

8.

Which of the following selects images as the mouse hovers over them and sets their size to 350px by 350px?

a)

img:hover { width: 350px; height: 350px; }

b)

img :hover { width: 350px; height: 350px; }

c)

img::hover { width: 350px; height: 350px; }

d)

img > hover { width: 350px; height: 350px; }

9.

Which of the following settings will not make an element invisible?

a)

visibility: hidden

b)

appearance: off

c)

opacity: 0

d)

display: none

10.

True or False: Only CSS has online documentation because it is a more complex language than HTML.

a)

True

b)

False

11.

True or False: None of the changes you make in the Inspector will be saved.

a)

True

b)

False

12.

Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?

a)

border: 5px 10px 5px 10px;

b)

border: 5px 5px 10px 10px;

c)

border: 10px 10px 5px 5px;

d)

border: 10px 5px 10px 5px;

13.

Which of the following applies the invert filter to all images with the class “inverted”?

a)

img.inverted {

filter: invert(0);

}

b)

img.inverted {

filter: invert;

}

c)

img inverted {

filter: invert(100%);

}

d)

img.inverted {

filter: invert(100%);

}

14.

Which of the following defines an animation change-color that changes the font color from green to red?

a)

@keyframes change-color {

from {color: green;}

to {color: red;}

}

b)

@animation change-color {

from {color: green;}

to {color: red;}

}

c)

@keyframes change-color {

color: {color: green, red;}

}

d)

@animation change-color {

color: {color: green, red;}

}

15.

Which of the following will result in a smooth transition from green to red as the mouse clicks on h1 tags?

a)

h1 {

color: green;

transition: color 2s;

}

h1:active {

color: red;

}

b)

h1 {

color: green;

transition: color 2s;

}

h1:hover {

color: red;

}

c)

h1 {

color: green;

}

h1:active {

color: red;

}

d)

h1 {

color: green;

}

h1:hover {

color: red;

}

16.

In this code, what is the term for the h1?

h1 {

color: red;

  font-size: 5em;

}

a)

selector

 

b)

combinator

c)

 declarator

d)

 markup

17.

What will this loop print?

let max = 3;

for (i = 0; i > max; i++) {

    document.write("skrt ");

}

a)

skrt skrt skrt

b)

 skrt skrt

c)

 skrt skrt skrt skrt

d)

None of the above

18.

Which choice is a correct use of the parseInt() function in Javascript that parses a string and return an integer?

a)

parseInt("six");

b)

 parse_int('6');

c)

 parseInt("6");

d)

 parseint("6");

19.

In the context of this code, how would you describe user?

const user = {

    given_name: "Joe",

    family_name: "Bloggs",

    age: 40,

};

a)

function

b)

 array

c)

 variable

d)

 object

20.

Which array method should you apply to run a function for every item within an array, returning an array of all items for which the function is true?

a)

every()

b)

map()

c)

 forEach()

d)

 filter()

21.

What are the best examples of void elements?

a)

<link><meta><title>

b)

<br><base><source>

c)

<area><embed><strong>

22.

What is the best way to apply bold styling to text?

a)

<strong>

b)

 Using CSS

c)

<bold>

d)

<b>

23.

What is the default method for form submission?

a)

  GET

b)

 POST

c)

PUT

d)

SUBMIT

24.

_________ keyword is used to declare variables in javascript.

a)

Dim

b)

String

c)

var

d)

None of the above

25.

What is DOM in HTML?

a)

Language dependent application programming

b)

Hierarchy of objects in ASP.NET

c)

Application programming interface

d)

Convention for representing and interacting with objects in html documents

26.

What does MIME stand for?

a)

Multipurpose Internet Mail Extra

b)

Multi Internet Mail End

c)

Multipurpose Internet Mail Email

d)

Multipurpose Internet Mail Extensions

27.

Which attribute is not essential under <iframe>?

a)

frameborder

b)

width

c)

height

d)

src

28.

How many glyphs does bootstrap include?

a)

369

b)

360

c)

260

d)

100

29.

Which of the following makes the button appear pressed?

a)

.btn-link

b)

.disabled

c)

.active

d)

.btn-block

30.

Which of the following specifies header text of popover?

a)

selector

b)

title

c)

placement

d)

trigger

31.

Some characters are reserved in HTML.

a)

True

b)

False

32.

If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.

a)

True

b)

False

33.

Character entities are used to display reserved characters in HTML.

To display a less than sign (<) we must write: &lt; or &#60;

a)

True

b)

False

34.

A very uncommon entity in HTML is the non-breaking space: &nbsp;

a)

True

b)

False

35.

A diacritical mark is something other than a "glyph" added to a letter.

a)

True

b)

False

36.

Some diacritical marks, like grave (  ̀) and acute (  ́) are called accents.

a)

True

b)

False

37.

Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.

Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encoding) used in the page.

a)

True

b)

False

38.

Reserved characters in HTML don't have to be replaced with character entities.

a)

True

b)

False

39.

How will this line of code display?

<p>A</p><p>B</p><p>C</p>

a)

A

B

C

b)

A B C

c)

ABC

d)

A</p><p>B</p><p>C

40.

Which statement is true about this line of code?

<p>Hello, <em>World!</em></p>

a)

<em> is the closing tag

b)

The code will not work since the sentence ends with !

c)

</p> is the closing tag

d)

The sentence will display as:

Hello,

World!

41.

How will this line of code display?

<em>A</em><em>B</em><em>C</em>

a)

A</em><em>B</em><em>C

b)

A

B

C

c)

A B C

d)

ABC

42.

What is class="class1" in this line of code?

<p class="class1">Hello World.</p>

a)

ID

b)

Embedded style

c)

Attribute

d)

Inline style

43.

In this line of code, "Hello, World.", is the ___ of the ___.

<p>Hello, World.</p>

a)

content, element

b)

attribute, element

c)

value, style

d)

content, attribute

44.

In this line of code, href tells the browser

<link ... href="styles/styles.css>

a)

where to find the style sheet named styles.css.

b)

that the styles.css file is in the same folder as the HTML page.

c)

how many style sheets there are.

d)

to ignore all other CSS style rules.

45.

An absolute path to a file or website looks like:

a)

<a href="www.example.com">

b)

<a href="../example.com">

c)

<a href="http://www.example.com">

d)

<a href="http//:www.example.com">

46.

<a href="/fruit/apples/fuji">

a)

The href path is relative

b)

The href path is absolute

c)

The href path is fixed

d)

The href path is above the current root folder.

47.

The character entity code for the copyright symbol.

a)

#@copy/

b)

&copy;

c)

@copy;

d)

&#copy;

48.

&lt; is the character entity for

a)

<

b)

>

c)

/

d)

@

49.

&gt; is the character entity for

a)

>

b)

<

c)

/

d)

"

50.

&quot;

a)

<

b)

*

c)

#

d)

"

51.

&amp;

a)

&

b)

*

c)

"

d)

#

52.

&apos;

a)

"

b)

'

c)

#

d)

/

53.

The code for making a comment in HTML

a)

<!-- comment -->

b)

/* comment */

c)

<-- comment --/>

d)

/ comment

54.

To groups the footer content in a table, we will use ...............

a)

<tfooter>

b)

<tbody>

c)

<thead>

d)

<table>

55.

Semantic elements = elements with a meaning

a)

True

b)

False

56.

<div> is semantic element

a)

True

b)

False

57.

To group related data in the form, we will use

a)

<fieldset>

b)

<form>

c)

<picture>

d)

<style>

58.

.................. element defines a drop-down list

a)

<select>

b)

<datalist>

c)

<list>

d)

<ol>

59.

to add values in the drop down list, we will use .................

a)

<option>

b)

<li>

c)

<caption>

d)

<input>

60.

................... attribute specifies that an input field is read-only.

a)

readonly

b)

required

c)

placeholder

d)

value

61.

To add favicon in your page, we will use .........

a)

<link>

b)

<meta>

c)

<style>

d)

<script>

62.

Most mathematical, technical, and currency symbols, are present on a normal keyboard.

a)

True

b)

False

63.

Emojis look like images, or icons, but they are not.

They are letters (characters) from the UTF-8 (Unicode) character set.

a)

True

b)

False

64.

UTF-8 covers almost all of the characters and symbols in the world, about 10,000.

a)

True

b)

False

65.

Symbols that are not present on your keyboard can also be added by using entities.

a)

True

b)

False

66.

ASCII was the first character encoding standard.

a)

True

b)

False

67.

ASCII defines 128 different characters that could be used on the internet

a)

True

b)

False

68.

ISO-8859-1 was the default character set for HTML 4. This character set supported 256 different character codes.

a)

True

b)

False

69.

ANSI (Windows-1252) was the original Apple character set. ANSI is identical to ISO-8859-1, except that ANSI has 32 extra characters.

a)

True

b)

False

70.

The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!

a)

True

b)

False

71.

Which is the correct default character set meta tag for HTML 5?

a)

<meta char="ISO-8859-1">

b)

<charset="UTF-8">

c)

<meta charset="UTF-8">

d)

<meta charset="WTH-5">

72.

A URL can be composed of words (e.g. google.com), or an Internet Protocol (IP) address (e.g. 192.68.20.50).

a)

True

b)

False

73.

Most people enter the name when surfing, because names are more acurate than numbers.

a)

True

b)

False

74.

http - HyperText Transfer Protocol - Common web pages. Not encrypted

a)

True

b)

False

75.

ftp - Formula Transfer Protocol - Downloading or uploading files.

a)

True

b)

False

76.

URL encoding converts non-ASCII characters into a format that can be transmitted over the Internet.

a)

True

b)

False

77.

Your browser will encode input, according to the character-set used in your page.

a)

True

b)

False

78.

The default character-set in HTML5 is UTF-8.

a)

True

b)

False

79.

URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.

a)

True

b)

False

80.

To display an HTML page correctly, a web browser doesn't need to know which character set to use.

a)

True

b)

False