← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 387 · 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: <li> is an empty tag. (a) True (b) False
  2. 2.✍️ Which sign ends each CSS declaration? (a) , (b) . (c) ; (d) :
  3. 3.⚡ Which JavaScript word repeats code? (a) alert() (b) if (c) console.log() (d) for
  4. 4.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the end (c) packs boxes at the start (d) equal gaps, none at ends
  5. 5.♿ Who uses a screen reader? (a) people who are blind (b) only coders (c) only robots (d) only teachers
  6. 6.🔢 To build and share your first web page, which comes first: “write the HTML” or “test in a browser”? (a) write the HTML (b) test in a browser
  7. 7.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) shows pages from the web
  8. 8.⚖️ What colour is the text of this element?
    <p class="box" id="hero">Hi</p>
    CSS:
    #hero { color: black; }
    #hero { color: purple; }
    (a) purple (b) black (c) green (d) red
  9. 9.📝 Which input type sends the form? (a) text (b) checkbox (c) date (d) submit
  10. 10.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-style: italic;
      margin: 10px;
    }
  11. 11.🔁 How many times does this code print “Welcome”?
    for (let i = 0; i <= 4; i++) {
      console.log("Welcome");
    }
  12. 12.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  13. 13.⚡ What number does this code print?
    let apples = 19;
    apples = apples + 7;
    apples = apples - 12;
    console.log(apples);
  14. 14.🧩 Which language makes headings and lists? (a) CSS (b) JavaScript (c) HTML
  15. 15.✍️ Which property is set to bold in this rule?
    li {
      font-weight: bold;
      text-align: center;
    }
    (a) bold (b) border (c) font-weight (d) width
  16. 16.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  17. 17.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <head> (c) <html> (d) </html>
  18. 18.Which of these is true of a web server? (a) shows line numbers (b) answers page requests (c) turns HTML into a page (d) is where we type code
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) about.html (c) games.html (d) About us
  20. 20.⚡ What does JavaScript add to a web page? (a) the page title (b) actions and changes (c) only colours (d) the domain name
  21. 21.Which of these is true of <header>? (a) sits at the very top (b) holds the menu of links (c) holds one blog post (d) sits at the bottom
  22. 22.🖌️ What colour is behind the letters?
    p {
      color: green;
      text-align: left;
      font-size: 20px;
      background-color: yellow;
    }
    (a) yellow (b) white (c) green
  23. 23.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + 2;
    }
    console.log(total);
  24. 24.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  25. 25.🖌️ What colour is behind the letters?
    h1 {
      text-align: center;
      font-size: 32px;
      background-color: black;
      color: orange;
    }
    (a) black (b) orange (c) white
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  27. 27.Which of these is true of <footer>? (a) holds the main content (b) sits at the bottom (c) is the page’s key part (d) holds extra side notes
  28. 28.🌍 Which one sends the page back? (a) HTTPS (b) the server (c) the URL (d) the browser
  29. 29.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  30. 30.🚀 Which file should this code go in: .box { padding: 8px; } (a) index.html (b) style.css (c) script.js
  31. 31.🌍 What do we call the computer that stores a website? (a) a server (b) a printer (c) a keyboard (d) a mouse
  32. 32.True or false: <input type="password"> hides what you type. (a) False (b) True
  33. 33.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  34. 34.🖌️ Which CSS property makes the text bold? (a) background-color (b) font-family (c) font-size (d) font-weight
  35. 35.🖌️ What colour are the letters?
    h1 {
      text-align: left;
      background-color: blue;
      color: white;
      font-size: 12px;
    }
    (a) purple (b) blue (c) white
  36. 36.True or false: “write clear link text” helps everyone use the page. (a) False (b) True
  37. 37.⚖️ What colour is the text of this element?
    <h2 class="star" id="logo">Hi</h2>
    CSS:
    #logo { color: orange; }
    .star { color: blue; }
    h2 { color: yellow; }
    (a) green (b) blue (c) yellow (d) orange
  38. 38.🎯 Which CSS selector matches this element?
    <li class="red" id="logo">Hello</li>
    (a) .red (b) div (c) #red (d) .logo
  39. 39.🌍 What is the path in this URL?
    http://www.example.com/about.html
    (a) /about.html (b) http (c) www.example.com (d) /maths/tables.html
  40. 40.What does justify-content: space-between do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends

Answer key

  1. False
  2. ;
  3. for
  4. packs boxes at the end
  5. people who are blind
  6. write the HTML
  7. saves our .html files
  8. purple
  9. submit
  10. 2
  11. 5
  12. a code editor
  13. 14
  14. HTML
  15. font-weight
  16. href
  17. </html>
  18. answers page requests
  19. games.html
  20. actions and changes
  21. sits at the very top
  22. yellow
  23. 18
  24. map.png
  25. black
  26. 300
  27. sits at the bottom
  28. the server
  29. <h1>
  30. style.css
  31. a server
  32. True
  33. on the browser tab
  34. font-weight
  35. white
  36. True
  37. orange
  38. .red
  39. /about.html
  40. equal gaps, none at ends

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