← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 478 · 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.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) Cricket Club (d) My drawings
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Birthday cake (b) width (c) map.png (d) Map of India
  4. 4.What does text-align do? (a) colours behind the text (b) makes letters bigger (c) picks the font style (d) centres a heading
  5. 5.True or false: <ol> lists steps in order. (a) False (b) True
  6. 6.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) The red kite (b) Our school trip (c) I love mangoes. (d) My pets
  7. 7.Which of these does HTML do? (a) sets colours and fonts (b) counts down a timer (c) gives the page structure (d) shows a pop-up message
  8. 8.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) red (d) cyan
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  11. 11.True or false: the browser shows the page to you. (a) True (b) False
  12. 12.True or false: #main is an element selector. (a) False (b) True
  13. 13.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  14. 14.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <code> (c) <script> (d) <js>
  15. 15.🎯 Which element does the selector h2 style? (a) <span id="logo"> (b) <div class="red"> (c) <li> (d) <h2 class="red">
  16. 16.True or false: alert(score); goes in style.css. (a) True (b) False
  17. 17.📝 Which tag gives a form box a name you can click? (a) <title> (b) <h1> (c) <label> (d) <hr>
  18. 18.🖌️ Where does the text sit on its line?
    p {
      background-color: blue;
      font-size: 32px;
      text-align: right;
      color: white;
    }
    (a) on the left (b) in the middle (c) on the right
  19. 19.Which of these is a closing tag? (a) </b> (b) <title> (c) <b> (d) <body>
  20. 20.⚖️ What colour is the text of this element?
    <h1 class="note" id="logo">Hi</h1>
    CSS:
    h1 { color: green; }
    h1 { color: yellow; }
    (a) yellow (b) white (c) green (d) purple
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
  22. 22.🧩 Which language rounds box corners? (a) JavaScript (b) HTML (c) CSS
  23. 23.⚖️ What colour is the text of this element?
    <h2 class="star" id="main">Hi</h2>
    CSS:
    h2 { color: yellow; }
    h2 { color: orange; }
    (a) yellow (b) red (c) white (d) orange
  24. 24.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  25. 25.⚡ Which word makes a new variable? (a) give (b) let (c) put (d) make
  26. 26.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  28. 28.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>Good morning!</h2>
    <p>My best friend</p>
  29. 29.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
  31. 31.📊 Which tag holds the whole table? (a) <td> (b) <tr> (c) <table> (d) <caption>
  32. 32.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 5; i = i + 2) {
      console.log(i);
    }
  33. 33.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <html> (c) </body> (d) <!DOCTYPE html>
  34. 34.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 140px;
      padding: 25px;
      border: 2px solid black;
      margin: 15px;
    }
  35. 35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 190px;
      padding: 20px;
      border: 1px solid black;
      margin: 0px;
    }
  36. 36.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  37. 37.✍️ In color: blue; which part is the value? (a) : (b) ; (c) blue (d) color
  38. 38.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
  39. 39.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.True or false: <img> goes in the head. (a) False (b) True

Answer key

  1. <!--
  2. My drawings
  3. Map of India
  4. centres a heading
  5. True
  6. Our school trip
  7. gives the page structure
  8. magenta
  9. 300
  10. 255
  11. True
  12. False
  13. 50
  14. <script>
  15. <h2 class="red">
  16. False
  17. <label>
  18. on the right
  19. </b>
  20. yellow
  21. 2
  22. CSS
  23. orange
  24. 2
  25. let
  26. <a>
  27. 150
  28. 2
  29. a closing tag
  30. <h1>
  31. <table>
  32. 4
  33. <!DOCTYPE html>
  34. 224
  35. 232
  36. an id selector
  37. blue
  38. False
  39. an opening tag
  40. False

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