wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Seconda Prova intercorso tsw

Total questions: 106

Worksheet time: 27hrs 30mins

Name
Class
Date
1.

What are the three types of style sheet

a)

Internal, external, inline

b)

Inline, internal, extreme

c)

Insidious, internal, external

d)

None of the above

2.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

div a{ ... }

b)

div + a{ ... }

c)

div a p{ ... }

d)

div > a{ ...}

e)

none

3.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

.content h1, a{ ... }

b)

#content h1+a{ ... }

c)

#content h1 a{ ...}

d)

#content h1, #content a{ ... }

e)

none

4.

How can you open a link in a new browser window?

a)

<a href="url" new>

b)

<a href="url" target="">

c)

<a href="url" target="_blank">

d)

<a href="url" target="new">

5.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

#content h1{ ...}

b)

.content h1{ ... }

c)

h1#content{ ... }

d)

h1-.content{ ... }

e)

none of the above

6.
a)

li a{ ... }

b)

li, a{ ... }

c)

li. a{ ... }

d)

li-a{ ... }

e)

none

7.

Which selector will change the font of the text?

a)

font-size

b)

text-align

c)

font-family

d)

text-decoration

8.

Which css property you will use if you want to add some margin between a DIV's border and its inner text ?

a)

spacing

b)

margin

c)

padding

d)

inner-margin

9.

Which CSS code is incorrect?

a)

a {color: blue;}

b)

p {font-size: 10px;}

c)

body {background-color="red";}

d)

img {width: 100%;}

10.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

@all{ ... }

b)

*{ ... }

c)

HTML{ ... }

d)

#{ ...}

e)

none

11.

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

12.

If we want define style for an unique element, then which css selector will we use ?

a)

id

b)

element

c)

class

d)

child

13.

How do I remove the underline from a link using CSS?

a)

a {underline: none;}

b)

link {underline: none;}

c)

a {text-decoration: none;}

d)

a {style: none;}

14.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

15.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

16.

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

a)

#

b)

()

c)

.

d)

class

17.

How will you make all paragraph elements 'RED' in color ?

a)

.p.all {color: red;}

b)

.* {color: #990000;}

c)

all.p {color: #998877;}

d)

p {color: red;}

18.

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

a)

.

b)

+

c)

id

d)

#

19.

What unit of measurement does CSS use for size?

a)

px

b)

em

c)

%

d)

all work

20.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

.menu#ul a{ ... }

b)

ul.menu li a{ ... }

c)

#header .a{ ... }

d)

div a{ ...}

e)

none of the above

21.

The elements <DIV> and <SPAN> have the following characteristics

a)

Element <DIV> inherits properties defined for <SPAN> in a stylesheet

b)

Elements <SPAN> and <DIV> define content to be inline or block-level

c)

<DIV> and <SPAN> are used as alternatives for the element <P>

d)

<DIV> is used inside element <P>.

22.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

a.active{ ... }

b)

#content .a{ ... }

c)

p a#active{ ... }

d)

div p a{ ...}

e)

none of the above

23.

If you want to have more than one property for a CSS selector, what character separates them?

a)

,

b)

-

c)

:

d)

;

24.

The default value of "position" attribute is _________.

a)

relative

b)

sticky

c)

absolute

d)

fixed

e)

static

25.

Which attribute can be added to many HTML elements to identify them as a member of a specific group ?

a)

id

b)

div

c)

class

d)

span

26.

If "padding: 10px 5px 20px 0px" is given. What does this represent

a)

left:10px , top:5px , right:20px , bottom:0px

b)

top:10px , right:5px , bottom:20px , left:0px

c)

right:10px , bottom:5px , left:20px , top:0px

d)

bottom:10px , left:5px , top:20px , right:0px

27.

Which is the correct CSS syntax?

a)

body {color: yellow;}

b)

body:color=yellow;

c)

{body:color= yellow;}

d)

{body;color: yellow;}

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.

If we want to wrap a block of text around an image, which css property will we use ?

a)

wrap

b)

