Font size
WorksheetsSeconda Prova intercorso tsw
Total questions: 106
Worksheet time: 27hrs 30mins
What are the three types of style sheet
Internal, external, inline
Inline, internal, extreme
Insidious, internal, external
None of the above
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
div a{ ... }
div + a{ ... }
div a p{ ... }
div > a{ ...}
none
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
.content h1, a{ ... }
#content h1+a{ ... }
#content h1 a{ ...}
#content h1, #content a{ ... }
none
How can you open a link in a new browser window?
<a href="url" new>
<a href="url" target="">
<a href="url" target="_blank">
<a href="url" target="new">
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
#content h1{ ...}
.content h1{ ... }
h1#content{ ... }
h1-.content{ ... }
none of the above
li a{ ... }
li, a{ ... }
li. a{ ... }
li-a{ ... }
none
Which selector will change the font of the text?
font-size
text-align
font-family
text-decoration
Which css property you will use if you want to add some margin between a DIV's border and its inner text ?
spacing
margin
padding
inner-margin
Which CSS code is incorrect?
a {color: blue;}
p {font-size: 10px;}
body {background-color="red";}
img {width: 100%;}
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
@all{ ... }
*{ ... }
HTML{ ... }
#{ ...}
none
Where in the HTML document is the correct location to insert code to link to your external CSS?
In the <head> section
In the <body> section
At the very end of the document
At the very beginning of the document
If we want define style for an unique element, then which css selector will we use ?
id
element
class
child
How do I remove the underline from a link using CSS?
a {underline: none;}
link {underline: none;}
a {text-decoration: none;}
a {style: none;}
Which rule set would change the font size to 24?
font-size: 24
size: 24;
font-size: 24;
font size: 24;
Change the border size of the body or image
border-style
border-width
border-color
width
What symbol should you use to target a class name in css?
#
()
.
class
How will you make all paragraph elements 'RED' in color ?
.p.all {color: red;}
.* {color: #990000;}
all.p {color: #998877;}
p {color: red;}
What symbol should you use to target an id in css?
.
+
id
#
What unit of measurement does CSS use for size?
px
em
%
all work
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
The elements <DIV> and <SPAN> have the following characteristics
Element <DIV> inherits properties defined for <SPAN> in a stylesheet
Elements <SPAN> and <DIV> define content to be inline or block-level
<DIV> and <SPAN> are used as alternatives for the element <P>
<DIV> is used inside element <P>.
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
a.active{ ... }
#content .a{ ... }
p a#active{ ... }
div p a{ ...}
none of the above
If you want to have more than one property for a CSS selector, what character separates them?
,
-
:
;
The default value of "position" attribute is _________.
relative
sticky
absolute
fixed
static
Which attribute can be added to many HTML elements to identify them as a member of a specific group ?
id
div
class
span
If "padding: 10px 5px 20px 0px" is given. What does this represent
left:10px , top:5px , right:20px , bottom:0px
top:10px , right:5px , bottom:20px , left:0px
right:10px , bottom:5px , left:20px , top:0px
bottom:10px , left:5px , top:20px , right:0px
Which is the correct CSS syntax?
body {color: yellow;}
body:color=yellow;
{body:color= yellow;}
{body;color: yellow;}
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;
}
If we want to wrap a block of text around an image, which css property will we use ?
wrap
push
float
align
To create a dotted border around the page
border-style
border-width
border-color
style
What is the correct syntax to change the background color with css?
background-color: purple;
background-color = "purple";
backgroundcolor=orange
change-background-color: purple
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
p.a{ ... }
a {...}
a, ul{ ... }
#a { ...}
none
<link type="stylsheet" href="exx.css"> belongs to
external
internal
inline
none
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
#world{ ... }
world{ ... }
.world{ ... }
@world{ ... }
none
What symbols go around the properties for each CSS selector?
<>
{}
[]
()
Which is the selector for a link?
a{}
link{}
li{}
a href{}
href{}
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
input@submit{ ... }
input.submit{ ... }
input.type=submit{ ... }
input[type=submit]{ ...}
none
sets the element to one side of the page
margin
float
width
height
sets the color of words in a paragraph
h1 {
color: pink;
}
img {
color: pink;
}
body {
color: pink;
}
p {
color: pink;
}
Which is the selector in this CSS?p {color: red;}
p
color
red
Quale è la sintassi corretta in JavaScript per modificare il contenuto dell'elemento HTML di seguito?
<p id="demo">This is a demonstration.</p>
document.getElementsByTagName("p")[0].innerHTML = "Hello World!";
document.getElementByName("p").innerHTML = "Hello World!";
#demo.innerHTML = "Hello World!";
document.getElement("p").innerHTML = "Hello World!";
Quale è il ruolo della funzione di callback in AJAX
Viene invocata ad ogni variazione di readyState
Usa readyState per leggere lo stato di avanzamento della richiesta
Usa status per verificare l’esito della richiesta
Tutte le opzioni
When would you use the const declaration in JavaScript? Choose all that apply.
When you're creating a variable.
When a variable has a constant value that won't change.
When creating a temporary variable
none
What is the value of:
”31” - 1
“30”
30
“311”
NaN
Cosa visualizza il comando alert nel seguente codice JavaScript?
0
4
5
undefined
JavaScript is a simpler form of Java.
VERO
FALSO
DIPENDE DAI PUNTI DI VISTA
LIGHT WEIGHT BABYYY!
What type of variable is:
var numApples = 2;
int
float
boolean
string
Quale è lo statement corretto per implementare un FOR in JavaScript?
for (var i = 5..10) { … }
for (var i in 5..10) { … }
for (var i = 5; i <= 10; i++) { … }
for (5 < i < 10; i++) { … }
In JavaScript strings must be defined using only double quotes (“).
VERO
FALSO
JavaScript can be written -
directly into JS file and included into HTML
directly into HTML pages
directly on the Server Script
none
What would alert(6 + '2') show?
8
62
6+'2'
6'2'
Which of these is proper a JSON array?
{ “letters” : [ “a”, “b”, “c”; ] }
{ “letters” : [ “a”, “b”, “c”; ] }
{ “letters” : [ a, b, c ] }
{ “letters” : [ “a”, “b”, “c” ] }
How do you create a function in JavaScript?
function myFunction()
function: myFunction()
function=myFunction()
What is the name of the JavaScript standard?
JavaScript
ECMA Script
JS
PEP
Is JavaScript case sensitive language?
SI
NO
Depends on the browser
Depends on the platform
JSON strings have to be in
single quote
double quote
triple quote
ACE quote
What is the value of:
”41” + 1
42
"42"
411
"411"
JavaScript Code is written inside file having extension __________.
.jsc
.jvs
.js
.javascript
Which of the following is **false** about AJAX ?
AJAX is a new language based on javascript
Update a web page without reloading the page
equest and Receive data from a server - after the page has loaded
Send data to a server - in the background
JavaScript is designed for following purpose -
To Style HTML Pages
To Perform Server Side Scripting Opertion
To add interactivity to HTML Pages.
To Execute Query Related to DB on Server
What is the value of “a” in the following statement?
var a;
undefined
null
0
NaN
Which of the following is not a feature of javascript?
Lightweight
Good for the applications which are network-centric
Object oriented (BankAccount)
Open source
Complementary to HTML
Come considerare il seguente documento XML?
È “well formed”
Non è “well formed”
E' un documento HTML
È un documento DTD
Which keyword do we need to define a function?
function
method
onclick
functionName()
How can a developer show a pop-up message to the user?
alert
<a>
prompt
console.log
A website gets data from a server without reloading the whole webpage. This is associated to:
JavaScript
Code
AJAX
API
Which of the following platform(s) can be used to run Javascript Code
Google Chrome
Firefox
Microsoft Edge
Safari
Which of the following formatting tags are HTML and DO NOT need to be inside of the <script> </script> tags?
<div>
<span>
<h1>
all
What is the difference between var and let in JavaScript?
There are no differences, they are both the same.
let is visible through blocks and accessed globally, var isn't.
var is visible through blocks and accessed globally, let isn't.
let is used more frequently, var isn't.
How would you declare a variable in JavaScript?
var myName = "Sally"
my Name = "Sally"
myName var = "Sally"
var myName = Sa ly
JavaScript is ______ Side Scripting Language.
JSP
Servlet
Server
Browser
How do we generate a random number?
Math.random()
random.number()
number.random()
Random.math()
What other languages are typically used with JavaScript?
Python
Ruby
HTML & CSS
SQL
Which of the following is not an application of javascript
Client-side validation
Dynamic drop-down menus
Transport data in a network
Displaying clocks
We cannot Place JS Code in the body tag . Say true/false
VERO
FALSE
Qual è il modo corretto di scrivere un array in javascript?
var colors = ["red", "green", "blue"]
var colors = (1:"red", 2:"green", 3:"blue")
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
var colors = "red", "green", "blue"
Data la seguente definizione di un oggetto JSON, con quale delle seguenti opzioni si ottiene il testo "Mustang"?
What type of variable is
var age = "5"
String
int
float
boolean
JavaScript Code can be called by using _________.
RMI
Function / Method
Triggering event
Preprocessor
Javascript is _________ language.
Programming
Scripting
Application
applet
Variables defined inside of functions are accessible outside of the function?
vero
false
JavaScript is an ________ language.
compiled
interpreted
Is this correct syntax to include JS Code inside HTML Page ?
<script type="text/javascript">
...
</script>
si
no
Which of the following technology is **not** used by Ajax?
JavaScript
Document Object Model
XMLHttpRequest
JSP
What is the full form of AJAX ?
Asynchronous Javascript and XML
Another Java and XML Library
Abstract JSON and XML
none
What are the different ways to include JavaScript in your application? Choose all that apply.
<script> alert('Hello'); </script>
<link src='myjavascript.js'></link>
<link href="myjavascript.js></link>
<script src="myjavascript.js"></script>
what are pop-up boxes types available on JS?
alert
redirect
prompt
alert
confirm
prompt
nice try, a pop-up can be done only using JQuery or similar library
alert
confirm
prompt
prompt
Which sign does JQuery use as a shortcut?
$
&
¬
#
What is a DOM?
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
Is a markup language that defines a set of rules for encoding documents in a format human-readable and machine-readable
Is the standard markup language for document designed to be displayed in a web browser. It can be assisted by JS and CSS
Is an open standard file format and data interchange format that uses to store and trasmit data objetcs
How to add an element at the end of the array
Which JQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
switch()
toggleClass()
swicthClass()
exchangeClass()
What does mean this selector $("div p")?
The first p element in a div element
All p elements in a div element
All div element in a p element
none
How to set background color of all p elements with JQuery?
$("p").manipulate("background-color", red");
$("p").style("background-color", "red");
$("p").style("background-color: red");
$("p").css("background-color", "red");
<button (a) = "alert("Hello")">Click me</button>
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>
The number is 0
The number is 1
The number is 2
The number is 3
The number is 4
The number is 4
The number is 3
The number is 2
The number is 1
The number is 0
none
Which of the following is correct?
JQuery is a JSON library
JQuery is a JavaScript library
JQuery use Java
none
JQuery method to perform an asyncronous HTTP request?
JQuery.ajax()
JQuery.ajaxRequest()
JQuery.ajaxAsync()
JQuery.AJAX()
Which JQuery function is used to prevent code from running, before the document is finished loading?
$(document).onload()
$(document).ready()
$(document).load()
$(document).onstart()
JQuery is
Client Scripting Library
Server Scripting Library
JQuery method is used to set one or more style propereties?
css()
style()
html()
both style() and css()
Which element select:
$('#bar') ?
<p class="bar"></p>
<p id="bar"></p>
<p class="bar">bar</p>
all
What is the output of 10+20+"30"
60
102030
throw an exception
3030
How to add a class in JQuery?
addClass()
addClasses()
add()
getMiciur()
Quali delle seguenti tecnologie consente di ottenere i dati da un server senza ricaricare l'intera pagina?
JavaScript
jQuery
AJAX
MVC
You should define a backup font-family in css
VERO
FALSO
che m n fott a me
Dove possiamo aggiungere i nostri file JS
nel <head>
nel <body>
entrambe
