← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 826 · 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 shorter one (b) neither (c) the first one (d) the later one
  2. 2.True or false: HTML on its own can make links to pages. (a) True (b) False
  3. 3.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
  4. 4.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <js src="script.js"> (c) <script src="script.js"> (d) <link script.js>
  5. 5.⚡ Which JavaScript word runs code when true? (a) console.log() (b) alert() (c) let (d) if
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <p>My pets</p>
    <h4>My best friend</h4>
    <h4>Fun facts</h4>
  7. 7.🔍 Which is the odd one out? (a) checks a quiz answer (b) counts down a timer (c) shows a pop-up message (d) makes headings and lists
  8. 8.🎯 Which sign starts a class selector? (a) & (b) # (c) . (d) @
  9. 9.Which of these is safe to do online? (a) download from pop-ups (b) ask before downloading (c) share your OTP (d) click prize links
  10. 10.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 8; i++) {
      console.log("Hello");
    }
  11. 11.🌍 Which one shows the page to you? (a) the browser (b) HTTPS (c) the server (d) the URL
  12. 12.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Rain today (c) Fun facts
  14. 14.True or false: HTML on its own can pick a random number. (a) False (b) True
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Art Gallery (d) All about me
  16. 16.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  17. 17.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the data is scrambled (c) the site is free (d) the site is a game
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
  19. 19.📊 Which tag makes one data cell? (a) <table> (b) <td> (c) <caption> (d) <th>
  20. 20.🔍 Which is the odd one out? (a) changes the page live (b) adds space around boxes (c) rounds box corners (d) lays out the page
  21. 21.🧭 Which semantic tag sits at the bottom? (a) <article> (b) <aside> (c) <nav> (d) <footer>
  22. 22.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  23. 23.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  24. 24.Which of these has a closing tag? (a) <img> (b) <br> (c) <meta> (d) <li>
  25. 25.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 260px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  27. 27.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  28. 28.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
  29. 29.🌈 Which colour is #000000? (a) red (b) cyan (c) magenta (d) black
  30. 30.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-size (c) color (d) font-weight
  31. 31.⚖️ What colour is the text of this element?
    <p class="big" id="hero">Hi</p>
    CSS:
    .big { color: green; }
    p { color: red; }
    (a) green (b) white (c) orange (d) red
  32. 32.🖌️ Which CSS property makes the text bold? (a) color (b) font-size (c) font-weight (d) text-align
  33. 33.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 190px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  34. 34.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    #top { color: white; }
    p { color: black; }
    (a) green (b) white (c) black (d) orange
  35. 35.🎯 Which CSS selector matches this element?
    <p class="big" id="logo">Hello</p>
    (a) h1 (b) .big (c) #big (d) .logo
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </head> (d) <!DOCTYPE html>
  37. 37.🔗 Where does this link open?
    <a href="maths.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  38. 38.🎯 What kind of selector is .big? (a) a class selector (b) an element selector (c) an id selector
  39. 39.⚡ What does this code print? (Look at the quotes!)
    let x = "9";
    let y = 1;
    console.log(x + y);
    (a) 10 (b) Error (c) 91
  40. 40.True or false: a code editor stores a website’s files. (a) False (b) True

Answer key

  1. the later one
  2. True
  3. 6
  4. <script src="script.js">
  5. if
  6. 3
  7. makes headings and lists
  8. .
  9. ask before downloading
  10. 7
  11. the browser
  12. 22
  13. Hello, world!
  14. False
  15. Art Gallery
  16. easy to read
  17. the data is scrambled
  18. <h5>
  19. <td>
  20. changes the page live
  21. <footer>
  22. to describe the image
  23. href
  24. <li>
  25. 60
  26. <h4>
  27. a web browser
  28. False
  29. black
  30. background-color
  31. green
  32. font-weight
  33. 70
  34. white
  35. .big
  36. <!DOCTYPE html>
  37. in the same tab
  38. a class selector
  39. 91
  40. False

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