push

c)

float

d)

align

30.

To create a dotted border around the page

a)

border-style

b)

border-width

c)

border-color

d)

style

31.

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

32.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

p.a{ ... }

b)

a {...}

c)

a, ul{ ... }

d)

#a { ...}

e)

none

33.

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

a)

external

b)

internal

c)

inline

d)

none

34.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

#world{ ... }

b)

world{ ... }

c)

.world{ ... }

d)

@world{ ... }

e)

none

35.

What symbols go around the properties for each CSS selector?

a)

<>

b)

{}

c)

[]

d)

()

36.

Which is the selector for a link?

a)

a{}

b)

link{}

c)

li{}

d)

a href{}

e)

href{}

37.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

input@submit{ ... }

b)

input.submit{ ... }

c)

input.type=submit{ ... }

d)

input[type=submit]{ ...}

e)

none

38.

sets the element to one side of the page

a)

margin

b)

float

c)

width

d)

height

39.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

40.

Which is the selector in this CSS?p {color: red;}

a)

p

b)

color

c)

red

41.

Quale è la sintassi corretta in JavaScript per modificare il contenuto dell'elemento HTML di seguito?

<p id="demo">This is a demonstration.</p>

a)

document.getElementsByTagName("p")[0].innerHTML = "Hello World!";

b)

document.getElementByName("p").innerHTML = "Hello World!";

c)

#demo.innerHTML = "Hello World!";

d)

document.getElement("p").innerHTML = "Hello World!";

42.

Quale è il ruolo della funzione di callback in AJAX

a)

Viene invocata ad ogni variazione di readyState

b)

Usa readyState per leggere lo stato di avanzamento della richiesta

c)

Usa status per verificare l’esito della richiesta

d)

Tutte le opzioni

43.

When would you use the const declaration in JavaScript? Choose all that apply.

a)

When you're creating a variable.

b)

When a variable has a constant value that won't change.

c)

When creating a temporary variable

d)

none

44.

What is the value of:

”31” - 1

a)

“30”

b)

30

c)

“311”

d)

NaN

45.

Cosa visualizza il comando alert nel seguente codice JavaScript?

a)

0

b)

4

c)

5

d)

undefined

46.

JavaScript is a simpler form of Java.

a)

VERO

b)

FALSO

c)

DIPENDE DAI PUNTI DI VISTA

d)

LIGHT WEIGHT BABYYY!

47.

What type of variable is:

var numApples = 2;

a)

int

b)

float

c)

boolean

d)

string

48.

Quale è lo statement corretto per implementare un FOR in JavaScript?

a)

for (var i = 5..10) { … }

b)

for (var i in 5..10) { … }

c)

for (var i = 5; i <= 10; i++) { … }

d)

for (5 < i < 10; i++) { … }

49.

In JavaScript strings must be defined using only double quotes (“).

a)

VERO

b)

FALSO

c)
50.

JavaScript can be written -

a)

directly into JS file and included into HTML

b)

directly into HTML pages

c)

directly on the Server Script

d)

none

51.

What would alert(6 + '2') show?

a)

8

b)

62

c)

6+'2'

d)

6'2'

52.

Which of these is proper a JSON array?

a)

{ “letters” : [ “a”, “b”, “c”; ] }

b)

{ “letters” : [ “a”, “b”, “c”; ] }

c)

{ “letters” : [ a, b, c ] }

d)

{ “letters” : [ “a”, “b”, “c” ] }

53.

How do you create a function in JavaScript?

a)

function myFunction()

b)

function: myFunction()

c)

function=myFunction()

54.

What is the name of the JavaScript standard?

a)

JavaScript

b)

ECMA Script

c)

JS

d)

PEP

55.

Is JavaScript case sensitive language?

a)

SI

b)

NO

c)

Depends on the browser

d)

Depends on the platform

56.

JSON strings have to be in

a)

single quote

b)

double quote

c)

triple quote

d)

ACE quote

57.

What is the value of:

”41” + 1

a)

42

b)

"42"

