Which attribute on the HTML
input
element allows the form to ensure the input follows some basic rules?type
method
src
required
Which attribute can be used on the HTML
form
tag to specify the HTTP request type?src
destination
method
request
Why is it important to use elements like
header, main, section
, orarticle
in the HTML when building out a web page?They add styling to the different parts of the page.
They add functionality to the page via Javascript.
They semantically describe the page content.
They stop the page from working if they aren’t used.
Which of the following is the correct way of commenting in CSS?
This is a comment.
// This is a comment.
/ This is a comment. /
-- This is a comment. --
If two selectors with equal specificity are declared in CSS, how is it determined which one takes precedence?
The rule that comes first alphabetically will be applied.
The last written rule is the one that will be applied.
The first written rule is the one that will be applied.
The rule to apply is randomly chosen.
Which of the following are relative values in CSS, meaning the size being defined is relative to the size of another element on the page? Select all that apply.
px
rem
em
pc
Which of the following pseudo-classes represent action states initiated by the user? Select all that apply.
inactive
enabled
hover
active
If a variable has been created but no value has been assigned to it, it is considered to be in what state?
Empty
Undefined
Null
Assigned
What will print out when the following code runs?
var i = 7; var j = 2; if(i < 7 || j < 5) { console.log("Hello"); } else { console.log("Goodbye"); }
Goodbye
It will throw an error.
Hello
It won’t print anything.
One common way to manipulate a page is to change the way it looks based on a button the user has clicked on. This is done by changing the style of elements on the page, typically by adding or removing a class or ID. What Javascript function can be used to accomplish this?
createElement()
innerHTML()
setAttribute()
appendChild()