← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 706 · 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 safe to do online? (a) log out on shared PCs (b) share your password (c) type a password on http (d) post your home address
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Fun facts</h3>
    <p>My best friend</p>
    <p>Good morning!</p>
  3. 3.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 130px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  4. 4.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
    (a) No (b) Yes
  5. 5.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + i;
    }
    console.log(total);
  6. 6.What does font-weight do? (a) makes letters bigger (b) centres a heading (c) makes the text bold (d) picks the font style
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep
  8. 8.True or false: CSS sets colours and fonts. (a) False (b) True
  9. 9.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  10. 10.🔍 Which is the odd one out? (a) changes the page live (b) lays out the page (c) reacts to a button click (d) checks a quiz answer
  11. 11.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
  12. 12.📋 What number does the browser show next to “Grapes”?
    <ol start="4">
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  13. 13.Which of these is not safe to do online? (a) log out on shared PCs (b) keep passwords secret (c) post your home address (d) use a nickname in games
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  15. 15.Which of these is an opening tag? (a) </li> (b) <title> (c) </h1> (d) </body>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  17. 17.Which of these is padding? (a) a solid or dotted edge (b) space inside the border (c) space outside the border (d) the gap to other boxes
  18. 18.🧩 Which language makes headings and lists? (a) HTML (b) JavaScript (c) CSS
  19. 19.📦 In the box model, which part is space inside the border? (a) margin (b) content (c) border (d) padding
  20. 20.True or false: <ol> shows bullet points. (a) True (b) False
  21. 21.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
    <h2>I love mangoes.</h2>
  22. 22.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  23. 23.✍️ Which property is set to center in this rule?
    h2 {
      text-align: center;
      margin: 10px;
      font-weight: bold;
      color: red;
    }
    (a) margin (b) center (c) background-color (d) text-align
  24. 24.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 7; i = i + 2) {
      console.log(i);
    }
  25. 25.Which of these is a strong password? (a) Kite_Fl1es@Dawn (b) qwerty (c) riya2014 (d) password
  26. 26.True or false: in <img>, alt sets how tall it is. (a) True (b) False
  27. 27.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  28. 28.⚡ What number does this code print?
    let marks = 27;
    marks = marks + 4;
    marks = marks - 29;
    console.log(marks);
  29. 29.🎨 One CSS file can style how many pages? (a) only one word (b) no pages (c) many pages (d) only one image
  30. 30.🎯 What kind of selector is body? (a) a class selector (b) an id selector (c) an element selector
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) map.png (b) Birthday cake (c) Map of India (d) width
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Rivers flow</p>
  33. 33.Which of these is padding? (a) the text or picture (b) a solid or dotted edge (c) space outside the border (d) the gap round content
  34. 34.🖌️ Which CSS property centres a heading? (a) text-align (b) color (c) font-family (d) background-color
  35. 35.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) Art corner (c) School news (d) href
  36. 36.🔒 Is the connection to this address scrambled (encrypted)?
    https://learn.example.com/index.html
    (a) No (b) Yes
  37. 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
  39. 39.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) only the printer (d) nobody
  40. 40.🛡️ Should you share your password with your best friend? (a) No (b) Yes

Answer key

  1. log out on shared PCs
  2. 2
  3. 10
  4. Yes
  5. 45
  6. makes the text bold
  7. A tiger asleep
  8. True
  9. a web browser
  10. lays out the page
  11. the later one
  12. 5
  13. post your home address
  14. F
  15. <title>
  16. A happy dog
  17. space inside the border
  18. HTML
  19. padding
  20. False
  21. 3
  22. 10
  23. text-align
  24. 6
  25. Kite_Fl1es@Dawn
  26. False
  27. True
  28. 2
  29. many pages
  30. an element selector
  31. Map of India
  32. 3
  33. the gap round content
  34. text-align
  35. Art corner
  36. Yes
  37. as one space
  38. <h1>
  39. screen-reader users
  40. No

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