← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 367 · 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.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
  2. 2.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
  3. 3.True or false: #logo is an id selector. (a) True (b) False
  4. 4.🖌️ What colour are the letters?
    li {
      color: white;
      text-align: left;
      background-color: blue;
      font-size: 20px;
    }
    (a) blue (b) green (c) white
  5. 5.✍️ Which property is set to italic in this rule?
    body {
      font-size: 20px;
      width: 300px;
      font-style: italic;
    }
    (a) color (b) font-style (c) italic (d) font-size
  6. 6.🔍 Which is the odd one out? (a) makes a form box (b) adds space around boxes (c) makes headings and lists (d) puts a picture on a page
  7. 7.Which of these does JavaScript do? (a) reacts to a button click (b) makes a link (c) puts a picture on a page (d) gives the page structure
  8. 8.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A tiger asleep (b) map.png (c) kite.png (d) tiger.jpg
  9. 9.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Papaya
      <input type="checkbox" name="fruit"> Mango
      <input type="checkbox" name="fruit"> Litchi
      <input type="checkbox" name="fruit"> Guava
      <input type="checkbox" name="fruit"> Banana
    </form>
  10. 10.Which of these does HTML do? (a) makes a link (b) shows a pop-up message (c) adds space around boxes (d) changes the page live
  11. 11.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 4; i++) {
      console.log("Hi");
    }
  12. 12.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 150px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  13. 13.📝 Which tag makes a big box for many lines of text? (a) <input> (b) <textarea> (c) <p> (d) <br>
  14. 14.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  15. 15.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <h3>Fun facts</h3>
    <h2>My best friend</h2>
  16. 16.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/games/chess.html
    (a) Yes (b) No
  17. 17.True or false: HTML on its own can show paragraphs. (a) True (b) False
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) cyan (d) black
  20. 20.True or false: HTML on its own can count button clicks. (a) True (b) False
  21. 21.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  23. 23.⚡ What does JavaScript add to a web page? (a) actions and changes (b) the domain name (c) the page title (d) only colours
  24. 24.Which colour pair is easy to read? (a) blue on purple (b) black on white (c) light grey on white (d) red on green
  25. 25.📦 In the box model, which part is the gap to other boxes? (a) margin (b) border (c) content (d) padding
  26. 26.What is <input type="submit"> for? (a) hides what you type (b) lets you tick many (c) lets you pick only one (d) sends the form
  27. 27.Which of these is safe to do online? (a) post your home address (b) share your OTP (c) tell a trusted adult (d) share your password
  28. 28.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
  29. 29.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Banana</td><td>Guava</td></tr>
      <tr><td>Guava</td><td>Litchi</td></tr>
    </table>
  30. 30.🎯 Which element does the selector .box style? (a) <li id="box"> (b) <li class="box"> (c) <div class="menu"> (d) <li class="star">
  31. 31.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
  32. 32.Which of these is a closing tag? (a) <p> (b) <b> (c) </body> (d) <h1>
  33. 33.🎯 How many elements on a page should have the same id? (a) 1 (b) 2 (c) any number (d) 5
  34. 34.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Red
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Orange
      <input type="radio" name="colour"> Blue
    </form>
  35. 35.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
  36. 36.🧭 Which semantic tag sits at the very top? (a) <article> (b) <main> (c) <header> (d) <nav>
  37. 37.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  38. 38.Which of these has a closing tag? (a) <br> (b) <p> (c) <input> (d) <meta>
  39. 39.📱 What does a media query check? (a) the battery level (b) the page title (c) the screen width (d) the time of day
  40. 40.True or false: HTML checks a quiz answer. (a) True (b) False

Answer key

  1. element
  2. 4
  3. True
  4. white
  5. font-style
  6. adds space around boxes
  7. reacts to a button click
  8. tiger.jpg
  9. 5
  10. makes a link
  11. 3
  12. 30
  13. <textarea>
  14. <h1>
  15. 4
  16. Yes
  17. True
  18. A red kite
  19. black
  20. False
  21. href
  22. Yes
  23. actions and changes
  24. black on white
  25. margin
  26. sends the form
  27. tell a trusted adult
  28. helps everyone
  29. 2
  30. <li class="box">
  31. style.css
  32. </body>
  33. 1
  34. 1
  35. an attribute
  36. <header>
  37. True
  38. <p>
  39. the screen width
  40. False

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