Module Quiz: Introduction to HTML and CSS

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?

     <!DOCTYPE html>
    • <div>

    • <head>

    • <p>

    • <body>

  1. When using the anchor tag <a>, which attribute determines where the hyperlink links to?

    • link

    • src

    • href

  2. When adding an image to a web page, which of the following is the correct HTML tag?

    • <image>

    • <img>

    • <link>

  3. How many columns exist on the following HTML table?

             <td>Pasta Salad</td>
    • 1 column

    • 2 columns

    • 3 columns

  4. When an HTML form is submitted to a web server, which HTTP methods can be used? Select all that apply.

    • PUT

    • POST

    • DELETE

    • GET

  5. For the following HTML code, which CSS selectors can be used to select the h1 element? Select all that apply.

     <h1 id="title">Welcome</h1>
    • Element Selector

    • ID selector

    • Class Selector

    • Descendant Selector

  6. In the following CSS code, what is the color: part known as?

     h1 {
         color: purple;
    • CSS Attribute

    • CSS Property

    • CSS Selector

    • CSS Rule

  7. Based on the following CSS, what will be the margin-box width for div elements?

     div {
         width: 10px;
         padding-left: 5px;
         padding-right: 5px;
         margin-left: 5px;
         margin-right: 5px;
    • 10 pixels

    • 20 pixels

    • 30 pixels

    • 40 pixels

  8. True or false. In document flow, block-level elements always start on a new line.

    • True

    • False

  9. Based on the following CSS code, how will the text be aligned for the p element?

    p {
        text-align: justify;
    • The text will be spread out so that every line of the text has the same width within the p element.

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