← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 232 · 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.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.🔁 How many numbers does this code print?
    for (let i = 0; i < 19; i = i + 2) {
      console.log(i);
    }
  3. 3.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
  4. 4.Which of these is an empty tag? (a) <ul> (b) <p> (c) <meta> (d) <b>
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  7. 7.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) <html>
  8. 8.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  9. 9.⚡ Which JavaScript word runs code when true? (a) console.log() (b) alert() (c) for (d) if
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
  11. 11.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Grapes</td><td>Guava</td><td>Papaya</td></tr>
      <tr><td>Grapes</td><td>Mango</td><td>Orange</td><td>Jamun</td></tr>
    </table>
  12. 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  13. 13.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) HyperText (d) Home Text
  14. 14.True or false: .big is a class selector. (a) True (b) False
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <i>Our school trip</i>
    line 2: <h2>My pets</h2>
    line 3: <u>Good morning!
    (a) line 2 (b) line 1 (c) line 3
  16. 16.What is <input type="submit"> for? (a) lets you pick only one (b) sends the form (c) lets you tick many (d) picks a day
  17. 17.Which of these is padding? (a) the gap round content (b) the text or picture (c) the gap to other boxes (d) space outside the border
  18. 18.Which of these is an opening tag? (a) </li> (b) </title> (c) </body> (d) <p>
  19. 19.True or false: in <img>, height shows if the image fails. (a) False (b) True
  20. 20.What does justify-content: flex-start do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  21. 21.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) news.html (b) art.html (c) maths.html (d) Maths fun
  22. 22.✍️ What value is given to text-align in this rule?
    #top {
      background-color: yellow;
      text-align: center;
      padding: 8px;
      width: 300px;
    }
    (a) yellow (b) center (c) text-align (d) 10px
  23. 23.🎯 What kind of selector is #end? (a) an element selector (b) an id selector (c) a class selector
  24. 24.True or false: HTML on its own can make tables. (a) True (b) False
  25. 25.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) map.png (b) cake.jpg (c) dog.jpg (d) Map of India
  26. 26.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <a> (d) <link>
  27. 27.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      color: red;
    }
  28. 28.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + i;
    }
    console.log(total);
  29. 29.True or false: <li> is an ordered list. (a) False (b) True
  30. 30.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  31. 31.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Blue
      <input type="radio" name="colour"> Red
      <input type="radio" name="colour"> Green
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Orange
    </form>
  32. 32.True or false: console.log(5 + 2); goes in index.html. (a) False (b) True
  33. 33.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
  34. 34.Which of these is true of <header>? (a) sits at the bottom (b) holds the menu of links (c) holds extra side notes (d) holds the logo and title
  35. 35.What is <input type="radio"> for? (a) takes only numbers (b) lets you pick only one (c) hides what you type (d) is for one line of words
  36. 36.🎯 What kind of selector is p? (a) a class selector (b) an element selector (c) an id selector
  37. 37.📝 Which input type picks a day? (a) number (b) password (c) date (d) radio
  38. 38.🖌️ How big is the text, in px?
    li {
      font-size: 20px;
      background-color: black;
      text-align: center;
      color: purple;
    }
  39. 39.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 36px;
      text-align: center;
      color: white;
      background-color: yellow;
    }
    (a) on the left (b) on the right (c) in the middle
  40. 40.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. an opening tag
  2. 10
  3. the body
  4. <meta>
  5. opens it in a new tab
  6. A tiger asleep
  7. </html>
  8. Yes
  9. if
  10. 3
  11. 4
  12. <!DOCTYPE html>
  13. HyperText
  14. True
  15. line 3
  16. sends the form
  17. the gap round content
  18. <p>
  19. False
  20. packs boxes at the start
  21. maths.html
  22. center
  23. an id selector
  24. True
  25. map.png
  26. <link>
  27. 1
  28. 15
  29. False
  30. <ul>
  31. 1
  32. False
  33. easy to read
  34. holds the logo and title
  35. lets you pick only one
  36. an element selector
  37. date
  38. 20
  39. in the middle
  40. in the head

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