← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 952 · 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.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
  2. 2.🔁 What does this code print?
    let score = 22;
    if (score >= 26) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  3. 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  4. 4.⚡ What number does this code print?
    let apples = 29;
    apples = apples + 8;
    apples = apples - 20;
    console.log(apples);
  5. 5.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) white (d) red
  6. 6.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
  7. 7.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) for (d) else
  8. 8.True or false: padding is space inside the border. (a) True (b) False
  9. 9.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  10. 10.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <h2>My best friend</h2>
    line 2: <i>Fun facts</i>
    line 3: <h3>The red kite
    (a) line 3 (b) line 2 (c) line 1
  12. 12.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) quiz.html (b) Visit the site (c) href (d) Contact us
  13. 13.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
  15. 15.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Hello, world!</h4>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  16. 16.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 140px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  17. 17.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <h3>The red kite
    <small>My pets</small>
    (a) </h3> (b) </small> (c) </b> (d) </em>
  18. 18.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
  19. 19.🎯 How many elements on a page should have the same id? (a) 1 (b) any number (c) 2 (d) 5
  20. 20.📊 Which tag gives the table a title? (a) <th> (b) <caption> (c) <td> (d) <table>
  21. 21.🌈 Which colour is #000000? (a) magenta (b) red (c) white (d) black
  22. 22.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in a new tab (b) in the same tab
  23. 23.🎯 Which element does the selector li style? (a) <p id="hero"> (b) <li class="box"> (c) <div> (d) <span class="box">
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  25. 25.🎯 Which CSS selector matches this element?
    <div class="note" id="intro">Hello</div>
    (a) .intro (b) #intro (c) span (d) #note
  26. 26.True or false: HTTPS asks for a web page. (a) False (b) True
  27. 27.True or false: in <img>, src describes the picture. (a) True (b) False
  28. 28.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
  29. 29.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
  30. 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
  31. 31.🖌️ What colour are the letters?
    h2 {
      color: orange;
      font-size: 12px;
      background-color: green;
      text-align: right;
    }
    (a) orange (b) yellow (c) green
  32. 32.Which of these is not safe to do online? (a) check for https first (b) share your password (c) use a strong password (d) use a nickname in games
  33. 33.Which colour pair is easy to read? (a) yellow on white (b) black on white (c) light grey on white (d) blue on purple
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) kite.png (b) Map of India (c) width (d) A red kite
  35. 35.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <u> (d) <\u>
  36. 36.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Banana</td><td>Banana</td><td>Grapes</td></tr>
    </table>
  37. 37.🌈 Which colour of light is strongest in rgb(5, 173, 25)? (a) red (b) blue (c) green
  38. 38.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.True or false: in <img>, src sets how wide it is. (a) False (b) True
  40. 40.⚡ What does this code show?
    let name = "Arjun";
    alert("Hello, " + name + "!");
    (a) Arjun (b) Hello, Arjun! (c) Hello, name! (d) name

Answer key

  1. 1
  2. Play again
  3. <a>
  4. 17
  5. bright green
  6. 2
  7. for
  8. True
  9. width
  10. 3
  11. line 3
  12. Contact us
  13. a closing tag
  14. text with links
  15. 2
  16. 20
  17. </h3>
  18. easy to read
  19. 1
  20. <caption>
  21. black
  22. in the same tab
  23. <li class="box">
  24. 1
  25. #intro
  26. False
  27. False
  28. safe
  29. 16
  30. Yes
  31. orange
  32. share your password
  33. black on white
  34. A red kite
  35. </u>
  36. 4
  37. green
  38. an opening tag
  39. False
  40. Hello, Arjun!

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