← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 744 · 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 tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  2. 2.🔒 Is the connection to this address scrambled (encrypted)?
    https://learn.example.com/news/today.html
    (a) Yes (b) No
  3. 3.🎯 What kind of selector is #logo? (a) a class selector (b) an id selector (c) an element selector
  4. 4.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  5. 5.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  6. 6.True or false: <input type="date"> picks a day. (a) False (b) True
  7. 7.Which of these does JavaScript do? (a) rounds box corners (b) puts a picture on a page (c) shows a pop-up message (d) adds space around boxes
  8. 8.⚡ What number does this code print?
    let a = 26;
    let b = 38;
    console.log(a + b);
  9. 9.🎯 Which CSS selector matches this element?
    <h2 class="box" id="hero">Hello</h2>
    (a) .star (b) #hero (c) #box (d) li
  10. 10.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  12. 12.💪 Which flexbox property sets space between boxes? (a) align-items (b) justify-content (c) gap (d) flex-direction
  13. 13.True or false: in <img>, src tells which image to load. (a) True (b) False
  14. 14.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>The red kite</p>
  15. 15.🔐 Is abcd1234 a strong or a weak password? (a) weak (b) strong
  16. 16.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
  17. 17.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <b>Hello, world!</b>
    line 2: <h3>Fun facts
    line 3: <i>My pets</i>
    (a) line 2 (b) line 1 (c) line 3
  19. 19.🔁 What does this code print?
    let temp = 39;
    if (temp >= 7) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  20. 20.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) : (d) -
  21. 21.True or false: .card is a class selector. (a) True (b) False
  22. 22.⚖️ What colour is the text of this element?
    <p class="red" id="main">Hi</p>
    CSS:
    .red { color: purple; }
    .red { color: blue; }
    (a) purple (b) green (c) yellow (d) blue
  23. 23.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #00ff00
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  25. 25.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) weak (b) strong
  26. 26.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  27. 27.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) turns HTML into a page (d) colours code to help us
  28. 28.Which of these has a closing tag? (a) <meta> (b) <p> (c) <hr> (d) <input>
  29. 29.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  30. 30.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Mango</td><td>Jamun</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Mango</td><td>Banana</td></tr>
    </table>
  31. 31.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) width (d) height
  32. 32.True or false: <ol> is an unordered list. (a) True (b) False
  33. 33.⚡ Which word makes a new variable? (a) make (b) let (c) give (d) put
  34. 34.⚡ Which JavaScript word makes a new variable? (a) for (b) alert() (c) if (d) let
  35. 35.Which of these is safe to do online? (a) put secrets in comments (b) meet an online stranger (c) share your password (d) log out on shared PCs
  36. 36.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
    <h2>Rain today</h2>
    <h2>My pets</h2>
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red<br>Kites fly high<br>Sky is blue</p>
  38. 38.🎯 Which element does the selector #end style? (a) <span id="hero"> (b) <span id="end"> (c) <span class="end"> (d) <p class="big">
  39. 39.True or false: <caption> gives the table a title. (a) False (b) True
  40. 40.True or false: CSS rounds box corners. (a) False (b) True

Answer key

  1. <img>
  2. Yes
  3. an id selector
  4. Yes
  5. No
  6. True
  7. shows a pop-up message
  8. 64
  9. #hero
  10. No
  11. width
  12. gap
  13. True
  14. 3
  15. weak
  16. CSS
  17. True
  18. line 2
  19. Hot
  20. :
  21. True
  22. blue
  23. #ffffff
  24. 1
  25. strong
  26. <!DOCTYPE html>
  27. turns HTML into a page
  28. <p>
  29. <ol>
  30. 4
  31. src
  32. False
  33. let
  34. let
  35. log out on shared PCs
  36. 2
  37. 5
  38. <span id="end">
  39. True
  40. True

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