← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 783 · 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.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 190px;
      padding: 20px;
      border: 5px solid black;
      margin: 15px;
    }
  2. 2.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
  3. 3.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) write the HTML (b) add CSS styles (c) publish it online (d) plan what to show
  4. 4.🖌️ What colour are the letters?
    h1 {
      text-align: center;
      color: blue;
      font-size: 24px;
      background-color: green;
    }
    (a) yellow (b) blue (c) green
  5. 5.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
  6. 6.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) answers page requests (d) has an address bar
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  8. 8.🚀 What is the home page file of a website usually called? (a) index.html (b) home.css (c) start.js (d) main.png
  9. 9.🖌️ Which CSS property colours behind the text? (a) font-size (b) text-align (c) background-color (d) font-family
  10. 10.🖌️ What colour is behind the letters?
    p {
      color: orange;
      background-color: red;
      font-size: 12px;
      text-align: right;
    }
    (a) orange (b) red (c) black
  11. 11.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 330px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  12. 12.⚡ What does this code show?
    let name = "Meera";
    alert("Hi, " + name + "!");
    (a) Hi, name! (b) name (c) Hi, Meera! (d) Meera
  13. 13.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  14. 14.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  15. 15.True or false: to download from pop-ups is safe. (a) True (b) False
  16. 16.✍️ What is the selector in this CSS rule?
    .note {
      font-size: 20px;
      margin: 10px;
    }
    (a) #top (b) .note (c) 10px (d) font-size
  17. 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  18. 18.Which of these is safe to do online? (a) meet an online stranger (b) post your home address (c) type a password on http (d) ask before downloading
  19. 19.♿ What does good colour contrast mean? (a) no colours at all (b) text stands out clearly (c) many bright colours (d) only red text
  20. 20.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
    <h2>Good morning!</h2>
  21. 21.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="fruit"> Mango
      <input type="checkbox" name="fruit"> Banana
      <input type="checkbox" name="fruit"> Guava
    </form>
  22. 22.🌍 What does a web address (URL) tell the browser? (a) the page colour (b) your password (c) where the page is (d) how old you are
  23. 23.True or false: <article> holds one blog post. (a) False (b) True
  24. 24.True or false: <tr> makes one table row. (a) False (b) True
  25. 25.📝 Which tag holds a whole form? (a) <form> (b) <table> (c) <input> (d) <ol>
  26. 26.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #00ffff
  27. 27.True or false: HTML on its own cannot make tables. (a) True (b) False
  28. 28.True or false: the browser scrambles data on its way. (a) False (b) True
  29. 29.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) white
  30. 30.🖌️ Where does the text sit on its line?
    p {
      font-size: 12px;
      text-align: center;
      background-color: orange;
      color: red;
    }
    (a) on the left (b) on the right (c) in the middle
  31. 31.True or false: <ul> is one item of a list. (a) False (b) True
  32. 32.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 15; i = i + 4) {
      console.log(i);
    }
  33. 33.📝 Which input type picks a day? (a) text (b) number (c) date (d) password
  34. 34.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  36. 36.True or false: in <img>, src names the picture file. (a) False (b) True
  37. 37.Which of these has a closing tag? (a) <img> (b) <meta> (c) <b> (d) <hr>
  38. 38.Which of these is true of a web server? (a) has an address bar (b) shows line numbers (c) sends pages over the net (d) saves our .html files
  39. 39.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) map.png (b) kite.png (c) tiger.jpg (d) A tiger asleep
  40. 40.True or false: to share your password is safe. (a) False (b) True

Answer key

  1. 270
  2. <h2>
  3. publish it online
  4. blue
  5. <script>
  6. has an address bar
  7. 255
  8. index.html
  9. background-color
  10. red
  11. 30
  12. Hi, Meera!
  13. <a>
  14. an id selector
  15. False
  16. .note
  17. <!DOCTYPE html>
  18. ask before downloading
  19. text stands out clearly
  20. 2
  21. 3
  22. where the page is
  23. True
  24. True
  25. <form>
  26. #ffff00
  27. False
  28. False
  29. blue
  30. in the middle
  31. False
  32. 12
  33. date
  34. href
  35. 5
  36. True
  37. <b>
  38. sends pages over the net
  39. tiger.jpg
  40. False

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