← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 92 · 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 picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  2. 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  3. 3.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  4. 4.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
  5. 5.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
  6. 6.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) neither (d) the later one
  7. 7.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  8. 8.🎯 Which element does the selector p style? (a) <h2 class="star"> (b) <p class="star"> (c) <h1> (d) <li id="intro">
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="150">
    (a) The full moon (b) Our school bus (c) width (d) moon.png
  10. 10.True or false: the browser shows the page to you. (a) True (b) False
  11. 11.Which of these is margin? (a) a solid or dotted edge (b) space inside the border (c) the text or picture (d) space outside the border
  12. 12.True or false: <meta> has a closing tag. (a) True (b) False
  13. 13.🛡️ Online: is it safe to keep passwords secret? (a) safe (b) not safe
  14. 14.True or false: #main is an element selector. (a) False (b) True
  15. 15.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <h2>My best friend
    <h3>Rain today</h3>
    (a) </h1> (b) </h2> (c) </p> (d) </h3>
  16. 16.🌍 What is the path in this URL?
    https://learn.example.com/about.html
    (a) /about.html (b) /maths/tables.html (c) https (d) learn.example.com
  17. 17.True or false: in <img>, src shows if the image fails. (a) False (b) True
  18. 18.✍️ Which property is set to center in this rule?
    body {
      color: red;
      text-align: center;
    }
    (a) center (b) text-align (c) background-color (d) margin
  19. 19.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  20. 20.True or false: <title> goes in the head. (a) True (b) False
  21. 21.🌈 In #0000e4 the blue part is the hex number e4. What is it as a normal number?
  22. 22.Which colour pair is easy to read? (a) red on green (b) yellow on white (c) light grey on white (d) white on black
  23. 23.✍️ Which property is set to 2px solid in this rule?
    .box {
      color: red;
      margin: 10px;
      border: 2px solid;
      font-weight: bold;
    }
    (a) font-style (b) 2px solid (c) border (d) width
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
  25. 25.✍️ Which property is set to 10px in this rule?
    li {
      text-align: center;
      margin: 10px;
    }
    (a) margin (b) 10px (c) font-weight (d) padding
  26. 26.✍️ What value is given to background-color in this rule?
    body {
      padding: 8px;
      text-align: center;
      border: 2px solid;
      background-color: yellow;
    }
    (a) background-color (b) 10px (c) 8px (d) yellow
  27. 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  28. 28.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  29. 29.🎯 Which element does the selector .menu style? (a) <span class="big"> (b) <div class="note"> (c) <div class="menu"> (d) <div id="menu">
  30. 30.True or false: HTTPS stores the site’s files. (a) False (b) True
  31. 31.🌈 Which colour of light is strongest in rgb(169, 123, 21)? (a) green (b) red (c) blue
  32. 32.True or false: <li> lists steps in order. (a) True (b) False
  33. 33.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
  34. 34.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) align-items (c) justify-content (d) gap
  35. 35.⚖️ What colour is the text of this element?
    <h2 class="big" id="logo">Hi</h2>
    CSS:
    h2 { color: red; }
    .big { color: yellow; }
    (a) yellow (b) green (c) red (d) purple
  36. 36.📊 Which tag holds the whole table? (a) <tr> (b) <td> (c) <caption> (d) <table>
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  38. 38.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h5>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  39. 39.True or false: a web browser answers page requests. (a) True (b) False
  40. 40.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. A tiger asleep
  2. <ul>
  3. <h1>
  4. CSS
  5. src
  6. the later one
  7. <ul>
  8. <p class="star">
  9. The full moon
  10. True
  11. space outside the border
  12. False
  13. safe
  14. False
  15. </h2>
  16. /about.html
  17. False
  18. text-align
  19. Yes
  20. True
  21. 228
  22. white on black
  23. border
  24. a slash /
  25. margin
  26. yellow
  27. No
  28. <h1>
  29. <div class="menu">
  30. False
  31. red
  32. False
  33. <li>
  34. justify-content
  35. yellow
  36. <table>
  37. 400
  38. <h6>
  39. False
  40. in the body

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