← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 505 · 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 of these is not safe to do online? (a) keep passwords secret (b) check for https first (c) meet an online stranger (d) use a strong password
  2. 2.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Mango</td><td>Orange</td></tr>
    </table>
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) Our school bus (c) The full moon (d) width
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  5. 5.🔠 Are headings shown in bold by default? (a) Yes (b) No
  6. 6.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  7. 7.🏷️ Which is the closing tag for <em>? (a) <em> (b) <em/> (c) </em> (d) <\em>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  9. 9.🚀 Which program lets you see your web page while you build it? (a) a photo viewer (b) a music player (c) a web browser (d) a calculator
  10. 10.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) Maths fun (c) quiz.html (d) Art corner
  12. 12.⚡ What number does this code print?
    let a = 46;
    let b = 6;
    console.log(a - b);
  13. 13.✍️ What is the selector in this CSS rule?
    #top {
      font-style: italic;
      background-color: yellow;
      width: 300px;
    }
    (a) li (b) font-style (c) #top (d) yellow
  14. 14.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) index.html (c) script.js
  15. 15.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) console.log() (c) let (d) for
  16. 16.🌍 Which one is the page’s address? (a) the browser (b) the URL (c) HTTPS (d) the server
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) Our school bus (c) bus.jpg (d) width
  18. 18.⚡ Which tag holds JavaScript in a page? (a) <code> (b) <script> (c) <style> (d) <js>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <b>My best friend</b>
    line 3: <em>Our school trip
    (a) line 2 (b) line 1 (c) line 3
  20. 20.Which of these is margin? (a) a solid or dotted edge (b) space inside the border (c) the gap to other boxes (d) the gap round content
  21. 21.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  22. 22.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <header> (c) <footer> (d) <nav>
  23. 23.True or false: in <img>, src tells which image to load. (a) True (b) False
  24. 24.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) contact.html (b) https://example.com (c) about.html (d) Take the quiz
  25. 25.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <h2>Cricket is fun.</h2>
  26. 26.⚡ Which JavaScript word writes in the console? (a) if (b) for (c) let (d) console.log()
  27. 27.What is <input type="number"> for? (a) lets you tick many (b) is for an email address (c) sends the form (d) takes only numbers
  28. 28.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) opens web pages for us (d) sends pages over the net
  29. 29.🖌️ What colour are the letters?
    h2 {
      background-color: white;
      color: purple;
      text-align: right;
      font-size: 28px;
    }
    (a) purple (b) white (c) blue
  30. 30.🎯 Which element does the selector #main style? (a) <span id="logo"> (b) <span id="main"> (c) <span class="main"> (d) <p class="box">
  31. 31.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
  32. 32.True or false: <a> goes in the head. (a) False (b) True
  33. 33.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  35. 35.⚖️ What colour is the text of this element?
    <h1 class="red" id="end">Hi</h1>
    CSS:
    .red { color: yellow; }
    .red { color: purple; }
    (a) purple (b) black (c) yellow (d) white
  36. 36.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  37. 37.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) contact.html (c) https://example.com (d) Maths fun
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite
    line 2: <u>My pets</u>
    line 3: <p>Our school trip</p>
    (a) line 3 (b) line 2 (c) line 1
  39. 39.🔁 How many numbers does this code print?
    for (let i = 0; i < 8; i = i + 3) {
      console.log(i);
    }
  40. 40.🎯 What kind of selector is .menu? (a) an element selector (b) a class selector (c) an id selector

Answer key

  1. meet an online stranger
  2. 3
  3. The full moon
  4. 300
  5. Yes
  6. No
  7. </em>
  8. kite.png
  9. a web browser
  10. <tr>
  11. Maths fun
  12. 40
  13. #top
  14. script.js
  15. alert()
  16. the URL
  17. Our school bus
  18. <script>
  19. line 3
  20. the gap to other boxes
  21. True
  22. <footer>
  23. True
  24. about.html
  25. 2
  26. console.log()
  27. takes only numbers
  28. sends pages over the net
  29. purple
  30. <span id="main">
  31. makes it harder
  32. False
  33. a closing tag
  34. 4
  35. purple
  36. <h6>
  37. contact.html
  38. line 1
  39. 3
  40. a class selector

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