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?
Explain the difference between the two variables being declared:
let button=document.querySelector(".button");
let button=document.querySelector("button");
The first variable is associated with a class name, while the second variable is directly associated with an HTML element. They are both correct though.
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?
Describe the purpose of .innerHTML
Usually used to produce text, in the form of a string, in JavaScript to be displayed in HTML. Essentially, it is a connection between JavaScript and HTML elements.
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.
How would you define a function?
A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output.
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.
Create a button with an .onclick function that includes, both, HTML and JavaScript elements (4-5 minutes).
<button class="button"> Click Me </button>
<div class="div"> </div>
let button=document.querySelector(".button");
let div=document.querySelector(".div");
button.onclick=function(){
div.innerHTML="Correct";};