← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 976 · 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 file should this code go in: score = score + 1; (a) style.css (b) index.html (c) script.js
  2. 2.🔁 How many numbers does this code print?
    for (let i = 0; i < 15; i = i + 3) {
      console.log(i);
    }
  3. 3.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) Maths fun
  4. 4.Which of these is an empty tag? (a) <p> (b) <li> (c) <input> (d) <ul>
  5. 5.Which of these does JavaScript do? (a) shows a pop-up message (b) sets colours and fonts (c) gives the page structure (d) lays out the page
  6. 6.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  7. 7.What does justify-content: flex-end do? (a) packs boxes at the start (b) packs boxes at the end (c) puts boxes in the middle (d) equal gaps, none at ends
  8. 8.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  9. 9.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  10. 10.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  11. 11.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) an element name (d) a comment
  12. 12.True or false: in <img>, src shows if the image fails. (a) True (b) False
  13. 13.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  14. 14.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  15. 15.True or false: to share your OTP is safe. (a) True (b) False
  16. 16.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) Birthday cake (b) cake.jpg (c) moon.png (d) dog.jpg
  17. 17.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) href (b) Visit the site (c) Maths fun (d) quiz.html
  18. 18.🌈 Which colour is #00ff00? (a) red (b) black (c) blue (d) bright green
  19. 19.🖌️ Which CSS property makes letters bigger? (a) font-family (b) font-size (c) text-align (d) color
  20. 20.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) Visit the site (c) Contact us (d) href
  22. 22.True or false: <caption> makes one table row. (a) True (b) False
  23. 23.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  25. 25.What is <input type="date"> for? (a) picks a day (b) sends the form (c) hides what you type (d) is for one line of words
  26. 26.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  27. 27.True or false: to download from pop-ups is not safe. (a) True (b) False
  28. 28.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-weight (c) color (d) font-size
  29. 29.Which of these is true of a code editor? (a) opens web pages for us (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
  30. 30.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  31. 31.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 140px;
      padding: 5px;
      border: 1px solid black;
      margin: 20px;
    }
  32. 32.📝 Which input type lets you pick only one? (a) text (b) radio (c) email (d) checkbox
  33. 33.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #00ff00 (d) #ffffff
  34. 34.🎨 A CSS file usually ends with which extension? (a) .png (b) .html (c) .js (d) .css
  35. 35.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  36. 36.What is <input type="text"> for? (a) lets you pick only one (b) is for one line of words (c) picks a day (d) lets you tick many
  37. 37.True or false: HTTPS scrambles data on its way. (a) True (b) False
  38. 38.True or false: <ul> has a closing tag. (a) False (b) True
  39. 39.✍️ Which sign ends each CSS declaration? (a) ; (b) , (c) : (d) .
  40. 40.Which of these is true of <nav>? (a) sits at the very top (b) holds the main content (c) helps you move around (d) holds extra side notes

Answer key

  1. script.js
  2. 5
  3. contact.html
  4. <input>
  5. shows a pop-up message
  6. an id selector
  7. packs boxes at the end
  8. Yes
  9. helps everyone
  10. Yes
  11. an attribute
  12. False
  13. a line across the page
  14. <h1>
  15. False
  16. cake.jpg
  17. Visit the site
  18. bright green
  19. font-size
  20. has a closing tag
  21. Contact us
  22. False
  23. <img>
  24. in a new tab
  25. picks a day
  26. in the same tab
  27. True
  28. background-color
  29. colours code to help us
  30. href
  31. 192
  32. radio
  33. #00ff00
  34. .css
  35. to describe the image
  36. is for one line of words
  37. True
  38. True
  39. ;
  40. helps you move around

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