← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 941 · 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.True or false: HTML puts a picture on a page. (a) False (b) True
  2. 2.🎯 Which CSS selector matches this element?
    <li class="big" id="top">Hello</li>
    (a) .red (b) div (c) #intro (d) li
  3. 3.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the head (d) in the footer
  4. 4.🌍 Which one sends the page back? (a) the URL (b) the browser (c) HTTPS (d) the server
  5. 5.📊 Which tag makes one table row? (a) <td> (b) <table> (c) <tr> (d) <caption>
  6. 6.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  7. 7.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  8. 8.⚖️ What colour is the text of this element?
    <p class="box" id="intro">Hi</p>
    CSS:
    p { color: blue; }
    p { color: yellow; }
    (a) blue (b) orange (c) yellow (d) purple
  9. 9.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width
  11. 11.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  12. 12.🎯 What kind of selector is h1? (a) an element selector (b) a class selector (c) an id selector
  13. 13.🌍 What is the domain name in this URL?
    https://kids.example.org/art/gallery.html
    (a) kids.example.org (b) /art/gallery.html (c) https (d) school.example.in
  14. 14.💬 Does the browser show comments on the page? (a) No (b) Yes
  15. 15.Which of these is a closing tag? (a) <body> (b) <p> (c) <title> (d) </li>
  16. 16.🔒 Is the connection to this address scrambled (encrypted)?
    http://school.example.in/art/gallery.html
    (a) Yes (b) No
  17. 17.🌍 What is the protocol in this URL?
    https://school.example.in/about.html
    (a) https (b) school.example.in (c) http (d) /about.html
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  19. 19.📝 What does a password box show instead of letters? (a) dots (b) emojis (c) numbers (d) capital letters
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <head> (d) <!DOCTYPE html>
  21. 21.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) prints i (d) takes 1 from i
  22. 22.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 3;
    console.log(x + y);
    (a) 23 (b) 5 (c) Error
  23. 23.🛡️ Online: is it safe to share your OTP? (a) safe (b) not safe
  24. 24.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <li> (c) inside the <head> (d) inside a <tr>
  25. 25.Which of these does HTML do? (a) rounds box corners (b) adds space around boxes (c) makes a form box (d) lays out the page
  26. 26.⚡ What does JavaScript add to a web page? (a) only colours (b) the page title (c) actions and changes (d) the domain name
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  28. 28.True or false: in <img>, width shows if the image fails. (a) True (b) False
  29. 29.🧭 Which semantic tag sits at the very top? (a) <article> (b) <header> (c) <footer> (d) <nav>
  30. 30.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  31. 31.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  32. 32.✍️ What is the selector in this CSS rule?
    #top {
      font-size: 20px;
      margin: 10px;
      font-weight: bold;
    }
    (a) 10px (b) #top (c) font-size (d) li
  33. 33.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  34. 34.⚡ Which JavaScript word writes in the console? (a) let (b) alert() (c) console.log() (d) for
  35. 35.✍️ What is the selector in this CSS rule?
    body {
      background-color: yellow;
      text-align: center;
      font-style: italic;
    }
    (a) center (b) background-color (c) body (d) .box
  36. 36.Which of these has a closing tag? (a) <meta> (b) <p> (c) <img> (d) <input>
  37. 37.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) width (d) src
  38. 38.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Papaya</td><td>Mango</td></tr>
      <tr><td>Mango</td><td>Banana</td></tr>
    </table>
  39. 39.🔒 Is the connection to this address scrambled (encrypted)?
    https://learn.example.com/maths/tables.html
    (a) Yes (b) No
  40. 40.🔁 What does this code print?
    let marks = 7;
    if (marks >= 17) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass

Answer key

  1. True
  2. li
  3. in the head
  4. the server
  5. <tr>
  6. <a href="about.html">
  7. <
  8. yellow
  9. a closing tag
  10. Birthday cake
  11. 1
  12. an element selector
  13. kids.example.org
  14. No
  15. </li>
  16. No
  17. https
  18. The full moon
  19. dots
  20. <!DOCTYPE html>
  21. adds 1 to i
  22. 23
  23. not safe
  24. inside a <tr>
  25. makes a form box
  26. actions and changes
  27. Yes
  28. False
  29. <header>
  30. opens it in a new tab
  31. <h6>
  32. #top
  33. red
  34. console.log()
  35. body
  36. <p>
  37. alt
  38. 4
  39. Yes
  40. Try again

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