← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 103 · 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.True or false: a code editor opens web pages for us. (a) False (b) True
  2. 2.True or false: h1 { font-size: 32px; } goes in style.css. (a) True (b) False
  3. 3.🖌️ Which CSS property sets the letter colour? (a) font-size (b) color (c) background-color (d) text-align
  4. 4.Which of these does HTML do? (a) adds space around boxes (b) rounds box corners (c) sets colours and fonts (d) gives the page structure
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  7. 7.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
  8. 8.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) opens web pages for us
  9. 9.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My pets</h3>
    <h2>Our school trip</h2>
  10. 10.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  11. 11.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + 3;
    }
    console.log(total);
  12. 12.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  13. 13.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.True or false: “write clear link text” makes the page harder to use. (a) True (b) False
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) I love mangoes. (b) Fun facts (c) Cricket is fun.
  16. 16.✍️ Which property is set to 8px in this rule?
    h1 {
      padding: 8px;
      margin: 10px;
      font-weight: bold;
    }
    (a) padding (b) 8px (c) font-weight (d) border
  17. 17.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) https://example.com (c) Art corner (d) maths.html
  18. 18.🔁 What does this code print?
    let marks = 11;
    if (marks >= 23) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  19. 19.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
  20. 20.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 16px;
      }
    }
  21. 21.Which of these goes in the head? (a) <p> (b) <h1> (c) <ul> (d) <style>
  22. 22.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
  23. 23.🎯 Which sign starts a class selector? (a) & (b) . (c) @ (d) #
  24. 24.⚡ What does JavaScript add to a web page? (a) the domain name (b) actions and changes (c) the page title (d) only colours
  25. 25.🚀 Which file should this code go in: body { margin: 0; } (a) style.css (b) index.html (c) script.js
  26. 26.True or false: CSS shows a pop-up message. (a) False (b) True
  27. 27.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  28. 28.🧭 Which semantic tag holds the menu of links? (a) <footer> (b) <nav> (c) <header> (d) <article>
  29. 29.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) add CSS styles (b) test in a browser
  30. 30.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  31. 31.True or false: <ul> has a closing tag. (a) False (b) True
  32. 32.🌈 Which colour of light is strongest in rgb(37, 77, 244)? (a) red (b) blue (c) green
  33. 33.Which of these is a closing tag? (a) <b> (b) <h1> (c) </title> (d) <p>
  34. 34.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
  35. 35.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>I love mangoes.</p>
    <h4>The red kite</h4>
  36. 36.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) close it, tell an adult (c) type the password (d) share it with friends
  37. 37.Which of these is the border? (a) the line round the box (b) space inside the border (c) the gap round content (d) the gap to other boxes
  38. 38.🌍 What finds the server for a domain name like example.com? (a) HTML (b) DNS (c) CSS (d) alt
  39. 39.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  40. 40.🔁 How many times does this code print “Hi”?
    for (let i = 1; i <= 9; i++) {
      console.log("Hi");
    }

Answer key

  1. False
  2. True
  3. color
  4. gives the page structure
  5. <h6>
  6. 2
  7. src
  8. opens web pages for us
  9. 3
  10. <li>
  11. 18
  12. a web browser
  13. a closing tag
  14. False
  15. I love mangoes.
  16. padding
  17. contact.html
  18. Try again
  19. the screen width
  20. 16
  21. <style>
  22. -->
  23. .
  24. actions and changes
  25. style.css
  26. False
  27. a paragraph
  28. <nav>
  29. add CSS styles
  30. 20
  31. True
  32. blue
  33. </title>
  34. 16
  35. 2
  36. close it, tell an adult
  37. the line round the box
  38. DNS
  39. <!--
  40. 9

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