Week 2 quiz

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

JavaScript has no types?

False.

Which of the following is NOT true about HTML attributes.

HTML attributes can be defined in a separate file.

What is the correct HTML for inserting an image?

<img src="image.gif" alt="MyImage">

What is the correct HTML for making a checkbox?

<input type="checkbox">

What is the correct HTML for making a text input field?

<input type="text">

How can you make an ordered list?

<ol>

What HTML element allows for internal CSS to be added to the HTML page?

<style>

Which of these tags are all table oriented tags?

<table>,<tr>,<td>

Which element allows you to add a title to an html page?

<title>

How can you make an unordered list?

<ul>

What does CSS stand for?

Cascading Style Sheets

What is === operator?

Compares value equality as well as data type

External CSS can be reused on multiple pages?

True

More than one stylesheet can be used in an HTML page.

True

What is not true about let, var, and const?

let can be redeclared in the same scope

Which property is used to change the left margin of an element?

margin-left

Which is not a JavaScript event?

onhover

What is the correct CSS syntax for making all the elements bold

p {font-weight:bold}

What color would an h1's text be? h1 { background-color: #00FF00; color: #FF0000; }

red

What is the correct CSS syntax for making all of the < section > elements bold?

section {font-weight:bold;}

What is the correct HTML for creating a hyperlink?

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

What is the correct HTML element for inserting a line break?

<br>

Which of the following are primitive data types in JavaScript? Name Six.

1. Number 2. String 3. Null 4.Undefined 5. Boolean 6. Symbol

In HTML 5 this tag represents the header of the element it is embedded in.

<head>

Javascript expressions name 4 that are true. Assume these are being used in an if statement..

32767 'hello' null == null 5 == '5'

Which of these is the proper representation of a document declaration for an HTML 5 document?

<!DOCTYPE html>

What is the root element of an html page?

<html>

What is the result of the following operation? ( 7 || 0 ) ? "hello" : world

"hello"

The ID selector in CSS uses a

(#) symbol

Which code snippet will produce negative infinity?

-10 / 0

What is the document extension of an HTML document?

.html

How do you select elements with class name "test"? (CSS)

.test{ }

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

How would you get the 1st element in an array in JavaScript?

Array[0]

What does DOM stand for?

Document Object Model

What elements do you need for a bare bones HTML page?

Document declaration, html, head and body elements

By default, event handlers are set to the bubbling phase.

FALSE

HTML is a programming language.

FALSE

Java is short for JavaScript

FALSE

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

NaN - number

When using the padding property; are you allowed to use negative values?

No

HTML attribute values are case-sensitive

TRUE

HTML5 was published by

W3C

A stylesheet that is defined in a file outside of the html file is called

an external style sheet

ID and CLASS are examples of HTML

attributes.

Which property is used to change the background color?

background-color

Which is the correct CSS syntax?

body {color: black}

What is the proper way to style a border with thickness of 10 px and solid line?

border: 10px solid;

Create elements dynamically

document.createElement('div')

How can you add new DIV elements dynamically?

document.createElement('div')

Changing HTML content What is the correct JavaScript syntax to change the content of the HTML element?<p id="demo">This is a demonstration.</p>

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

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

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

Name some valid ways of DOM selection.

document.getElementById(id) document.getElementsByTagName(tagName) document.getElementsByClassName(className) document.querySelector(selector)

Which CSS property controls the text size?

font-size

Select all h1 elements in CSS

h1{ }

What does the hexadecimal number (#FA0AB1) represent in CSS?

hex color code

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

setInterval

which tag is used to define CSS inside of an HTML document?

style

What is the property to center all of the text contents in an element?

text-align

ES6 syntax .What is the difference between var, let, and const?

var defines a normal (pre-ES6) variable, let defines a block-scoped variable, const defines a constant whose reference cannot change


संबंधित स्टडी सेट्स

Global Climate Change Final Exam

View Set

Saunders NCLEX Ch 19 Perioperative Questions

View Set

Starting out with C++ From control Structures through Objects Ninth Edition - Chapter 1 - 4, Midterm test

View Set

Lung Cancer and Thoracic Surgery

View Set

american history (US imperialism)

View Set

Biology Chapter 1 Quiz: Exploring Life and Science

View Set