← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 495 · 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 <main>? (a) sits at the very top (b) holds the menu of links (c) helps you move around (d) holds the main content
  2. 2.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
  3. 3.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
  4. 4.🔗 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
  5. 5.True or false: to log out on shared PCs is safe. (a) False (b) True
  6. 6.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
  7. 7.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 18px;
      }
    }
  8. 8.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
  9. 9.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
  10. 10.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  11. 11.True or false: to use a strong password is not safe. (a) False (b) True
  12. 12.🎯 What kind of selector is #logo? (a) an element selector (b) a class selector (c) an id selector
  13. 13.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Litchi</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Guava</td></tr>
    </table>
  14. 14.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) weak (b) strong
  15. 15.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is fast (c) the data is scrambled (d) the site is free
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My Hobbies (b) All about me (c) We won by 5 runs. (d) index.html
  17. 17.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) About us (b) Contact us (c) href (d) games.html
  18. 18.✍️ Which property is set to 10px in this rule?
    p {
      font-style: italic;
      margin: 10px;
    }
    (a) font-weight (b) margin (c) 10px (d) padding
  19. 19.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  20. 20.Which of these is an empty tag? (a) <b> (b) <input> (c) <h1> (d) <ul>
  21. 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  22. 22.🌗 Is yellow on black easy or hard to read? (a) easy to read (b) hard to read
  23. 23.🖌️ What colour are the letters?
    p {
      font-size: 40px;
      background-color: black;
      text-align: left;
      color: red;
    }
    (a) black (b) red (c) purple
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Rain today</p> -->
  25. 25.🔁 How many numbers does this code print?
    for (let i = 0; i < 20; i = i + 4) {
      console.log(i);
    }
  26. 26.🔢 To build and share your first web page, which comes FIRST? (a) add CSS styles (b) plan what to show (c) publish it online (d) write the HTML
  27. 27.🔍 Which is the odd one out? (a) makes a form box (b) makes headings and lists (c) gives the page structure (d) adds space around boxes
  28. 28.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <caption> (d) <tr>
  29. 29.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  30. 30.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
  31. 31.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
  32. 32.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 16px;
      }
    }
    (a) No (b) Yes
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg
  34. 34.🖌️ Where does the text sit on its line?
    li {
      font-size: 20px;
      text-align: right;
      color: green;
      background-color: white;
    }
    (a) in the middle (b) on the right (c) on the left
  35. 35.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  36. 36.🔁 Which word runs code only when something is true? (a) for (b) let (c) if (d) log
  37. 37.🎯 What kind of selector is #end? (a) an id selector (b) an element selector (c) a class selector
  38. 38.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) turns HTML into a page (d) hosts websites online
  39. 39.Which of these is the border? (a) a solid or dotted edge (b) space outside the border (c) the text or picture (d) space inside the border
  40. 40.Which of these does HTML do? (a) adds space around boxes (b) makes a link (c) shows a pop-up message (d) counts down a timer

Answer key

  1. holds the main content
  2. alt
  3. 16
  4. in a new tab
  5. True
  6. an element selector
  7. 20
  8. hard to read
  9. screen-reader users
  10. No
  11. False
  12. an id selector
  13. 2
  14. strong
  15. the data is scrambled
  16. My Hobbies
  17. About us
  18. margin
  19. 80
  20. <input>
  21. a web browser
  22. easy to read
  23. red
  24. 1
  25. 5
  26. plan what to show
  27. adds space around boxes
  28. <caption>
  29. <ul>
  30. True
  31. { }
  32. Yes
  33. A tiger asleep
  34. on the right
  35. href
  36. if
  37. an id selector
  38. hosts websites online
  39. a solid or dotted edge
  40. makes a link

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