Wk3-HTML/CSS/JavaScript

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

How do you structure a table in HTML?

<html> <body> <table> <tr> <th>Name</th> <th>Address</th> <tr> <tr> <td>Jeet</td> <td>Civil Lines</td> </tr> <table> </body> </html>

What is the result of the following operation? ( 7 || 0 ) ? "hello" : world A) "hello" B) world C) the operation will result in a reference error

A) "hello"

Which of these is the proper representation of a document declaration for an HTML 5 document? A) <!DOCTYPE html5> B) <!DOCTYPE html>

B) <!DOCTYPE html>

What is the proper way to style a border with thickness of 10 px and solid line? A) border-style: solid 10px; B) border: 10px solid; C) border: solid 10pixels; D) border-style: 10px solid;

B) border: 10px solid;

How can you add new DIV elements dynamically? A) document.newElement('div') B) document.createElement('div')

B) document.createElement('div')

ID and CLASS are examples of HTML A) tags. B) declarations. C) attributes. D) elements

C) attributes

What is the correct JavaScript syntax to change the content of the HTML element? A) #demo.innerHTML = "Hello World!"; B) document.getElementByName("demo").innerHTML = "Hello World!"; C) document.getElementById("demo").innerHTML = "Hello World!"; D) document.getElement("demo").innerHTML = "Hello World!";

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

What is *NOT* true about let, var, and const? A) let and const were new additions in ES6 B) let can be defined in block scope C) let can be re-declared in the same scope D) const cannot be reassigned

C) let can be re-declared in the same scope

What is *NOT* a JS event? A) onchange B) onload C) onhover D) onclick

C) onhover Extra details on this...

What is the correct CSS syntax for making all the elements bold A) <p style="text-size:bold"> B) p {text-size:bold} C) p {font-weight:bold} D) <p style="font-size:bold">

C) p {font-weight:bold}

What is the === operator?

Compares value equality as well as data type

Which of the following is NOT true about HTML attributes? A) Attributes are fields that provide additional information about an HTML element. B) Attributes are defined in the start tag of an HTML element. C) The value of an attribute must always be surrounded by quotation marks. D) HTML attributes can be defined in a separate file.

D) HTML attributes can be defined in a separate file.

Which is the correct CSS syntax? A) {body:color=black(body} B) {body;color:black} C) body:color=black D) body {color: black}

D) body {color: black}

Which CSS property controls the text size? A) text-style B) text-size C) font-style D) font-size

D) font-size

What is the == operator?

Does type coercion and then compares the values

TRUE or FALSE: Bubbling event listeners take precedence over capturing event listeners?

FALSE

What is the output: var x = 'hello' / 3; console.long(x + '-' + typeof x);

NaN - number 'hello' is a string which is not a number (NaN). NaN is also is a number type too

What are the the XMLHttpRequest object readyStateChanges, and what do they mean?

RS 0- RS 1- RS 2- RS 3- RS 4-

TRUE OR FALSE: External CSS can be reused on multiple pages?

TRUE

Who published HTML5?

W3C

Which JavaScript timer will execute repeatedly until the function is cancelled?

setInterval

Which code snippet will produce negative infinity? A) -10 / 0 B) 0 / -5 C) 10000000000000000000000 / -1000000000000000000000 D) None of the above

A) -10 / 0

What is the correct HTML for creating a hyperlink? A) <a href="http://www.example.com">example</a> B) <a url="http://www.example.com">example</a>

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

What is the correct HTML for making a text input field? A) <input type="text"> B) <input type="textfield"> C) <text> D) <box>

A) <input type="text">

What HTML element allows for internal CSS to be added to the HTML page? A) <style> B) <css> C) <head> D) <body>

A) <style>

How would you select all h1 elements in CSS? A) h1{ } B) h1.all{ } C) all.h1{ }

A) h1{ }

What is the output? (function() { console.log(1); setTimeout(function() {console.log(2)}, 1000); setTimeout(function() {console.log(3)}, 0); console.log(4); })();

1 4 3 2

What are the property values of the the XMLHttpRequest object and what do they mean?

100.. 200.. 300... 400... 500...

What is JSON in Ajax? A) Data interchange format in JavaScript B) JavaScript library for building Ajax applications C) An Ajax event controller D) Server-side component for handling Ajax requests

A) Data interchange format in JavaScript

A stylesheet that is defined in a file outside of the html file is called: A) an external style sheet B) an internal style sheet C) an inline stylesheet D) an outside stylesheet

A) an external style sheet

What is the correct CSS syntax for making all of the < section > elements bold? A) section {font-weight:bold;} B) section {text-weight:bold;} C) <section style="text-size:bold;"> D) <section style="font-size:bold;">

A) section {font-weight:bold;}

Which tag is used to define CSS inside of an HTML document? A) style B) head C) form D) script

A) style (allows for the inner CSS addition)

TRUE OR FALSE: In JavaScript, a closure is an inner function that has access to its outer function's scope, even after the outer function has returned.

TRUE

TRUE or FALSE: By default, event handlers are set to the bubbling phase?

TRUE

TRUE or FALSE: HTML attribute values are case-sensitive?

TRUE

TRUE or FALSE: More than one stylesheet can be used in an HTML page?

TRUE

TRUE or FALSE: When using the padding property; you are allowed to use negative values?

TRUE

TRUE or FALSE: isNaN(true) === false?

TRUE Because NaN is falsy value by default, isNaN is true (i.e. it IS false). Comparing false to false by type AND value equals true.


Ensembles d'études connexes

InDesign Certification Questions

View Set

Nutrition Therpay II FINAL: Chapter 2

View Set

Strategic Management Ch 1-4: Exam 1

View Set

Drugs and Society Test 3- ch. 6, 7, 8, 9

View Set

exam 2 complex care practice questions

View Set

RN Targeted Medical Surgical Neurosensory and Musculoskeletal

View Set