All Coursera Quiz Answers

Module Quiz: Front-End Technologies Quiz Answers

In this article i am gone to share Coursera Course: The Full Stack by Meta Week 2 | Module Quiz: Front-End Technologies Quiz Answers with you..

Also visit:  Module Quiz: Introduction to the Full Stack Quiz Answers

 

Module Quiz: Front-End Technologies Quiz Answers

Question 1)
What is the benefit of adding the required attribute to an input element in an HTML form?

  • It will ensure that the form data submitted is valid.
  • It will ensure that the data conforms to the storage requirements.
  • It will ensure that the form data is sent securely.
  • It will ensure that the user provides a value to the form field.

Question 2)
Which attribute can be used on the HTML form tag to specify the HTTP request type?

  • src
  • request
  • method
  • destination

Question 3)
Which of the following HTTP methods can be used to submit a HTML form? Select all that apply.

  • POST
  • DELETE
  • GET
  • PUT

Question 4)
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.

Question 5)
Which of the following CSS selectors has the highest specificity, meaning it will be applied regardless of any other conflicting properties set?

  • Inline styles
  • IDs
  • Classes, attributes, and pseudo-classes
  • Elements and pseudo-elements

Question 6)
This type of element will always occupy the full horizontal width of its parent elements and the height of its content, as well as have a new line before and after the element.

  • Block
  • Inline
  • Flexbox
  • Grid

Question 7)
Which of the following CSS selectors is suitable for changing an element’s style based on the state of the element?

  • Pseudo-class Selector
  • Class selector
  • Descendant selector
  • Element selector

Question 8)
What is a keyword used to declare a variable in Javascript?

  • int
  • def
  • string
  • var

Question 9)
How is a value identified as a string when assigning it to a variable in Javascript?

  • Place .string() after the string to be stored.
  • Surround it with double quotes (“”).
  • Surround it with curly braces ({}).
  • Put the keyword string before the variable declaration.

Question 10)
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?

  • innerHTML()
  • createElement()
  • setAttribute()
  • appendChild()

 

Question 11)
Your web browser is currently at the URL https://meta.com/hello

What address will the following HTML form submit to?

<form action=”login”>

  • https://meta.com/hello/login
  • https://meta.com/hello
  • https://meta.com/
  • https://meta.com/login

Question 12)
If two selectors with equal specificity are declared in CSS, how is it determined which one takes precedence?

  • The rule to apply is randomly chosen.
  • The first written rule is the one that will be applied.
  • The last written rule is the one that will be applied.
  • The rule that comes first alphabetically will be applied.

Question 13)
If a variable has been created but no value has been assigned to it, it is considered to be in what state?

  • Assigned
  • Null
  • Undefined
  • Empty

Question 14)
The space in between the rows and columns in a CSS grid layout are called what?

  • cell
  • flexbox
  • viewports
  • gutters

Question 15)
Which of the following are a part of the grid shorthand property? Select all that apply.

  • grid-template-areas
  • align-self
  • grid-area
  • grid-auto-flow

Question 16)
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"); 
}
  • It will throw an error.
  • It won’t print anything.
  • Goodbye
  • Hello

 

Question 17)
To update just text inside of an element on a page, which Javascript function can be used?

  • createElement()
  • addEventListener()
  • innerText()
  • innerHTML()

Question 18)
Which attribute on the HTML input element allows the form to ensure the input follows some basic rules?

  • required
  • type
  • method
  • src

Question 19)
Why is it important to use elements like header, main, section, or article in the HTML when building out a web page?

  • They semantically describe the page content.
  • They stop the page from working if they aren’t used.
  • They add styling to the different parts of the page.
  • They add functionality to the page via Javascript.

Question 20)
When targeting pseudo-elements with CSS, what is used between the selector and the pseudo-element in CSS?

  • Two colons (::)
  • One colon (:)
  • One underscore (_)
  • One hyphen (-)

Question 21)
What are some of the disadvantages of sending form data through a GET method?

  • The data is sent as part of the URL.
  • The data is sent as part of the request body.
  • Data is stored in browser history and server request logs.
  • Form data could get lost due to URL length limits.

Question 22)
What is the specificity of the following style?

div#main {}

  • 11
  • 101
  • 1
  • 12

Question 23)
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.

  • rem
  • pc
  • px
  • em

Question 24)
If a variable is only able to be used in the function in which it is declared, it is limited by the what?

  • Global scope
  • Function scope
  • Local scope
  • Block scope

Question 25)
What is the type of validation done in the browser before the information is sent to the back end for processing?

  • Server-side
  • Complex
  • Client-side
  • Required

Question 26)
Which of the following is the assignment operator in JavaScript?

  • !=
  • ==
  • =
  • ===

Question 27)
What is the first argument passed to the addEventListener function?

  • The target of the event.
  • A function that will handle the event.
  • A string describing the type of event (such as, “click”).
  • The error to display if the event fails.