← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 451 · 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: .menu is an element selector. (a) True (b) False
  2. 2.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 3 (d) 10
  3. 3.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <strong>I love mangoes.</strong>
    line 2: <em>The red kite</em>
    line 3: <small>My best friend
    (a) line 3 (b) line 1 (c) line 2
  5. 5.True or false: “use big enough text” makes the page harder to use. (a) True (b) False
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Birds sing</p>
  7. 7.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
  8. 8.⚡ What does this code show?
    let name = "Kabir";
    console.log("Well done, " + name + "!");
    (a) Kabir (b) Well done, name! (c) name (d) Well done, Kabir!
  9. 9.True or false: in <img>, width names the picture file. (a) False (b) True
  10. 10.🔢 When you open a web page, what comes right after “you type the URL”? (a) the server sends files (b) the browser shows it (c) DNS finds the server (d) the browser asks it
  11. 11.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
  12. 12.💬 Does the browser show comments on the page? (a) Yes (b) No
  13. 13.🔁 How many numbers does this code print?
    for (let i = 0; i < 18; i = i + 4) {
      console.log(i);
    }
  14. 14.💪 Which flexbox property sets space between boxes? (a) display: flex (b) flex-direction (c) gap (d) align-items
  15. 15.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) Maths fun (c) href (d) Visit the site
  16. 16.🔢 When you open a web page, which comes first: “you type the URL” or “DNS finds the server”? (a) DNS finds the server (b) you type the URL
  17. 17.True or false: <tr> gives the table a title. (a) True (b) False
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      padding: 8px;
      background-color: yellow;
      text-align: center;
      font-size: 20px;
    }
  19. 19.Which of these is the border? (a) space inside the border (b) space outside the border (c) a solid or dotted edge (d) the text or picture
  20. 20.🌍 What is the protocol in this URL?
    https://www.example.com/art/gallery.html
    (a) www.example.com (b) https (c) http (d) /art/gallery.html
  21. 21.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) A tiger asleep (b) tiger.jpg (c) kite.png (d) map.png
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  23. 23.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 340px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  24. 24.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  25. 25.🌍 Which one shows the page to you? (a) the URL (b) the browser (c) the server (d) HTTPS
  26. 26.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Rain today</p>
    <p>My pets</p>
    <p>Fun facts</p>
  27. 27.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 120px;
      padding: 25px;
      border: 1px solid black;
      margin: 15px;
    }
  28. 28.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) about.html (b) contact.html (c) School news (d) games.html
  29. 29.Which of these is the content? (a) the line round the box (b) a solid or dotted edge (c) space inside the border (d) the text or picture
  30. 30.🛡️ Before typing a password on a site, check the address starts with ___. (a) https (b) http (c) www (d) ftp
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!</strong>
    line 2: <h1>Cricket is fun.</h1>
    line 3: <em>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  32. 32.True or false: <title> has a closing tag. (a) True (b) False
  33. 33.🌍 Which one is the page’s address? (a) the URL (b) the server (c) HTTPS (d) the browser
  34. 34.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
  35. 35.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 350px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  36. 36.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) display: flex (c) justify-content (d) gap
  37. 37.♿ Who uses a screen reader? (a) people who are blind (b) only robots (c) only teachers (d) only coders
  38. 38.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="sport"> Football
      <input type="checkbox" name="sport"> Cricket
      <input type="checkbox" name="sport"> Kabaddi
    </form>
  39. 39.💪 Which flexbox property picks row or column? (a) justify-content (b) align-items (c) flex-direction (d) gap
  40. 40.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 19; i = i + 4) {
      console.log(i);
    }

Answer key

  1. False
  2. 1
  3. <h1>
  4. line 3
  5. False
  6. 4
  7. to leave notes
  8. Well done, Kabir!
  9. False
  10. DNS finds the server
  11. alt
  12. No
  13. 5
  14. gap
  15. Visit the site
  16. you type the URL
  17. False
  18. 4
  19. a solid or dotted edge
  20. https
  21. tiger.jpg
  22. 2
  23. 40
  24. <!DOCTYPE html>
  25. the browser
  26. 1
  27. 202
  28. games.html
  29. the text or picture
  30. https
  31. line 3
  32. True
  33. the URL
  34. <h6>
  35. 50
  36. display: flex
  37. people who are blind
  38. 3
  39. flex-direction
  40. 16

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