← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 93 · 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.🔍 One closing tag is missing. Which one?
    <h3>My best friend</h3>
    <h1>Rain today</h1>
    <b>I love mangoes.
    (a) </h1> (b) </h3> (c) </em> (d) </b>
  2. 2.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) <em/> (d) </em>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  4. 4.🎯 Which CSS selector matches this element?
    <p class="box" id="top">Hello</p>
    (a) p (b) .star (c) h1 (d) #box
  5. 5.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) kite.png (b) map.png (c) cake.jpg (d) A red kite
  6. 6.🌍 Which one shows the page to you? (a) the server (b) the browser (c) the URL (d) HTTPS
  7. 7.🚀 What is the home page file of a website usually called? (a) main.png (b) home.css (c) start.js (d) index.html
  8. 8.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Space Facts (b) Planets (c) Here is my best one. (d) body
  11. 11.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  12. 12.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  13. 13.True or false: “add alt text to images” helps everyone use the page. (a) False (b) True
  14. 14.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + 7;
    }
    console.log(total);
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
  16. 16.True or false: <header> sits at the very top. (a) True (b) False
  17. 17.True or false: HTML on its own cannot make tables. (a) False (b) True
  18. 18.🎨 Which tag connects an outside CSS file? (a) <css> (b) <link> (c) <a> (d) <img>
  19. 19.True or false: “write clear link text” makes the page harder to use. (a) False (b) True
  20. 20.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the later one (c) neither (d) the shorter one
  21. 21.True or false: <li> has a closing tag. (a) True (b) False
  22. 22.True or false: <article> holds a news story. (a) True (b) False
  23. 23.🧩 Which language makes a link? (a) JavaScript (b) HTML (c) CSS
  24. 24.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  25. 25.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  26. 26.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <footer> (b) <nav> (c) <header>
  27. 27.Which of these does JavaScript do? (a) shows a pop-up message (b) puts a picture on a page (c) sets colours and fonts (d) changes the text size
  28. 28.⚖️ What colour is the text of this element?
    <p class="box" id="hero">Hi</p>
    CSS:
    #hero { color: orange; }
    #hero { color: purple; }
    (a) black (b) white (c) orange (d) purple
  29. 29.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  30. 30.Which of these does CSS do? (a) reacts to a button click (b) shows a pop-up message (c) rounds box corners (d) counts down a timer
  31. 31.🛡️ Online: is it safe to think before you post? (a) safe (b) not safe
  32. 32.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Litchi</td><td>Guava</td><td>Banana</td></tr>
    </table>
  33. 33.📋 What number does the browser show next to “Litchi”?
    <ol start="4">
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  34. 34.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  35. 35.🔁 What does this code print?
    let age = 17;
    if (age > 19) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  36. 36.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) About us (c) href (d) art.html
  37. 37.🔍 Which is the odd one out? (a) colours code to help us (b) answers page requests (c) is where we type code (d) saves our .html files
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  39. 39.🎯 Which CSS selector matches this element?
    <h2 class="red" id="end">Hello</h2>
    (a) .box (b) .end (c) #hero (d) #end
  40. 40.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>

Answer key

  1. </b>
  2. </em>
  3. bus.jpg
  4. p
  5. kite.png
  6. the browser
  7. index.html
  8. on the browser tab
  9. 2
  10. Planets
  11. in the body
  12. 12
  13. True
  14. 21
  15. 1
  16. True
  17. False
  18. <link>
  19. False
  20. the later one
  21. True
  22. True
  23. HTML
  24. width
  25. a web browser
  26. <footer>
  27. shows a pop-up message
  28. purple
  29. starts a new line
  30. rounds box corners
  31. safe
  32. 8
  33. 6
  34. <li>
  35. child
  36. About us
  37. answers page requests
  38. 300
  39. #end
  40. 5

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