Você está na página 1de 6

EVALUACIN INICIAL

Apellidos:
Nombres:
1. Cul de los siguientes Doctype es el que utilizaras para un documento HTML5?
(a) <!doctype html5>
(b) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 5.0 Transitional//EN">
(c) <!doctype html>
2. Selecciona el elemento en el cul incluiras los links de la navegacin primaria de un sitio:
a) <section>
b) <menu>
c) <header>
d) <nav>
3. Cul de los siguientes usos del elemento <script> te parece el ms apropiado?
(a) <script src="archivo.js"></script>
(b) <script src="archivo.js" />
(c) <script type="text/javascript" src="archivo.js"></script>
4. Selecciona el elemento invlido:
(a)
(b)
(c)
(d)

<meter>
<hgroup>
<progress>
<post>

5. Cul de los siguientes scripts se utiliza generalmente para detectar capacidades de JS, HTML5 y
CSS3 en el navegador?
(a)
(b)
(c)
(d)

HTML5 Shim
Google Detector
Selectivizr
Modernizr

6. Selecciona el tipo de input vlido


(a)
(b)
(c)
(d)

type=boolean
type=textarea
type=alphanumeric
type=range

7. Si tuvieras que crear un campo de bsqueda, qu sera lo ms apropiado?


(a) <input type="find" />

(b) <input type="text" search />


(c) <input type="search" />
8. Cul de los siguientes atributos permite mostrar un valor por defecto en un elemento input, pero que
se borra cundo hacemos foco en el mismo?
(a)
(b)
(c)
(d)

content
placeholder
source
value

9. Si estuvieras maquetando un blog, en cul de los siguientes elementos pondras los links a archivo,
categoras, conos de redes sociales, links a artculos ms populares, etc?
(a) <aside>
(b) <section>
(c) <summary>
10. Para que un input tenga el foco apenas se termine de cargar el documento, cul de las siguientes
soluciones aplicaras?
(a) Utilizar el atributo booleano autofocus
(b) Utilizar el atributo autofocus=true
(c) Utilizar el atributo placeholder
11. Qu cambio se podra considerar como el ms importante para el elemento <a> en HTML5?
(a) Puede apuntar a dos pginas distintas al mismo tiempo
(b) Deja de ser de tipo inline y ahora puede contener cualquier otro elemento dentro (ej: h1, p,
etc.)
(c) El nuevo atributo placeholder
12. Para qu se utiliza el contenido dentro de la etiqueta <canvas>?
(a) Se muestra como link, que al hacer click en l nos muestra el canvas.
(b) Es el contenido alternativo que muestran solo los navegadores que no soportan canvas.
(c) Es el texto que le podemos aadir al canvas a modo de ttulo.
Javascript
1. Inside which HTML element do we put the JavaScript?
(a)
(b)
(c)
(d)

<javascript>
<js>
<scripting>
<script>

2. What is the correct JavaScript syntax to change the content of the HTML element below?

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


(a)
(b)
(c)
(d)

document.getElementById("demo").innerHTML = "Hello World!";


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

3. Where is the correct place to insert a JavaScript?


(a) The <body> section
(b) The <head> section
(c) Both the <head> section and the <body> section are correct
4. What is the correct syntax for referring to an external script called "xxx.js"?
(a) <script src="xxx.js">
(b) <script href="xxx.js">
(c) <script name="xxx.js">
5. The external JavaScript file must contain the <script> tag.
(a) True
(b) False
6. How do you write "Hello World" in an alert box?
(a)
(b)
(c)
(d)

msgBox("Hello World");
alert("Hello World");
msg("Hello World");
alertBox("Hello World");

7. How do you create a function in JavaScript?


(a) function = myFunction()
(b) function:myFunction()
(c) function myFunction()
8. How do you call a function named "myFunction"?
(a) call function myFunction()
(b) myFunction()
(c) call myFunction()
9. How to write an IF statement in JavaScript?
(a) if (i == 5)
(b) if i = 5 then
(c) if i = 5

(d) if i == 5 then
10. How to write an IF statement for executing some code if "i" is NOT equal to 5?
(a)
(b)
(c)
(d)

if (i != 5)
if (i <> 5)
if i <> 5
if i =! 5 then

11. How does a WHILE loop start?


(a) while (i <= 10; i++)
(b) while (i <= 10)
(c) while i = 1 to 10
12. How does a FOR loop start?
(a)
(b)
(c)
(d)

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

13. How can you add a comment in a JavaScript?


(a) <!--This is a comment-->
(b) //This is a comment
(c) 'This is a comment
14. How to insert a comment that has more than one line?
(a) /*This comment has
more than one line*/
(b) //This comment has
more than one line//
(c) <!--This comment has
more than one line-->
15. What is the correct way to write a JavaScript array?
(a)
(b)
(c)
(d)

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


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

16. How do you round the number 7.25, to the nearest integer?
(a)
(b)
(c)
(d)

Math.rnd(7.25)
round(7.25)
Math.round(7.25)
rnd(7.25)

17. How do you find the number with the highest value of x and y?
(a)
(b)
(c)
(d)

Math.ceil(x, y)
Math.max(x, y)
top(x, y)
ceil(x, y)

18. What is the correct JavaScript syntax for opening a new window called "w2" ?
(a) w2 = window.open("http://www.w3schools.com");
(b) w2 = window.new("http://www.w3schools.com");
19. JavaScript is the same as Java.
(a) True
(b) False
20. How can you detect the client's browser name?
(a) navigator.appName
(b) client.navName
(c) browser.name
21. Which event occurs when the user clicks on an HTML element?
(a)
(b)
(c)
(d)

onclick
onchange
onmouseclick
onmouseover

22. How do you declare a JavaScript variable?


(a) var carName;
(b) v carName;
(c) variable carName;
23. Which operator is used to assign a value to a variable?
(a)
(b)
(c)
(d)

*
=
x

24. What will the following code return: Boolean(10 > 9)


(a) true
(b) NaN
(c) false

25. Is JavaScript case-sensitive?


(a) Yes
(b) No

Você também pode gostar