← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 964 · 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.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
  2. 2.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <title> (d) <hr>
  3. 3.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  4. 4.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png
  5. 5.✍️ Which property is set to red in this rule?
    h2 {
      font-size: 20px;
      width: 300px;
      padding: 8px;
      color: red;
    }
    (a) font-size (b) color (c) red (d) text-align
  6. 6.⚡ Which JavaScript word shows a pop-up box? (a) for (b) let (c) if (d) alert()
  7. 7.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser asks it (b) the browser shows it (c) the server sends files (d) DNS finds the server
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) Map of India (b) width (c) A red kite (d) kite.png
  9. 9.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
  10. 10.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Mango#Kite29! (d) 111111
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <i>Good morning!</i>
    line 2: <h1>Hello, world!</h1>
    line 3: <h2>Cricket is fun.
    (a) line 2 (b) line 1 (c) line 3
  13. 13.Which of these is an opening tag? (a) </title> (b) <body> (c) </li> (d) </b>
  14. 14.🌍 Which one asks for a web page? (a) HTTPS (b) the URL (c) the server (d) the browser
  15. 15.⚡ What number does this code print?
    let a = 51;
    let b = 12;
    console.log(a - b);
  16. 16.🌈 In #000069 the blue part is the hex number 69. What is it as a normal number?
  17. 17.🌍 What is the path in this URL?
    http://www.example.com/index.html
    (a) /index.html (b) http (c) www.example.com (d) /art/gallery.html
  18. 18.⚡ A JavaScript file usually ends with which extension? (a) .jpg (b) .html (c) .css (d) .js
  19. 19.🛡️ Online: is it safe to download from pop-ups? (a) not safe (b) safe
  20. 20.🌈 Which colour is #ffff00? (a) cyan (b) blue (c) red (d) yellow
  21. 21.🌈 In #000086 the blue part is the hex number 86. What is it as a normal number?
  22. 22.🔁 How many times does this code print “Hello”?
    for (let i = 3; i <= 5; i++) {
      console.log("Hello");
    }
  23. 23.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts</b>
    line 2: <h3>The red kite
    line 3: <strong>I love mangoes.</strong>
    (a) line 1 (b) line 2 (c) line 3
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
  26. 26.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My best friend</h2>
    <p>Good morning!</p>
  27. 27.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      border: 2px solid;
    }
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip
    line 2: <small>I love mangoes.</small>
    line 3: <h2>Cricket is fun.</h2>
    (a) line 1 (b) line 2 (c) line 3
  29. 29.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
  30. 30.⚖️ What colour is the text of this element?
    <p class="menu" id="end">Hi</p>
    CSS:
    p { color: red; }
    .menu { color: green; }
    (a) red (b) green (c) black (d) white
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  32. 32.🔁 When does the else part run? (a) always (b) when if is false (c) never (d) when if is true
  33. 33.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) shows pages from the web (d) is where we type code
  34. 34.True or false: <header> sits at the bottom. (a) True (b) False
  35. 35.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  36. 36.⚖️ What colour is the text of this element?
    <h1 class="note" id="main">Hi</h1>
    CSS:
    .note { color: blue; }
    .note { color: red; }
    (a) blue (b) red (c) white (d) orange
  37. 37.Which of these is a strong password? (a) qwerty (b) Blue@Tiger_74 (c) 111111 (d) iloveyou
  38. 38.🚀 Which file should this code go in: alert(score); (a) style.css (b) index.html (c) script.js
  39. 39.📦 In the box model, which part is space outside the border? (a) margin (b) padding (c) content (d) border
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <em>Fun facts
    line 2: <h1>I love mangoes.</h1>
    line 3: <h3>Our school trip</h3>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. to leave notes
  2. <label>
  3. a slash /
  4. tiger.jpg
  5. color
  6. alert()
  7. DNS finds the server
  8. A red kite
  9. the body
  10. 111111
  11. numbers
  12. line 3
  13. <body>
  14. the browser
  15. 39
  16. 105
  17. /index.html
  18. .js
  19. not safe
  20. yellow
  21. 134
  22. 3
  23. bullets
  24. line 2
  25. 2
  26. 2
  27. 1
  28. line 1
  29. an attribute
  30. green
  31. 2
  32. when if is false
  33. is where we type code
  34. False
  35. <h1>
  36. red
  37. Blue@Tiger_74
  38. script.js
  39. margin
  40. line 1

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