← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 528 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.🌍 What is the path in this URL?
    https://kids.example.org/maths/tables.html
    (a) https (b) kids.example.org (c) /index.html (d) /maths/tables.html
  2. 2.🔁 Which loop repeats code a set number of times? (a) for (b) let (c) else (d) if
  3. 3.True or false: to put secrets in comments is safe. (a) False (b) True
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  5. 5.Which of these is a strong password? (a) iloveyou (b) Mango#Kite29! (c) qwerty (d) 111111
  6. 6.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
  7. 7.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  8. 8.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Rain today</h4>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  9. 9.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <meta charset="utf-8">
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Roses are red<br>Kites fly high<br>Birds sing</p>
  11. 11.🧩 Which language makes a form box? (a) JavaScript (b) CSS (c) HTML
  12. 12.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
  13. 13.True or false: the URL shows the page to you. (a) True (b) False
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) width (b) Our school bus (c) The full moon (d) moon.png
  15. 15.True or false: the border is a solid or dotted edge. (a) True (b) False
  16. 16.True or false: in <img>, height names the picture file. (a) True (b) False
  17. 17.🔁 How many times does this code print “Hello”?
    for (let i = 3; i <= 12; i++) {
      console.log("Hello");
    }
  18. 18.📊 Where do <td> cells go? (a) inside the <head> (b) inside a <li> (c) inside a <tr> (d) inside a <p>
  19. 19.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <h1/> (d) <\h1>
  20. 20.♿ Who uses a screen reader? (a) only teachers (b) people who are blind (c) only robots (d) only coders
  21. 21.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  22. 22.True or false: HTTPS scrambles data on its way. (a) False (b) True
  23. 23.True or false: the browser asks for a web page. (a) False (b) True
  24. 24.Which of these is true of <nav>? (a) holds the logo and title (b) holds the main content (c) holds one blog post (d) holds the menu of links
  25. 25.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 230px;
      padding: 15px;
      border: 5px solid black;
      margin: 5px;
    }
  26. 26.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  27. 27.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
  28. 28.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  29. 29.True or false: “link text “click here”” makes the page harder to use. (a) False (b) True
  30. 30.⚖️ What colour is the text of this element?
    <h2 class="note" id="main">Hi</h2>
    CSS:
    h2 { color: black; }
    h2 { color: purple; }
    (a) white (b) purple (c) black (d) yellow
  31. 31.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) close it, tell an adult (b) share it with friends (c) type the password (d) click it twice
  32. 32.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    (a) Hello, world! (b) Our school trip (c) Good morning!
  33. 33.♿ Which link text is clearest? (a) here (b) click here (c) Read the fruit facts (d) link
  34. 34.🎯 Which CSS selector matches this element?
    <li class="note" id="top">Hello</li>
    (a) #note (b) .big (c) li (d) div
  35. 35.🔁 Which word runs code only when something is true? (a) for (b) let (c) if (d) log
  36. 36.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  37. 37.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  38. 38.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) opens web pages for us (d) turns HTML into a page
  39. 39.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
  40. 40.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No

Answer key

  1. /maths/tables.html
  2. for
  3. False
  4. 50
  5. Mango#Kite29!
  6. helps everyone
  7. False
  8. 2
  9. <p>
  10. 5
  11. HTML
  12. a line across the page
  13. False
  14. The full moon
  15. True
  16. False
  17. 10
  18. inside a <tr>
  19. </h1>
  20. people who are blind
  21. in a new tab
  22. True
  23. True
  24. holds the menu of links
  25. 270
  26. an element selector
  27. a slash /
  28. in the same tab
  29. True
  30. purple
  31. close it, tell an adult
  32. Good morning!
  33. Read the fruit facts
  34. li
  35. if
  36. a code editor
  37. src
  38. colours code to help us
  39. 3
  40. Yes

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids