# Module Quiz: Front-End Technologies

1. **Which attribute on the HTML** `input` **element allows the form to ensure the input follows some basic rules?**
    
    * <mark>type</mark>
        
    * method
        
    * src
        
    * required
        
2. **Which attribute can be used on the HTML** `form` **tag to specify the HTTP request type?**
    
    * src
        
    * destination
        
    * <mark>method</mark>
        
    * 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.
        
    * <mark>They semantically describe the page content.</mark>
        
    * 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.
        
    * <mark>/* This is a comment. */</mark>
        
    * \-- 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.
        
    * <mark>The last written rule is the one that will be applied.</mark>
        
    * 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
        
    * <mark>rem</mark>
        
    * <mark>em</mark>
        
    * pc
        
7. **Which of the following pseudo-classes represent action states initiated by the user?** Select all that apply.
    
    * inactive
        
    * enabled
        
    * <mark>hover</mark>
        
    * <mark>active</mark>
        
8. **If a variable has been created but no value has been assigned to it, it is considered to be in what state?**
    
    * Empty
        
    * <mark>Undefined</mark>
        
    * Null
        
    * Assigned
        
9. **What will print out when the following code runs?**
    
    ```javascript
    var i = 7; 
    var j = 2; 
    if(i < 7 || j < 5) { 
        console.log("Hello");
    } else { 
        console.log("Goodbye"); 
    }
    ```
    
    * Goodbye
        
    * It will throw an error.
        
    * <mark>Hello</mark>
        
    * 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()
        
    * <mark>setAttribute()</mark>
        
    * appendChild()
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731482312369/386926d1-5ad8-460b-b1a3-42d8dfc95fc4.png align="center")
