← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 292 · 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 margin? (a) space outside the border (b) the text or picture (c) the line round the box (d) the gap round content
  2. 2.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
  3. 3.🔁 What does this code print?
    let temp = 49;
    if (temp >= 28) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  4. 4.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
  5. 5.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) script.js (c) style.css (d) notes.txt
  6. 6.🎯 Which CSS selector matches this element?
    <li class="star" id="intro">Hello</li>
    (a) #intro (b) #main (c) .menu (d) .intro
  7. 7.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) Rain today (b) Our school trip (c) Fun facts (d) My pets
  8. 8.📊 Which tag makes a heading cell? (a) <tr> (b) <table> (c) <td> (d) <th>
  9. 9.Which of these is a closing tag? (a) <title> (b) <b> (c) <body> (d) </title>
  10. 10.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 150px;
      padding: 15px;
      border: 3px solid black;
      margin: 10px;
    }
  11. 11.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
  12. 12.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Guava</td><td>Guava</td><td>Jamun</td></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Orange</td></tr>
      <tr><td>Orange</td><td>Guava</td><td>Orange</td></tr>
    </table>
  13. 13.True or false: “tiny grey text” helps everyone use the page. (a) True (b) False
  14. 14.🔁 How many times does this code print “Hello”?
    for (let i = 3; i < 6; i++) {
      console.log("Hello");
    }
  15. 15.🌍 What finds the server for a domain name like example.com? (a) CSS (b) alt (c) DNS (d) HTML
  16. 16.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h2>
    (a) Yes (b) No
  17. 17.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  18. 18.📝 Which input type lets you tick many? (a) radio (b) checkbox (c) text (d) password
  19. 19.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Colourful Site Styles (c) Cascading Style Sheets (d) Creative Sheet System
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  21. 21.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  22. 22.Which of these does HTML do? (a) sets colours and fonts (b) adds space around boxes (c) gives the page structure (d) shows a pop-up message
  23. 23.🌍 What is the path in this URL?
    https://learn.example.com/about.html
    (a) learn.example.com (b) /maths/tables.html (c) https (d) /about.html
  24. 24.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Orange</td><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Jamun</td><td>Jamun</td><td>Grapes</td></tr>
    </table>
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Our school trip</p>
    <p>Rain today</p>
  26. 26.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h2> → <h3>
    (a) Yes (b) No
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
  28. 28.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <h3/> (c) <\h3> (d) </h3>
  29. 29.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Our school trip</p>
  30. 30.True or false: HTML on its own cannot make headings. (a) False (b) True
  31. 31.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes a form box (c) makes headings and lists (d) adds space around boxes
  32. 32.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  33. 33.🎨 A CSS file usually ends with which extension? (a) .html (b) .css (c) .js (d) .png
  34. 34.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  35. 35.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 9;
    console.log(x + y);
    (a) 10 (b) Error (c) 19
  36. 36.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
  38. 38.True or false: HTML on its own can keep a high score. (a) True (b) False
  39. 39.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <em>Hello, world!
    (a) </em> (b) </u> (c) </p> (d) </h1>
  40. 40.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>

Answer key

  1. space outside the border
  2. not safe
  3. Hot
  4. src
  5. script.js
  6. #intro
  7. Our school trip
  8. <th>
  9. </title>
  10. 206
  11. 3
  12. 12
  13. False
  14. 3
  15. DNS
  16. Yes
  17. opens it in a new tab
  18. checkbox
  19. Cascading Style Sheets
  20. 255
  21. <li>
  22. gives the page structure
  23. /about.html
  24. 3
  25. 1
  26. No
  27. 1
  28. </h3>
  29. 3
  30. False
  31. adds space around boxes
  32. <!DOCTYPE html>
  33. .css
  34. <h6>
  35. 19
  36. <h5>
  37. 1
  38. False
  39. </em>
  40. <a>

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