Module Quiz: Front-End Technologies

Module Quiz: Front-End Technologies

  1. Which attribute on the HTML input element allows the form to ensure the input follows some basic rules?

    • type

    • method

    • src

    • required

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

    • src

    • destination

    • method

    • request

  3. Why is it important to use elements like header, main, section, or article 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.

  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. --

  5. 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.

  6. 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

  7. Which of the following pseudo-classes represent action states initiated by the user? Select all that apply.

    • inactive

    • enabled

    • hover

    • active

  8. 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

  9. 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.

  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?

    • createElement()

    • innerHTML()

    • setAttribute()

    • appendChild()