← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 22 · 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 times does this code print “Hello”?
    for (let i = 0; i <= 4; i++) {
      console.log("Hello");
    }
  2. 2.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>I love mangoes.</h2>
    <p>My pets</p>
    <h2>Our school trip</h2>
    <p>Our school trip</p>
  3. 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔁 How many numbers does this code print?
    for (let i = 0; i < 15; i = i + 3) {
      console.log(i);
    }
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue</p>
  7. 7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 210px;
      padding: 25px;
      border: 3px solid black;
      margin: 5px;
    }
  8. 8.True or false: .card is a class selector. (a) False (b) True
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.True or false: <h1> goes in the body. (a) False (b) True
  11. 11.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  12. 12.True or false: “add alt text to images” makes the page harder to use. (a) False (b) True
  13. 13.🌈 Which colour of light is strongest in rgb(217, 17, 15)? (a) green (b) red (c) blue
  14. 14.🔒 What does the lock (HTTPS) in the address bar mean? (a) the data is scrambled (b) the site is a game (c) the site is free (d) the site is fast
  15. 15.🌈 Which hex code is cyan? (a) #ff00ff (b) #ff0000 (c) #00ff00 (d) #00ffff
  16. 16.🧭 Which semantic tag holds extra side notes? (a) <footer> (b) <aside> (c) <nav> (d) <header>
  17. 17.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  18. 18.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  19. 19.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) script.js (c) style.css
  20. 20.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) My Hobbies (d) Match report
  22. 22.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) <b> (d) </b>
  23. 23.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  24. 24.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  25. 25.True or false: <input type="email"> takes only numbers. (a) True (b) False
  26. 26.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  27. 27.Which of these is a closing tag? (a) <h1> (b) <p> (c) <li> (d) </title>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  31. 31.⚖️ What colour is the text of this element?
    <h1 class="box" id="intro">Hi</h1>
    CSS:
    #intro { color: yellow; }
    #intro { color: purple; }
    (a) orange (b) yellow (c) red (d) purple
  32. 32.🖌️ How big is the text, in px?
    h1 {
      text-align: center;
      font-size: 36px;
      background-color: red;
      color: yellow;
    }
  33. 33.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake
  34. 34.True or false: CSS makes headings and lists. (a) True (b) False
  35. 35.📊 Where do <td> cells go? (a) inside a <p> (b) inside the <head> (c) inside a <tr> (d) inside a <li>
  36. 36.🔍 Which is the odd one out? (a) adds space around boxes (b) makes a form box (c) puts a picture on a page (d) makes headings and lists
  37. 37.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  38. 38.What does text-align do? (a) makes letters bigger (b) sets the letter colour (c) makes the text bold (d) centres a heading
  39. 39.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
  40. 40.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. 5
  2. 3
  3. an opening tag
  4. 5
  5. numbers
  6. 3
  7. 266
  8. True
  9. bullets
  10. True
  11. <ol>
  12. False
  13. red
  14. the data is scrambled
  15. #00ffff
  16. <aside>
  17. 6
  18. <ul>
  19. style.css
  20. src
  21. My Hobbies
  22. </b>
  23. alt
  24. <!--
  25. False
  26. True
  27. </title>
  28. 100
  29. 2
  30. 1
  31. purple
  32. 36
  33. cake.jpg
  34. False
  35. inside a <tr>
  36. adds space around boxes
  37. No
  38. centres a heading
  39. 124
  40. in the body

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