← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 39 · 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.🔁 How many numbers does this code print?
    for (let i = 0; i < 17; i = i + 4) {
      console.log(i);
    }
  2. 2.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Visit the site (b) contact.html (c) href (d) Maths fun
  3. 3.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 300px;
      padding: 25px;
      border: 1px solid black;
      margin: 5px;
    }
  4. 4.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <p> (d) <img>
  5. 5.Which of these is a strong password? (a) abcd1234 (b) iloveyou (c) 111111 (d) Chai$Cup_19x
  6. 6.Which of these is an empty tag? (a) <title> (b) <input> (c) <p> (d) <b>
  7. 7.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <h2>My pets</h2>
    <h2>Good morning!</h2>
    <p>My pets</p>
  8. 8.🖌️ What colour is behind the letters?
    h1 {
      font-size: 16px;
      color: red;
      text-align: left;
      background-color: orange;
    }
    (a) green (b) red (c) orange
  9. 9.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  10. 10.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
  11. 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  12. 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  13. 13.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  14. 14.Which of these is true of <article>? (a) holds one blog post (b) holds the logo and title (c) holds copyright notes (d) is the page’s key part
  15. 15.True or false: score = score + 1; goes in style.css. (a) True (b) False
  16. 16.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) index.html (c) style.css
  17. 17.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  18. 18.True or false: padding is space inside the border. (a) True (b) False
  19. 19.⚡ Where does console.log() show its output? (a) in the console (b) in the address bar (c) on the title bar (d) on the printer
  20. 20.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  21. 21.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  22. 22.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  23. 23.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  24. 24.📊 How many cells does this table have in all?
    <table>
      <tr><td>Mango</td><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Papaya</td><td>Orange</td><td>Orange</td></tr>
    </table>
  25. 25.📝 Which input type picks a day? (a) password (b) checkbox (c) radio (d) date
  26. 26.🛡️ Online: is it safe to use a nickname in games? (a) not safe (b) safe
  27. 27.🚀 Which file should this code go in: #top { color: blue; } (a) style.css (b) index.html (c) script.js
  28. 28.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 180px;
      padding: 30px;
      border: 2px solid black;
      margin: 20px;
    }
  29. 29.What does font-weight do? (a) centres a heading (b) makes the text bold (c) colours behind the text (d) picks the font style
  30. 30.⚡ What number does this code print?
    let marks = 24;
    marks = marks + 2;
    marks = marks - 23;
    console.log(marks);
  31. 31.🎨 One CSS file can style how many pages? (a) only one image (b) no pages (c) only one word (d) many pages
  32. 32.⚡ Which JavaScript word makes a new variable? (a) let (b) for (c) console.log() (d) alert()
  33. 33.True or false: the browser asks for a web page. (a) False (b) True
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) I love mangoes.
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) The full moon (b) dog.jpg (c) width (d) A happy dog
  36. 36.📊 Which tag makes one data cell? (a) <tr> (b) <td> (c) <caption> (d) <table>
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  39. 39.True or false: CSS adds space around boxes. (a) False (b) True
  40. 40.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>

Answer key

  1. 5
  2. Visit the site
  3. 362
  4. <meta charset="utf-8">
  5. Chai$Cup_19x
  6. <input>
  7. 2
  8. orange
  9. in a new tab
  10. screen-reader users
  11. src
  12. No
  13. <h5>
  14. holds one blog post
  15. False
  16. index.html
  17. <a href="about.html">
  18. True
  19. in the console
  20. in a new tab
  21. to describe the image
  22. <ul>
  23. <h6>
  24. 6
  25. date
  26. safe
  27. style.css
  28. 284
  29. makes the text bold
  30. 3
  31. many pages
  32. let
  33. True
  34. Fun facts
  35. A happy dog
  36. <td>
  37. 1
  38. 250
  39. True
  40. <ol>

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