← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 864 · 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: body { margin: 0; } (a) style.css (b) index.html (c) script.js
  2. 2.What is <input type="checkbox"> for? (a) is for an email address (b) lets you tick many (c) sends the form (d) lets you pick only one
  3. 3.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  4. 4.True or false: the URL is the page’s address. (a) True (b) False
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) magenta (d) black
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts</b>
    line 2: <h1>The red kite
    line 3: <h3>Our school trip</h3>
    (a) line 1 (b) line 3 (c) line 2
  7. 7.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the console (d) in the address bar
  8. 8.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  9. 9.🌈 Which colour of light is strongest in rgb(240, 11, 28)? (a) green (b) red (c) blue
  10. 10.📊 In a table, which tag is a row? (a) <tb> (b) <td> (c) <tr> (d) <th>
  11. 11.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My best friend</h2>
    <h2>Good morning!</h2>
    <p>Rain today</p>
  12. 12.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 310px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) width (b) Our school bus (c) moon.png (d) The full moon
  15. 15.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Rain today</h2>
    <h2>Good morning!</h2>
    <p>Rain today</p>
    <p>My pets</p>
  16. 16.♿ Does this help everyone, or make the page harder to use: label every form box? (a) helps everyone (b) makes it harder
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) Thanks for visiting. (c) body (d) Match report
  18. 18.🔢 When you open a web page, which comes first: “the server sends files” or “DNS finds the server”? (a) the server sends files (b) DNS finds the server
  19. 19.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  20. 20.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: center;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  21. 21.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  22. 22.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  23. 23.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
  25. 25.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 4;
    console.log(x + y);
    (a) 24 (b) 6 (c) Error
  26. 26.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <p>My best friend</p>
    <p>Good morning!</p>
  27. 27.⚖️ What colour is the text of this element?
    <p class="red" id="main">Hi</p>
    CSS:
    #main { color: black; }
    #main { color: purple; }
    (a) orange (b) black (c) purple (d) yellow
  28. 28.🔍 One closing tag is missing. Which one?
    <h1>My best friend
    <small>My pets</small>
    <strong>Our school trip</strong>
    (a) </strong> (b) </h1> (c) </small> (d) </u>
  29. 29.🌈 Which hex code is black? (a) #ffffff (b) #00ffff (c) #ff00ff (d) #000000
  30. 30.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) Space Facts (d) Try this poha.
  31. 31.📦 In the box model, which part is space inside the border? (a) content (b) padding (c) border (d) margin
  32. 32.What does color do? (a) makes the text bold (b) colours behind the text (c) centres a heading (d) sets the letter colour
  33. 33.🎯 Which element does the selector #logo style? (a) <span id="end"> (b) <span class="logo"> (c) <p class="note"> (d) <span id="logo">
  34. 34.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      width: 300px;
      font-style: italic;
    }
  35. 35.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) script.js (c) index.html
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <!DOCTYPE html> (d) <html>
  37. 37.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) </head> (b) <body>
  38. 38.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 10; i++) {
      total = total + i;
    }
    console.log(total);
  39. 39.Which of these is a closing tag? (a) <title> (b) <p> (c) </title> (d) <body>
  40. 40.True or false: <caption> makes one data cell. (a) False (b) True

Answer key

  1. style.css
  2. lets you tick many
  3. 3
  4. True
  5. magenta
  6. line 2
  7. in the console
  8. opens it in a new tab
  9. red
  10. <tr>
  11. 2
  12. 80
  13. bullets
  14. The full moon
  15. 3
  16. helps everyone
  17. Match report
  18. DNS finds the server
  19. <h1>
  20. 10
  21. -->
  22. </h1>
  23. in the head
  24. 131
  25. 24
  26. 3
  27. purple
  28. </h1>
  29. #000000
  30. My drawings
  31. padding
  32. sets the letter colour
  33. <span id="logo">
  34. 2
  35. index.html
  36. <!DOCTYPE html>
  37. </head>
  38. 55
  39. </title>
  40. False

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