← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 954 · 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.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the shorter one (c) the later one (d) neither
  2. 2.💪 Which justify-content value puts boxes in the middle? (a) space-between (b) flex-end (c) flex-start (d) center
  3. 3.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 120px;
      padding: 20px;
      border: 5px solid black;
      margin: 5px;
    }
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  5. 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  6. 6.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Orange</td></tr>
    </table>
  7. 7.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  8. 8.🔒 Is the connection to this address scrambled (encrypted)?
    https://learn.example.com/index.html
    (a) No (b) Yes
  9. 9.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) turns HTML into a page
  10. 10.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  11. 11.🔁 How many numbers does this code print?
    for (let i = 0; i < 15; i = i + 4) {
      console.log(i);
    }
  12. 12.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  13. 13.⚡ What does JavaScript add to a web page? (a) the page title (b) only colours (c) actions and changes (d) the domain name
  14. 14.📋 What number does the browser show next to “Litchi”?
    <ol start="6">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  15. 15.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 6; i = i + 4) {
      console.log(i);
    }
  16. 16.🧩 Which language rounds box corners? (a) HTML (b) CSS (c) JavaScript
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.🔍 One closing tag is missing. Which one?
    <p>Rain today
    <h2>Good morning!</h2>
    <strong>Hello, world!</strong>
    (a) </strong> (b) </h3> (c) </p> (d) </h2>
  19. 19.Which of these is a strong password? (a) password (b) 111111 (c) iloveyou (d) Mango#Kite29!
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    (a) Rain today (b) I love mangoes. (c) My best friend (d) Fun facts
  21. 21.🚀 Where in index.html does the link to style.css go? (a) in the head (b) after </html> (c) inside a <p> (d) in the footer
  22. 22.⚡ Which JavaScript word runs code when true? (a) alert() (b) console.log() (c) if (d) let
  23. 23.🔁 How many times does this code print “Well done”?
    for (let i = 1; i <= 9; i++) {
      console.log("Well done");
    }
  24. 24.Which of these has a closing tag? (a) <hr> (b) <br> (c) <img> (d) <li>
  25. 25.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>My best friend</h4>
    <h3>I love mangoes.</h3>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  27. 27.🔢 To build and share your first web page, which comes first: “write the HTML” or “plan what to show”? (a) write the HTML (b) plan what to show
  28. 28.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
  29. 29.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) dog.jpg (b) The full moon (c) A happy dog (d) width
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
  32. 32.🌈 Which colour of light is strongest in rgb(250, 20, 72)? (a) red (b) green (c) blue
  33. 33.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<nav>”? (a) <nav> (b) <main>
  34. 34.True or false: .note is an element selector. (a) True (b) False
  35. 35.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  36. 36.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) tiger.jpg (b) An old fort (c) kite.png (d) fort.jpg
  37. 37.🧭 Is <aside> semantic or not semantic? (a) not semantic (b) semantic
  38. 38.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 90px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  39. 39.🛡️ Online: is it safe to type a password on http? (a) not safe (b) safe
  40. 40.🧩 Which language shows a pop-up message? (a) CSS (b) HTML (c) JavaScript

Answer key

  1. the later one
  2. center
  3. 180
  4. F
  5. element
  6. 2
  7. 80
  8. Yes
  9. answers page requests
  10. 60
  11. 4
  12. <ul>
  13. actions and changes
  14. 8
  15. 4
  16. CSS
  17. a closing tag
  18. </p>
  19. Mango#Kite29!
  20. Fun facts
  21. in the head
  22. if
  23. 9
  24. <li>
  25. 3
  26. 250
  27. plan what to show
  28. starts a new line
  29. <h1>
  30. A happy dog
  31. 2
  32. red
  33. <nav>
  34. False
  35. 60
  36. fort.jpg
  37. semantic
  38. 10
  39. not safe
  40. JavaScript

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