← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 987 · 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 address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) Maths fun (b) quiz.html (c) art.html (d) news.html
  2. 2.🔒 Is the connection to this address scrambled (encrypted)?
    http://www.example.net/art/gallery.html
    (a) No (b) Yes
  3. 3.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 4;
    console.log(x + y);
    (a) 12 (b) Error (c) 84
  4. 4.True or false: <li> has a closing tag. (a) False (b) True
  5. 5.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it adds pictures (d) it makes text red
  6. 6.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Guava</td><td>Mango</td></tr>
    </table>
  7. 7.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 270px;
      padding: 10px;
      border: 4px solid black;
      margin: 0px;
    }
  8. 8.🧭 Which semantic tag holds the menu of links? (a) <header> (b) <nav> (c) <footer> (d) <main>
  9. 9.🌍 What do we call the computer that stores a website? (a) a server (b) a mouse (c) a printer (d) a keyboard
  10. 10.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog
  12. 12.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) shows line numbers (d) colours code to help us
  13. 13.🌍 What is the path in this URL?
    http://learn.example.com/art/gallery.html
    (a) /art/gallery.html (b) http (c) /news/today.html (d) learn.example.com
  14. 14.True or false: HTML adds space around boxes. (a) True (b) False
  15. 15.🧩 Which language puts a picture on a page? (a) CSS (b) HTML (c) JavaScript
  16. 16.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 18px;
      }
    }
  17. 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  18. 18.✍️ What is the selector in this CSS rule?
    li {
      background-color: yellow;
      margin: 10px;
    }
    (a) body (b) background-color (c) 10px (d) li
  19. 19.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <h3>My best friend</h3>
  20. 20.⚡ What number does this code print?
    let a = 50;
    let b = 7;
    console.log(a + b);
  21. 21.🎯 Which CSS selector matches this element?
    <h1 class="menu" id="intro">Hello</h1>
    (a) #main (b) #menu (c) h1 (d) h2
  22. 22.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
  23. 23.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.True or false: a code editor colours code to help us. (a) True (b) False
  25. 25.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  27. 27.What is <input type="password"> for? (a) is for an email address (b) lets you pick only one (c) lets you tick many (d) hides what you type
  28. 28.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) only the printer (d) nobody
  29. 29.🛡️ Online: is it safe to use a nickname in games? (a) safe (b) not safe
  30. 30.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <table> (d) <link rel="stylesheet">
  31. 31.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
  32. 32.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
  33. 33.💪 Which flexbox property sets space between boxes? (a) flex-direction (b) display: flex (c) gap (d) justify-content
  34. 34.Which of these is true of a web server? (a) opens web pages for us (b) sends pages over the net (c) colours code to help us (d) shows line numbers
  35. 35.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 340px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  36. 36.What does font-weight do? (a) sets the letter colour (b) makes letters bigger (c) colours behind the text (d) makes the text bold
  37. 37.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h3>
    (a) Yes (b) No
  38. 38.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.🖌️ Where does the text sit on its line?
    p {
      background-color: blue;
      text-align: right;
      color: green;
      font-size: 36px;
    }
    (a) on the left (b) on the right (c) in the middle
  40. 40.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #ff00ff

Answer key

  1. art.html
  2. No
  3. 84
  4. True
  5. it tells its meaning
  6. 2
  7. 298
  8. <nav>
  9. a server
  10. <h1>
  11. Birthday cake
  12. sends pages over the net
  13. /art/gallery.html
  14. False
  15. HTML
  16. 18
  17. No
  18. li
  19. 2
  20. 57
  21. h1
  22. <h2>
  23. an empty tag
  24. True
  25. <a>
  26. 4
  27. hides what you type
  28. screen-reader users
  29. safe
  30. <table>
  31. 18
  32. alt
  33. gap
  34. sends pages over the net
  35. 60
  36. makes the text bold
  37. Yes
  38. an empty tag
  39. on the right
  40. #ff0000

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