← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 245 · 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.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-start (c) center (d) flex-end
  2. 2.True or false: to post your home address is safe. (a) False (b) True
  3. 3.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) : (d) -
  4. 4.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  5. 5.What is <input type="email"> for? (a) lets you pick only one (b) picks a day (c) is for an email address (d) takes only numbers
  6. 6.True or false: padding is the gap to other boxes. (a) False (b) True
  7. 7.What does justify-content: space-between do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  8. 8.True or false: HTML on its own can run a game loop. (a) True (b) False
  9. 9.🎯 Which CSS selector matches this element?
    <h2 class="big" id="end">Hello</h2>
    (a) .end (b) .red (c) li (d) #end
  10. 10.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) nowhere (d) on the browser tab
  11. 11.🎯 Which element does the selector #logo style? (a) <span class="menu"> (b) <div class="logo"> (c) <div id="end"> (d) <div id="logo">
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Kites fly high<br>Stars shine<br>Sky is blue</p>
  13. 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.🌍 What do we call the computer that stores a website? (a) a mouse (b) a keyboard (c) a printer (d) a server
  15. 15.True or false: to ask before downloading is safe. (a) False (b) True
  16. 16.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
  17. 17.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      color: red;
    }
  18. 18.Which colour pair is hard to read? (a) white on dark blue (b) dark grey on white (c) yellow on black (d) red on green
  19. 19.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
  20. 20.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  21. 21.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  22. 22.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  23. 23.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <p> (d) <link rel="stylesheet">
  24. 24.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My best friend</h2>
    <p>Rain today</p>
    <p>Fun facts</p>
  25. 25.🌍 What is the path in this URL?
    https://www.example.com/index.html
    (a) www.example.com (b) /art/gallery.html (c) /index.html (d) https
  26. 26.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) colours code to help us (d) saves our .html files
  27. 27.🖌️ How big is the text, in px?
    h1 {
      text-align: right;
      font-size: 20px;
      color: blue;
      background-color: yellow;
    }
  28. 28.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
  29. 29.🔁 What does this code print?
    let marks = 25;
    if (marks < 15) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  30. 30.🖌️ What colour are the letters?
    h1 {
      font-size: 12px;
      text-align: left;
      color: yellow;
      background-color: red;
    }
    (a) yellow (b) blue (c) red
  31. 31.📝 Which input type sends the form? (a) radio (b) submit (c) text (d) date
  32. 32.True or false: to log out on shared PCs is safe. (a) False (b) True
  33. 33.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) center (c) space-between (d) flex-start
  34. 34.True or false: in <img>, alt names the picture file. (a) True (b) False
  35. 35.Which of these is true of a web server? (a) opens web pages for us (b) sends pages over the net (c) shows pages from the web (d) has an address bar
  36. 36.🎨 A CSS file usually ends with which extension? (a) .png (b) .js (c) .css (d) .html
  37. 37.⚖️ What colour is the text of this element?
    <p class="big" id="end">Hi</p>
    CSS:
    #end { color: blue; }
    #end { color: green; }
    (a) green (b) yellow (c) blue (d) purple
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts
    line 2: <strong>Rain today</strong>
    line 3: <small>My pets</small>
    (a) line 2 (b) line 3 (c) line 1
  39. 39.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) tiger.jpg (b) An old fort (c) fort.jpg (d) kite.png

Answer key

  1. space-between
  2. False
  3. :
  4. moon.png
  5. is for an email address
  6. False
  7. equal gaps, none at ends
  8. False
  9. #end
  10. on the browser tab
  11. <div id="logo">
  12. 5
  13. has a closing tag
  14. a server
  15. True
  16. <!DOCTYPE html>
  17. 1
  18. red on green
  19. <head>
  20. to describe the image
  21. No
  22. No
  23. <p>
  24. 2
  25. /index.html
  26. stores a website’s files
  27. 20
  28. 20
  29. Try again
  30. yellow
  31. submit
  32. True
  33. flex-start
  34. False
  35. sends pages over the net
  36. .css
  37. green
  38. line 1
  39. 3
  40. fort.jpg

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