← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 541 · 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.Which of these is true of a code editor? (a) has an address bar (b) hosts websites online (c) saves our .html files (d) shows pages from the web
  2. 2.True or false: in <img>, height is read by screen readers. (a) True (b) False
  3. 3.🎯 What kind of selector is p? (a) an id selector (b) a class selector (c) an element selector
  4. 4.📦 In the box model, which part is the line round the box? (a) padding (b) content (c) margin (d) border
  5. 5.✍️ Which property is set to italic in this rule?
    .note {
      color: red;
      padding: 8px;
      font-weight: bold;
      font-style: italic;
    }
    (a) italic (b) font-size (c) color (d) font-style
  6. 6.Which of these is an empty tag? (a) <img> (b) <ul> (c) <h1> (d) <title>
  7. 7.🎯 Which element does the selector .note style? (a) <h2 class="red"> (b) <h1 id="note"> (c) <h1 class="note"> (d) <h1 class="big">
  8. 8.🖌️ What colour are the letters?
    h2 {
      color: orange;
      font-size: 16px;
      background-color: white;
      text-align: right;
    }
    (a) white (b) orange (c) purple
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  10. 10.True or false: <li> has a closing tag. (a) True (b) False
  11. 11.True or false: <caption> gives the table a title. (a) False (b) True
  12. 12.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Blue
      <input type="radio" name="colour"> Green
      <input type="radio" name="colour"> Orange
      <input type="radio" name="colour"> Red
    </form>
  13. 13.True or false: <input type="password"> sends the form. (a) False (b) True
  14. 14.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 12px;
      }
    }
    (a) No (b) Yes
  15. 15.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  16. 16.🔁 How many times does this code print “Hi”?
    for (let i = 3; i < 8; i++) {
      console.log("Hi");
    }
  17. 17.🖌️ Which CSS property colours behind the text? (a) background-color (b) color (c) text-align (d) font-family
  18. 18.🚀 Which file is best for the colours and fonts? (a) photo.jpg (b) script.js (c) style.css (d) index.html
  19. 19.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
  20. 20.True or false: HTML on its own cannot make tables. (a) False (b) True
  21. 21.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.✍️ What is the selector in this CSS rule?
    h1 {
      font-size: 20px;
      background-color: yellow;
    }
    (a) font-size (b) yellow (c) p (d) h1
  23. 23.True or false: alert("Hi"); goes in script.js. (a) True (b) False
  24. 24.Which of these is an empty tag? (a) <ul> (b) <li> (c) <hr> (d) <b>
  25. 25.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) saves our .html files (d) shows pages from the web
  26. 26.⚡ What does this code show?
    let name = "Arjun";
    alert("Hello, " + name + "!");
    (a) Hello, Arjun! (b) Arjun (c) Hello, name! (d) name
  27. 27.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  28. 28.True or false: <td> holds the whole table. (a) False (b) True
  29. 29.True or false: in <img>, src names the picture file. (a) False (b) True
  30. 30.⚖️ What colour is the text of this element?
    <h1 class="box" id="logo">Hi</h1>
    CSS:
    .box { color: yellow; }
    .box { color: purple; }
    (a) purple (b) yellow (c) white (d) black
  31. 31.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) - (d) :
  32. 32.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  33. 33.🛡️ Online: is it safe to type a password on http? (a) not safe (b) safe
  34. 34.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Chess
    </form>
  35. 35.True or false: a web server saves our .html files. (a) True (b) False
  36. 36.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  37. 37.📦 In the box model, which part is a solid or dotted edge? (a) padding (b) margin (c) border (d) content
  38. 38.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 26px;
      }
    }
  39. 39.🌍 Which one scrambles data on its way? (a) HTTPS (b) the URL (c) the browser (d) the server
  40. 40.Which of these is a weak password? (a) 111111 (b) Blue@Tiger_74 (c) Rain#Drop_42! (d) Mango#Kite29!

Answer key

  1. saves our .html files
  2. False
  3. an element selector
  4. border
  5. font-style
  6. <img>
  7. <h1 class="note">
  8. orange
  9. 100
  10. True
  11. True
  12. 1
  13. False
  14. No
  15. <ol>
  16. 5
  17. background-color
  18. style.css
  19. <h2>
  20. False
  21. in the body
  22. h1
  23. True
  24. <hr>
  25. shows pages from the web
  26. Hello, Arjun!
  27. False
  28. False
  29. True
  30. purple
  31. :
  32. <a href="about.html">
  33. not safe
  34. 1
  35. False
  36. <h6>
  37. border
  38. 24
  39. HTTPS
  40. 111111

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