← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 347 · 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 of these is true of <nav>? (a) sits at the very top (b) holds the menu of links (c) holds extra side notes (d) sits at the bottom
  2. 2.⚡ What does this code show?
    let name = "Riya";
    console.log("Welcome, " + name + "!");
    (a) Riya (b) name (c) Welcome, Riya! (d) Welcome, name!
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  4. 4.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) index.html (c) script.js
  5. 5.💪 Which justify-content value packs boxes at the end? (a) space-between (b) flex-start (c) flex-end (d) center
  6. 6.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <h4>Rain today</h4>
  7. 7.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.🎯 Which element does the selector #intro style? (a) <p class="intro"> (b) <h1 class="note"> (c) <p id="intro"> (d) <p id="main">
  9. 9.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) bus.jpg (b) Our school bus (c) tiger.jpg (d) fort.jpg
  10. 10.📦 In the box model, which part is the gap round content? (a) border (b) margin (c) content (d) padding
  11. 11.⚡ What number does this code print?
    let a = 58;
    let b = 7;
    console.log(a + b);
  12. 12.🔍 Which is the odd one out? (a) makes a form box (b) makes headings and lists (c) reacts to a button click (d) makes a link
  13. 13.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  14. 14.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  15. 15.🎯 Which element does the selector #hero style? (a) <li id="top"> (b) <li class="hero"> (c) <li id="hero"> (d) <div class="note">
  16. 16.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="email">
      <input type="checkbox">
      <input type="password">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  17. 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  18. 18.⚡ What number does this code print?
    let coins = 15;
    coins = coins + 19;
    coins = coins - 23;
    console.log(coins);
  19. 19.📋 What number does the browser show next to “Litchi”?
    <ol start="6">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  20. 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  21. 21.Which of these goes in the head? (a) <p> (b) <title> (c) <a> (d) <img>
  22. 22.🌈 Which colour of light is strongest in rgb(13, 198, 122)? (a) blue (b) green (c) red
  23. 23.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) style.css (c) script.js
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="400">
  28. 28.True or false: <table> holds the whole table. (a) False (b) True
  29. 29.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  30. 30.✍️ What value is given to width in this rule?
    body {
      border: 2px solid;
      width: 300px;
      background-color: yellow;
    }
    (a) width (b) italic (c) red (d) 300px
  31. 31.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A tiger asleep (b) tiger.jpg (c) map.png (d) kite.png
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) black (d) bright green
  33. 33.🔁 Which word runs code only when something is true? (a) log (b) for (c) let (d) if
  34. 34.True or false: <table> gives the table a title. (a) False (b) True
  35. 35.🖌️ What colour is behind the letters?
    h2 {
      color: purple;
      background-color: orange;
      text-align: right;
      font-size: 32px;
    }
    (a) purple (b) black (c) orange
  36. 36.True or false: to log out on shared PCs is not safe. (a) False (b) True
  37. 37.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  38. 38.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  40. 40.🔁 How many times does this code print “Welcome”?
    for (let i = 1; i < 7; i++) {
      console.log("Welcome");
    }

Answer key

  1. holds the menu of links
  2. Welcome, Riya!
  3. A tiger asleep
  4. script.js
  5. flex-end
  6. 2
  7. has a closing tag
  8. <p id="intro">
  9. bus.jpg
  10. padding
  11. 65
  12. reacts to a button click
  13. <li>
  14. numbers
  15. <li id="hero">
  16. 6
  17. <img>
  18. 11
  19. 7
  20. opens it in a new tab
  21. <title>
  22. green
  23. index.html
  24. 400
  25. 2
  26. 6
  27. 400
  28. True
  29. <ul>
  30. 300px
  31. tiger.jpg
  32. bright green
  33. if
  34. False
  35. orange
  36. False
  37. 129
  38. <ul>
  39. 50
  40. 6

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