← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 732 · 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 semantic tag sits at the very top? (a) <header> (b) <main> (c) <footer> (d) <nav>
  2. 2.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
  3. 3.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) helps everyone (b) makes it harder
  4. 4.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  5. 5.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 8px;
      }
    }
  6. 6.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Creative Sheet System (d) Cascading Style Sheets
  7. 7.True or false: padding is the text or picture. (a) False (b) True
  8. 8.✍️ In color: blue; which part is the property? (a) blue (b) color (c) : (d) ;
  9. 9.🖌️ What colour is behind the letters?
    h2 {
      font-size: 36px;
      color: red;
      text-align: left;
      background-color: purple;
    }
    (a) purple (b) white (c) red
  10. 10.💬 Does the browser show comments on the page? (a) Yes (b) No
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  12. 12.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows line numbers (d) opens web pages for us
  13. 13.Which of these does JavaScript do? (a) puts a picture on a page (b) makes a link (c) shows a pop-up message (d) lays out the page
  14. 14.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <tr> (c) inside the <head> (d) inside a <li>
  15. 15.True or false: the browser scrambles data on its way. (a) True (b) False
  16. 16.True or false: <title> has a closing tag. (a) True (b) False
  17. 17.🔁 How many times does this code print “Hello”?
    for (let i = 0; i <= 2; i++) {
      console.log("Hello");
    }
  18. 18.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) art.html (b) https://example.com (c) Visit the site (d) maths.html
  19. 19.🖌️ What colour is behind the letters?
    li {
      text-align: center;
      color: white;
      background-color: black;
      font-size: 40px;
    }
    (a) black (b) white (c) orange
  20. 20.🛡️ Online: is it safe to think before you post? (a) not safe (b) safe
  21. 21.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <h1> (c) <table> (d) <img>
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) index.html (c) Cricket Club (d) Thanks for visiting.
  23. 23.True or false: HTML on its own can pick a random number. (a) True (b) False
  24. 24.⚡ What number does this code print?
    let a = 4;
    let b = 6;
    console.log(a * b);
  25. 25.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) href (d) Maths fun
  26. 26.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) <u> (d) </u>
  27. 27.True or false: HTML on its own cannot make tables. (a) False (b) True
  28. 28.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
  29. 29.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 10; i++) {
      total = total + i;
    }
    console.log(total);
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) A happy dog (b) width (c) The full moon (d) dog.jpg
  32. 32.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="big" id="end">Hi</h2>
    CSS:
    .big { color: black; }
    #end { color: green; }
    h2 { color: purple; }
    (a) blue (b) purple (c) green (d) black
  34. 34.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  35. 35.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) for (d) else
  36. 36.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  37. 37.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <title>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.
    line 2: <small>Rain today</small>
    line 3: <h2>Fun facts</h2>
    (a) line 3 (b) line 2 (c) line 1
  39. 39.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  40. 40.✍️ Which sign ends each CSS declaration? (a) : (b) ; (c) , (d) .

Answer key

  1. <header>
  2. screen-reader users
  3. makes it harder
  4. a web server
  5. 8
  6. Cascading Style Sheets
  7. False
  8. color
  9. purple
  10. No
  11. a slash /
  12. opens web pages for us
  13. shows a pop-up message
  14. inside a <tr>
  15. False
  16. True
  17. 3
  18. https://example.com
  19. black
  20. safe
  21. <meta charset="utf-8">
  22. Cricket Club
  23. False
  24. 24
  25. Visit the site
  26. </u>
  27. False
  28. </h2>
  29. in the body
  30. 55
  31. A happy dog
  32. True
  33. green
  34. True
  35. for
  36. a paragraph
  37. <title>
  38. line 1
  39. to leave notes
  40. ;

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