# Module Quiz: Introduction to HTML and CSS

1. Which two elements should be added to the **html** element to make the structure of an HTML document?
    
    ```xml
    <!DOCTYPE html>
    <html>
    </html>
    ```
    
    * **&lt;div&gt;**
        
    * **<mark>&lt;head&gt;</mark>**
        
    * **&lt;p&gt;**
        
    * **<mark>&lt;body&gt;</mark>**
        

2. When using the anchor tag **&lt;a&gt;**, which attribute determines where the hyperlink links to?
    
    * **link**
        
    * **src**
        
    * **<mark>href</mark>**
        
3. When adding an image to a web page, which of the following is the correct HTML tag?
    
    * **<mark>&lt;image&gt;</mark>**
        
    * **&lt;img&gt;**
        
    * **&lt;link&gt;**
        
4. How many **columns** exist on the following HTML table?
    
    ```xml
    <table>
        <tr>
            <td>Falafel</td>
            <td>$10.00</td>
        </tr>
        <tr>
            <td>Pasta Salad</td>
            <td>$12.00</td>
        </tr>
        <tr>
            <td>Dessert</td>
            <td>$8.00</td>
        </tr>
    </table>
    ```
    
    * **1 column**
        
    * **<mark>2 columns</mark>**
        
    * **3 columns**
        
5. When an HTML form is submitted to a web server, which HTTP methods can be used? Select all that apply.
    
    * **PUT**
        
    * **<mark>POST</mark>**
        
    * **DELETE**
        
    * **<mark>GET</mark>**
        
6. For the following HTML code, which CSS selectors can be used to select the **h1** element? Select all that apply.
    
    ```xml
    <h1 id="title">Welcome</h1>
    ```
    
    * **Element Selector**
        
    * **<mark>ID selector</mark>**
        
    * **Class Selector**
        
    * **Descendant Selector**
        
7. In the following CSS code, what is the **color:** part known as?
    
    ```css
    h1 {
        color: purple;
    } 
    ```
    
    * **CSS Attribute**
        
    * **<mark>CSS Property</mark>**
        
    * **CSS Selector**
        
    * **CSS Rule**
        
8. Based on the following CSS, what will be the margin-box width for **div** elements?
    
    ```css
    div {
        width: 10px;
        padding-left: 5px;
        padding-right: 5px;
        margin-left: 5px;
        margin-right: 5px;
    }
    ```
    
    * **10 pixels**
        
    * **20 pixels**
        
    * **<mark>30 pixels</mark>**
        
    * **40 pixels**
        
9. True or false. In document flow, block-level elements always start on a new line.
    
    * **<mark>True</mark>**
        
    * **False**
        
10. Based on the following CSS code, how will the text be aligned for the **p** element?
    
    ```css
    p {
        text-align: justify;
    }
    ```
    
    * **<mark>The text will be spread out so that every line of the text has the same width within the p element.</mark>**
        
    * **The text will be centered inside the p element.**
        
    * **The text will be aligned to the right of the p element.**
        
    * **The text will be aligned to the left of the p element.**
