Coding Class - Day 3 Pop Quiz

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Coding – Day 3 Pop Quiz Date: _____________

1. Why should you always include the <!DOCTYPE html> element in every HTML document?

2. What is the <html> element also known as? (Hint: _____ element).

3. The <head> element is the container for what?

4. What does the <meta charset=”utf-8”> element do?

5. Describe the difference between <title> and <h1>.

6. The <body> element is the container for what?

7. What is whitespace?

8. Below are several pieces of text surrounded by the paragraph (<p>) tag. For each code, write down what it would
look like in the browser. Use the space to the right of each code. As long as you make your answer clear, you’re good.

<p>My name is Sara and I like food!</p>

<p>My name is Sara and I like food!</p>

<p>My name is Sara

and I like food!</p>

<p>My name is Sara</p>

<p>and I like food!</p>


9. Comment out the following code:

<p>My name is Buttface.</p>

10. Comment out the heading and the footer.

<h1>Buttface’s Page</h1>

<p>I hate my name. I’m sad.</p>

<footer><p>I love my name!</p></footer>

11. The <main> element helps search engines and other developers find the _________________________ of your page.

12. What is the alt="" attribute used for?

13. What does the alt="" attribute do? Circle the letter of the correct answer.
a. Displays the value if the image fails to load.
b. Displays the value when hovering over the image with the mouse.
c. Never displays the value, but screen reading devices will “speak” it.

14. Fill in the href attribute so that the link jumps down to the image element when clicked on.

<h1>My Page</h1>

<p>This is my page, and I love it! View my <a href=" ">stuff</a>.</p>

<img src="cats.jpg" id="cats">

15. Why would we ever want to create a “dead link”, and how do we create one?

16. Write an <a> tag with an attribute that, when hovered over, shows this text:

My dad’s favorite game is “foosball”!

You might also like