← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 332 · 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.True or false: <p>Hello!</p> goes in script.js. (a) False (b) True
  2. 2.⚖️ What colour is the text of this element?
    <h2 class="menu" id="logo">Hi</h2>
    CSS:
    #logo { color: red; }
    .menu { color: green; }
    (a) yellow (b) red (c) green (d) orange
  3. 3.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the shorter one (d) the first one
  4. 4.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  6. 6.True or false: <title> goes in the body. (a) True (b) False
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  8. 8.📝 Which tag makes a drop-down list? (a) <li> (b) <ol> (c) <select> (d) <ul>
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 80px;
      padding: 5px;
      border: 4px solid black;
      margin: 15px;
    }
  11. 11.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  12. 12.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  13. 13.🎯 Which sign starts an id selector? (a) @ (b) # (c) & (d) .
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Mars is red. (d) Planets
  15. 15.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
  16. 16.🖌️ What colour are the letters?
    h1 {
      background-color: red;
      font-size: 28px;
      text-align: left;
      color: yellow;
    }
    (a) red (b) purple (c) yellow
  17. 17.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
    <h2>My pets</h2>
    <p>Good morning!</p>
  18. 18.True or false: HTML on its own can make links to pages. (a) False (b) True
  19. 19.📄 Can HTML on its own make a form? (a) Yes (b) No
  20. 20.True or false: a code editor saves our .html files. (a) False (b) True
  21. 21.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) flex-start (d) center
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  23. 23.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
  24. 24.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  26. 26.📊 Which tag makes one table row? (a) <td> (b) <tr> (c) <caption> (d) <table>
  27. 27.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Banana</td><td>Grapes</td></tr>
      <tr><td>Guava</td><td>Mango</td></tr>
    </table>
  28. 28.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) strong (b) weak
  29. 29.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  30. 30.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) nobody (d) only the printer
  31. 31.⚡ What number does this code print?
    let score = 26;
    score = score + 16;
    score = score - 6;
    console.log(score);
  32. 32.⚡ What does alert() show? (a) a new tab (b) a pop-up box (c) a table (d) a picture
  33. 33.True or false: console.log(5 + 2); goes in style.css. (a) False (b) True
  34. 34.📊 In a table, which tag is a row? (a) <tb> (b) <th> (c) <td> (d) <tr>
  35. 35.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  36. 36.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the end (c) equal gaps, none at ends (d) packs boxes at the start
  37. 37.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it adds pictures (d) it makes text red
  38. 38.📝 Which input type sends the form? (a) password (b) number (c) email (d) submit
  39. 39.📱 What does a media query check? (a) the screen width (b) the page title (c) the time of day (d) the battery level
  40. 40.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server

Answer key

  1. False
  2. red
  3. the later one
  4. Yes
  5. opens it in a new tab
  6. False
  7. A red kite
  8. <select>
  9. bullets
  10. 128
  11. <ol>
  12. -->
  13. #
  14. Riya’s Recipes
  15. <title>
  16. yellow
  17. 2
  18. True
  19. Yes
  20. True
  21. space-between
  22. <h2>
  23. </h2>
  24. in the body
  25. No
  26. <tr>
  27. 2
  28. strong
  29. 2
  30. screen-reader users
  31. 36
  32. a pop-up box
  33. False
  34. <tr>
  35. starts a new line
  36. equal gaps, none at ends
  37. it tells its meaning
  38. submit
  39. the screen width
  40. a web browser

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