← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 683 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.⚖️ What colour is the text of this element?
    <h2 class="red" id="logo">Hi</h2>
    CSS:
    .red { color: yellow; }
    .red { color: orange; }
    (a) yellow (b) purple (c) blue (d) orange
  3. 3.Which of these is an empty tag? (a) <b> (b) <h1> (c) <title> (d) <hr>
  4. 4.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) plan what to show (b) publish it online (c) write the HTML (d) test in a browser
  5. 5.Which of these is margin? (a) space inside the border (b) the text or picture (c) the line round the box (d) space outside the border
  6. 6.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <body>
  7. 7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 15px;
      border: 4px solid black;
      margin: 5px;
    }
  8. 8.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  9. 9.What does justify-content: center do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
  10. 10.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </body> (c) </html> (d) <body>
  11. 11.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Cricket
    </form>
  12. 12.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 110px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  13. 13.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <main> (b) <header>
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite
  15. 15.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  16. 16.💪 Which flexbox property lines boxes up across? (a) display: flex (b) flex-direction (c) align-items (d) justify-content
  17. 17.🎯 Which element does the selector #intro style? (a) <li class="note"> (b) <h2 id="main"> (c) <h2 class="intro"> (d) <h2 id="intro">
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
  19. 19.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
  20. 20.♿ Who uses a screen reader? (a) people who are blind (b) only robots (c) only coders (d) only teachers
  21. 21.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the viewport meta tag (c) the hr tag (d) the title tag
  22. 22.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) maths.html (b) contact.html (c) School news (d) https://example.com
  23. 23.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) bright green (d) black
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  25. 25.🌈 Which colour is #ffffff? (a) white (b) magenta (c) bright green (d) yellow
  26. 26.True or false: <input type="number"> takes only numbers. (a) False (b) True
  27. 27.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) games.html (b) quiz.html (c) about.html (d) Visit the site
  28. 28.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="date">
      <input type="submit" value="Send">
    </form>
  29. 29.📦 In the box model, which part is the text or picture? (a) content (b) border (c) padding (d) margin
  30. 30.⚡ What number does this code print?
    let books = 13;
    books = books + 18;
    books = books - 16;
    console.log(books);
  31. 31.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
  32. 32.🔁 How many times does this code print “Hello”?
    for (let i = 3; i < 12; i++) {
      console.log("Hello");
    }
  33. 33.🖌️ Where does the text sit on its line?
    p {
      color: purple;
      font-size: 12px;
      background-color: red;
      text-align: left;
    }
    (a) on the left (b) on the right (c) in the middle
  34. 34.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  35. 35.Which of these is a strong password? (a) iloveyou (b) 111111 (c) Blue@Tiger_74 (d) riya2014
  36. 36.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    (a) Fun facts (b) The red kite (c) Rain today
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) href (c) Play games (d) About us
  38. 38.🌈 Which colour is #ff0000? (a) red (b) magenta (c) bright green (d) blue
  39. 39.Which of these is an opening tag? (a) </b> (b) </body> (c) <li> (d) </p>
  40. 40.🛡️ Online: is it safe to log out on shared PCs? (a) not safe (b) safe

Answer key

  1. No
  2. orange
  3. <hr>
  4. test in a browser
  5. space outside the border
  6. <body>
  7. 108
  8. opens it in a new tab
  9. puts boxes in the middle
  10. </html>
  11. 1
  12. 10
  13. <header>
  14. A tiger asleep
  15. an empty tag
  16. align-items
  17. <h2 id="intro">
  18. <h1>
  19. <!DOCTYPE html>
  20. people who are blind
  21. the viewport meta tag
  22. contact.html
  23. black
  24. in a new tab
  25. white
  26. True
  27. quiz.html
  28. 3
  29. content
  30. 15
  31. 3
  32. 9
  33. on the left
  34. <ol>
  35. Blue@Tiger_74
  36. Rain today
  37. Play games
  38. red
  39. <li>
  40. safe

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