← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 458 · 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.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
  2. 2.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
  3. 3.⚡ What does this code show?
    let name = "Aman";
    alert("Welcome, " + name + "!");
    (a) name (b) Aman (c) Welcome, Aman! (d) Welcome, name!
  4. 4.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  5. 5.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u> (c) <\u> (d) <u/>
  6. 6.True or false: <ul> shows bullet points. (a) False (b) True
  7. 7.✍️ CSS declarations go inside which brackets? (a) [ ] (b) ( ) (c) < > (d) { }
  8. 8.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  9. 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  10. 10.🔁 Which word runs code only when something is true? (a) let (b) for (c) log (d) if
  11. 11.Which of these does CSS do? (a) makes headings and lists (b) puts a picture on a page (c) checks a quiz answer (d) changes the text size
  12. 12.🌈 In #630000 the red part is the hex number 63. What is it as a normal number?
  13. 13.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  14. 14.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) </head> (b) <html>
  15. 15.Which colour pair is hard to read? (a) black on white (b) yellow on black (c) red on green (d) dark grey on white
  16. 16.True or false: HTML changes the page live. (a) False (b) True
  17. 17.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  19. 19.True or false: <img> goes in the body. (a) True (b) False
  20. 20.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  21. 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
  22. 22.Which of these is the content? (a) the text or picture (b) space outside the border (c) the line round the box (d) the gap round content
  23. 23.🔁 How many times does this code print “Well done”?
    for (let i = 0; i < 2; i++) {
      console.log("Well done");
    }
  24. 24.True or false: <input type="checkbox"> lets you tick many. (a) False (b) True
  25. 25.⚡ Which JavaScript word repeats code? (a) console.log() (b) if (c) alert() (d) for
  26. 26.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) test in a browser (c) plan what to show (d) add CSS styles
  27. 27.🌈 In #7a0000 the red part is the hex number 7a. What is it as a normal number?
  28. 28.True or false: a web server is where we type code. (a) False (b) True
  29. 29.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  30. 30.🔗 Where does this link open?
    <a href="games.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  31. 31.🔁 How many times does this code print “Well done”?
    for (let i = 2; i <= 11; i++) {
      console.log("Well done");
    }
  32. 32.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  33. 33.📊 How many cells are in each row?
    <table>
      <tr><td>Mango</td><td>Papaya</td><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Orange</td><td>Litchi</td><td>Orange</td><td>Mango</td></tr>
      <tr><td>Guava</td><td>Banana</td><td>Banana</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Papaya</td><td>Papaya</td><td>Litchi</td></tr>
    </table>
  34. 34.🔢 To build and share your first web page, which comes first: “test in a browser” or “add CSS styles”? (a) test in a browser (b) add CSS styles
  35. 35.True or false: in <img>, width sets how wide it is. (a) False (b) True
  36. 36.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  37. 37.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      font-weight: bold;
      padding: 8px;
    }
  38. 38.True or false: <ul> is an ordered list. (a) True (b) False
  39. 39.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #0000ff
  40. 40.🖌️ What colour is behind the letters?
    h2 {
      font-size: 12px;
      color: red;
      background-color: white;
      text-align: left;
    }
    (a) green (b) white (c) red

Answer key

  1. 20
  2. 16
  3. Welcome, Aman!
  4. <!DOCTYPE html>
  5. </u>
  6. True
  7. { }
  8. <!--
  9. 1
  10. if
  11. changes the text size
  12. 99
  13. 3
  14. <html>
  15. red on green
  16. False
  17. <h1>
  18. red
  19. True
  20. to leave notes
  21. src
  22. the text or picture
  23. 2
  24. True
  25. for
  26. plan what to show
  27. 122
  28. False
  29. href
  30. in a new tab
  31. 10
  32. <a href="about.html">
  33. 4
  34. add CSS styles
  35. True
  36. <ul>
  37. 2
  38. False
  39. #0000ff
  40. white

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