Mystery Box
Languages
Html
CSS
JavaScript
100

document.querySelector is used to...

link JS variables to HTML elements.

100

In JavaScript, this is the keyword you use to declare a function.

What is function?

100

Why is it important to assign classes to HTML elements?

So that you can edit each class specifically.

100

These CSS properties define the space between the element border and the element content.

What is padding?

100

Can JavaScript alter the style of a page?

Yes, it can reference CSS to change styling elements of a webpage when event (i.e. clicking) is initiated.

200

getElementbyId is responsible for what?

using elements specified by an ID label from HTML in JavaScript

200

Which two languages allow you to change the size of an image?

What is JavaScript & CSS?

200

Describe HTML layout structure including the different tags in your response

<html>

<head> 

<title>  </title> 

</head>

<body> 

</body> 

</html>

200

These properties define the space around elements.

What is margin?

200

It is essential that I use document.querySelector to declare variables in JavaScript.

False. I can use getElementById.

300

What two properties can I use to change the size of an image?

width and height 

300

If I want to add a flex-box what language would I use? 

CSS

300

List five DIFFERENT tags in HTML

h1, br, p , li, ul


300

Explain the difference between position: relative and position: absolute.

relative positions provide a reference from another element, absolute positions only reference the entire page for its position.

300

What is the purpose of declaring variables in JS?

Its a bridge between JS and HTML elements. The variables represent an HTML element that can now be edited in JS.

400

If I want to create sections on my webpage in HTML I would use what method?

<div>, <br>

400

What is the role of JavaScript?

Add interactivity on webpage.

400

Create a anchor tag using an actual website

<a href="www.nike.com"> NIKE </a>

400

Can multiple properties be identified for the same selector?

Yes.

400

What is the purpose of .value?

To return the value that user enters into input field.

500

Explain the purpose of an input field?

Allows user to enter information.

500

What's the connection between class names and variables?

Variables represent classes.

500

Write the code to create a list with buttons for the following words: chicken, pizza, french fries, hot dog

<ul> 

<li> chicken </li>

<li> pizza </li>

<li> french fries </li> 

<li> hot dog </li>

</ul>

500

Explain how you create a flex-box.


(note: must use the word 'div tag' in your response.)

You create a div tag with a class name that surrounds what you want to edit in HTML. Then you use display: flex; in CSS.

500

Explain the purpose of the following code:


submitButton.onclick=function(){

    let userInput=document.querySelector("input").value;

  

when the button is clicked it connects the variable userInput to whatever value is entered within the input field.