c)

411

d)

"411"

58.

JavaScript Code is written inside file having extension __________.

a)

.jsc

b)

.jvs

c)

.js

d)

.javascript

59.

Which of the following is **false** about AJAX ?

a)

AJAX is a new language based on javascript

b)

Update a web page without reloading the page

c)

equest and Receive data from a server - after the page has loaded

d)

Send data to a server - in the background

60.

JavaScript is designed for following purpose -

a)

To Style HTML Pages

b)

To Perform Server Side Scripting Opertion

c)

To add interactivity to HTML Pages.

d)

To Execute Query Related to DB on Server

61.

What is the value of “a” in the following statement?

var a;

a)

undefined

b)

null

c)

0

d)

NaN

62.

Which of the following is not a feature of javascript?

a)

Lightweight

b)

Good for the applications which are network-centric

c)

Object oriented (BankAccount)

d)

Open source

e)

Complementary to HTML

63.

Come considerare il seguente documento XML?

a)

È “well formed”

b)

Non è “well formed”

c)

E' un documento HTML

d)

È un documento DTD

64.

Which keyword do we need to define a function?

a)

function

b)

method

c)

onclick

d)

functionName()

65.

How can a developer show a pop-up message to the user?

a)

alert

b)

<a>

c)

prompt

d)

console.log

66.

A website gets data from a server without reloading the whole webpage. This is associated to:

a)

JavaScript

b)

Code

c)

AJAX

d)

API

67.

Which of the following platform(s) can be used to run Javascript Code

a)

Google Chrome

b)

Firefox

c)

Microsoft Edge

d)

Safari

68.

Which of the following formatting tags are HTML and DO NOT need to be inside of the <script> </script> tags?

a)

<div>

b)

<span>

c)

<h1>

d)

all

69.

What is the difference between var and let in JavaScript?

a)

There are no differences, they are both the same.

b)

let is visible through blocks and accessed globally, var isn't.

c)

var is visible through blocks and accessed globally, let isn't.

d)

let is used more frequently, var isn't.

70.

How would you declare a variable in JavaScript?

a)

var myName = "Sally"

b)

my Name = "Sally"

c)

myName var = "Sally"

d)

var myName = Sa ly

71.

JavaScript is ______ Side Scripting Language.

a)

JSP

b)

Servlet

c)

Server

d)

Browser

72.

How do we generate a random number?

a)

Math.random()

b)

random.number()

c)

number.random()

d)

Random.math()

73.

What other languages are typically used with JavaScript?

a)

Python

b)

Ruby

c)

HTML & CSS

d)

SQL

74.

Which of the following is not an application of javascript

a)

Client-side validation

b)

Dynamic drop-down menus

c)

Transport data in a network

d)

Displaying clocks

75.

We cannot Place JS Code in the body tag . Say true/false

a)

VERO

b)

FALSE

76.

Qual è il modo corretto di scrivere un array in javascript?

a)

var colors = ["red", "green", "blue"]

b)

var colors = (1:"red", 2:"green", 3:"blue")

c)

var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")

d)

var colors = "red", "green", "blue"

77.

Data la seguente definizione di un oggetto JSON, con quale delle seguenti opzioni si ottiene il testo "Mustang"?

a)

myObj.cars[0].models[2]

b)

myObj.cars[1].models[0]

c)

myObj[0][1]

78.

What type of variable is

var age = "5"

a)

String

b)

int

c)

float

d)

boolean

79.

JavaScript Code can be called by using _________.

a)

RMI

b)

Function / Method

c)

Triggering event

d)

Preprocessor

80.

Javascript is _________ language.

a)

Programming

b)

Scripting

c)

Application

d)

applet

81.

Variables defined inside of functions are accessible outside of the function?

a)

vero

b)

false

82.

JavaScript is an ________ language.

a)

compiled

b)

interpreted

83.

Is this correct syntax to include JS Code inside HTML Page ?

<script type="text/javascript">

...

</script>

a)

si

b)

no

84.

Which of the following technology is **not** used by Ajax?

