← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 123 · 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 text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) Our school trip (b) The red kite (c) Rain today (d) Cricket is fun.
  2. 2.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  3. 3.Which of these is safe to do online? (a) download from pop-ups (b) use a nickname in games (c) type a password on http (d) click prize links
  4. 4.🔁 How many times does this code print “Hi”?
    for (let i = 3; i < 9; i++) {
      console.log("Hi");
    }
  5. 5.✍️ What value is given to font-weight in this rule?
    h2 {
      font-weight: bold;
      text-align: center;
      font-style: italic;
      border: 2px solid;
    }
    (a) 2px solid (b) bold (c) 300px (d) font-weight
  6. 6.True or false: the URL is the page’s address. (a) False (b) True
  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: 280px;
      padding: 20px;
      border: 3px solid black;
      margin: 5px;
    }
  8. 8.📊 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>Litchi</td><td>Grapes</td></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Guava</td><td>Mango</td></tr>
    </table>
  9. 9.Which of these is the content? (a) the gap round content (b) the text or picture (c) the line round the box (d) the gap to other boxes
  10. 10.⚡ Which JavaScript word writes in the console? (a) let (b) console.log() (c) alert() (d) if
  11. 11.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      font-weight: bold;
      width: 300px;
    }
  12. 12.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  13. 13.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>I love mangoes.</h4>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
  14. 14.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  15. 15.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Blue@Tiger_74 (d) 111111
  16. 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
  18. 18.Which of these is not safe to do online? (a) ask before downloading (b) tell a trusted adult (c) type a password on http (d) use a strong password
  19. 19.🧭 Which semantic tag holds extra side notes? (a) <header> (b) <footer> (c) <aside> (d) <nav>
  20. 20.True or false: in <img>, height tells which image to load. (a) False (b) True
  21. 21.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </head> (b) </body>
  22. 22.Which of these is a strong password? (a) 111111 (b) Mango#Kite29! (c) 123456 (d) abcd1234
  23. 23.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  24. 24.True or false: p { color: red; } goes in index.html. (a) True (b) False
  25. 25.🔁 How many numbers does this code print?
    for (let i = 0; i < 14; i = i + 2) {
      console.log(i);
    }
  26. 26.True or false: the border is a solid or dotted edge. (a) False (b) True
  27. 27.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Blue
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Pink
      <input type="checkbox" name="colour"> Green
      <input type="checkbox" name="colour"> Orange
    </form>
  28. 28.⚡ What does this code print? (Look at the quotes!)
    let x = "6";
    let y = 3;
    console.log(x + y);
    (a) Error (b) 63 (c) 9
  29. 29.Which of these does CSS do? (a) counts down a timer (b) changes the page live (c) sets colours and fonts (d) gives the page structure
  30. 30.🚀 Which file should this code go in: console.log(5 + 2); (a) index.html (b) script.js (c) style.css
  31. 31.🌍 What is the protocol in this URL?
    https://learn.example.com/about.html
    (a) learn.example.com (b) https (c) http (d) /about.html
  32. 32.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <li>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) kite.png (b) tiger.jpg (c) An old fort (d) fort.jpg
  34. 34.⚡ What number does this code print?
    let score = 10;
    score = score + 2;
    score = score - 11;
    console.log(score);
  35. 35.📱 Responsive design means a page ___. (a) has no pictures (b) never changes (c) is only for laptops (d) fits every screen
  36. 36.True or false: HTML on its own can keep a high score. (a) True (b) False
  37. 37.📊 Which tag makes one table row? (a) <table> (b) <caption> (c) <td> (d) <tr>
  38. 38.Which of these goes in the body? (a) <title> (b) <style> (c) <img> (d) <meta charset="utf-8">
  39. 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) </head>
  40. 40.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //

Answer key

  1. Cricket is fun.
  2. <img>
  3. use a nickname in games
  4. 6
  5. bold
  6. True
  7. 326
  8. 3
  9. the text or picture
  10. console.log()
  11. 2
  12. 36
  13. 3
  14. opens it in a new tab
  15. 111111
  16. Yes
  17. 3
  18. type a password on http
  19. <aside>
  20. False
  21. </head>
  22. Mango#Kite29!
  23. 6
  24. False
  25. 7
  26. True
  27. 5
  28. 63
  29. sets colours and fonts
  30. script.js
  31. https
  32. <li>
  33. fort.jpg
  34. 1
  35. fits every screen
  36. False
  37. <tr>
  38. <img>
  39. </html>
  40. <!--

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