← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 977 · 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: <input type="checkbox"> is for an email address. (a) False (b) True
  2. 2.True or false: in <img>, src sets how tall it is. (a) True (b) False
  3. 3.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  4. 4.🎨 Which attribute adds CSS inside one tag? (a) alt (b) src (c) href (d) style
  5. 5.🌍 What is the protocol in this URL?
    http://www.example.net/news/today.html
    (a) https (b) /news/today.html (c) www.example.net (d) http
  6. 6.🔗 Where does this link open?
    <a href="contact.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  7. 7.True or false: <td> gives the table a title. (a) True (b) False
  8. 8.🌍 What is the path in this URL?
    http://learn.example.com/news/today.html
    (a) /games/chess.html (b) /news/today.html (c) learn.example.com (d) http
  9. 9.⚡ What does this code print? (Look at the quotes!)
    let x = "7";
    let y = 4;
    console.log(x + y);
    (a) 74 (b) Error (c) 11
  10. 10.📝 Which input type takes only numbers? (a) radio (b) submit (c) number (d) text
  11. 11.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + 7;
    }
    console.log(total);
  12. 12.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    (a) Good morning! (b) Our school trip (c) My pets
  13. 13.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the title tag (d) the br tag
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  15. 15.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
  16. 16.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No
  17. 17.Which of these is the content? (a) the text or picture (b) the gap round content (c) space outside the border (d) space inside the border
  18. 18.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  19. 19.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-size: 20px;
    }
  20. 20.🖌️ What colour is behind the letters?
    li {
      text-align: left;
      color: white;
      font-size: 20px;
      background-color: green;
    }
    (a) green (b) white (c) yellow
  21. 21.Which of these is true of a web browser? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) opens web pages for us
  22. 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  23. 23.🔁 How many numbers does this code print?
    for (let i = 0; i < 16; i = i + 3) {
      console.log(i);
    }
  24. 24.✍️ Which sign ends each CSS declaration? (a) : (b) . (c) ; (d) ,
  25. 25.✍️ What is the selector in this CSS rule?
    h1 {
      font-weight: bold;
      font-style: italic;
    }
    (a) italic (b) h1 (c) p (d) font-weight
  26. 26.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Orange</td><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Banana</td><td>Grapes</td></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Litchi</td></tr>
    </table>
  27. 27.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  28. 28.⚡ What does this code show?
    let name = "Riya";
    console.log("Hi, " + name + "!");
    (a) Hi, name! (b) Riya (c) name (d) Hi, Riya!
  29. 29.✍️ CSS declarations go inside which brackets? (a) < > (b) [ ] (c) { } (d) ( )
  30. 30.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
  32. 32.True or false: HTML gives the page structure. (a) False (b) True
  33. 33.True or false: <hr> has a closing tag. (a) False (b) True
  34. 34.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 6;
    }
    console.log(total);
  35. 35.🌍 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
  36. 36.🔍 One closing tag is missing. Which one?
    <h3>Good morning!
    <small>Hello, world!</small>
    <b>My pets</b>
    (a) </b> (b) </small> (c) </h3> (d) </p>
  37. 37.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
  40. 40.🔁 How many numbers does this code print?
    for (let i = 0; i < 20; i = i + 2) {
      console.log(i);
    }

Answer key

  1. False
  2. False
  3. True
  4. style
  5. http
  6. in the same tab
  7. False
  8. /news/today.html
  9. 74
  10. number
  11. 42
  12. Good morning!
  13. the viewport meta tag
  14. 1
  15. alt
  16. Yes
  17. the text or picture
  18. No
  19. 1
  20. green
  21. opens web pages for us
  22. <ol>
  23. 6
  24. ;
  25. h1
  26. 3
  27. an element selector
  28. Hi, Riya!
  29. { }
  30. in the head
  31. False
  32. True
  33. False
  34. 24
  35. where the page is
  36. </h3>
  37. No
  38. 300
  39. 1
  40. 10

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