document.querySelector is used to...
link JS variables to HTML elements.
In JavaScript, this is the keyword you use to declare a function.
What is function?
Why is it important to assign classes to HTML elements?
So that you can edit each class specifically.
These CSS properties define the space between the element border and the element content.
What is padding?
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.
getElementbyId is responsible for what?
using elements specified by an ID label from HTML in JavaScript
Which two languages allow you to change the size of an image?
What is JavaScript & CSS?
What is the role of the <br> tag?
Add breaks in the page to separate HTML elements.
These properties define the space around elements.
What is margin?
It is essential that I use document.querySelector to declare variables in JavaScript.
False. I can use getElementById.
What two properties can I use to change the size of an image?
width and height
If I want to add a flex-box what language would I use?
CSS
What's the difference between a closing tag and a closing bracket?
Closing tag: </button>
Closing bracket: >
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.
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.
If I want to create sections on my webpage in HTML I would use what method?
<div>, <br>
What is the role of JavaScript?
Add interactivity on webpage.
What is the purpose of a 'placeholder'?
To give the user a hint as to what to type in the input field.
Can multiple properties be identified for the same selector?
Yes.
What is the purpose of .value?
To return the value that user enters into input field.
Explain the purpose of an input field?
Allows user to enter information.
What's the connection between class names and variables?
Variables represent classes.
If i want to group elements in HTML together how would i do that?
Surround elements with the same 'div' tag and class name.
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.
Explain the purpose of the following code:
submitButton.onclick=function(){
let userInput=document.querySelector("input").value;