a)

JavaScript

b)

Document Object Model

c)

XMLHttpRequest

d)

JSP

85.

What is the full form of AJAX ?

a)

Asynchronous Javascript and XML

b)

Another Java and XML Library

c)

Abstract JSON and XML

d)

none

86.

What are the different ways to include JavaScript in your application? Choose all that apply.

a)

<script> alert('Hello'); </script>

b)

<link src='myjavascript.js'></link>

c)

<link href="myjavascript.js></link>

d)

<script src="myjavascript.js"></script>

87.

what are pop-up boxes types available on JS?

a)

alert

redirect

prompt

b)

alert

confirm

prompt

c)

nice try, a pop-up can be done only using JQuery or similar library

d)

alert

confirm

prompt

prompt

88.

Which sign does JQuery use as a shortcut?

a)

$

b)

&

c)

¬

d)

#

89.

What is a DOM?

a)

The Document Object Model is a cross-platform and language-indipendent interface that treats an XML or HTML document as a tree structure where in each node is an object representing a part of a document

b)

Is a markup language that defines a set of rules for encoding documents in a format human-readable and machine-readable

c)

Is the standard markup language for document designed to be displayed in a web browser. It can be assisted by JS and CSS

d)

Is an open standard file format and data interchange format that uses to store and trasmit data objetcs

90.

How to add an element at the end of the array

a)

array.push(...)

b)
c)

array.shift(...)

d)

array.unshift(...)

91.

Which JQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?

a)

switch()

b)

toggleClass()

c)

swicthClass()

d)

exchangeClass()

92.

What does mean this selector $("div p")?

a)

The first p element in a div element

b)

All p elements in a div element

c)

All div element in a p element

d)

none

93.

How to set background color of all p elements with JQuery?

a)

$("p").manipulate("background-color", red");

b)

$("p").style("background-color", "red");

c)

$("p").style("background-color: red");

d)

$("p").css("background-color", "red");

94.

<button (a)   = "alert("Hello")">Click me</button>

95.

Output of this code is:

<p id = "demo"></p>

<script>

var text = "";

var i;

for(i = 0; i < 5; i++)

text+="The number is " + i + "<br>";

document.getElementByID("demo").innerHTML = text;

</script>

a)

The number is 0

The number is 1

The number is 2

The number is 3

The number is 4

b)

The number is 4

The number is 3

The number is 2

The number is 1

The number is 0

c)

none

96.

Which of the following is correct?

a)

JQuery is a JSON library

b)

JQuery is a JavaScript library

c)

JQuery use Java

d)

none

97.

JQuery method to perform an asyncronous HTTP request?

a)

JQuery.ajax()

b)

JQuery.ajaxRequest()

c)

JQuery.ajaxAsync()

d)

JQuery.AJAX()

98.

Which JQuery function is used to prevent code from running, before the document is finished loading?

a)

$(document).onload()

b)

$(document).ready()

c)

$(document).load()

d)

$(document).onstart()

99.

JQuery is

a)

Client Scripting Library

b)

Server Scripting Library

100.

JQuery method is used to set one or more style propereties?

a)

css()

b)

style()

c)

html()

d)

both style() and css()

101.

Which element select:

$('#bar') ?

a)

<p class="bar"></p>

b)

<p id="bar"></p>

c)

<p class="bar">bar</p>

d)

all

102.

What is the output of 10+20+"30"

a)

60

b)

102030

c)

throw an exception

d)

3030

103.

How to add a class in JQuery?

a)

addClass()

b)

addClasses()

c)

add()

d)

getMiciur()

104.

Quali delle seguenti tecnologie consente di ottenere i dati da un server senza ricaricare l'intera pagina?

a)

JavaScript

b)

jQuery

c)

AJAX

d)

MVC

105.

You should define a backup font-family in css

a)

VERO

b)

FALSO

c)

che m n fott a me

106.

Dove possiamo aggiungere i nostri file JS

a)

nel <head>

b)

nel <body>

c)

entrambe