← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 478 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.True or false: <ul> goes inside ul or ol. (a) True (b) False
  2. 2.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) width (b) Map of India (c) map.png (d) Birthday cake
  4. 4.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  6. 6.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  7. 7.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>The red kite</h2>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
    <p>My pets</p>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  10. 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
  11. 11.🔗 Where does this link open?
    <a href="games.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  12. 12.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!</h3>
    line 2: <u>My pets
    line 3: <b>I love mangoes.</b>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  15. 15.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  16. 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  17. 17.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <title>
  18. 18.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  19. 19.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    (a) Cricket is fun. (b) Rain today (c) My pets (d) The red kite
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
  22. 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  23. 23.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>
    <p>My pets</p>
    <p>The red kite</p>
  24. 24.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  25. 25.🔠 Are headings shown in bold by default? (a) Yes (b) No
  26. 26.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) Play games (b) href (c) About us (d) art.html
  28. 28.Which of these is a closing tag? (a) <body> (b) <p> (c) </li> (d) <title>
  29. 29.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) Good morning! (b) Our school trip (c) My pets
  30. 30.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows line numbers
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) An old fort (b) width (c) bus.jpg (d) Our school bus
  32. 32.Which of these is an empty tag? (a) <p> (b) <li> (c) <title> (d) <img>
  33. 33.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) Cricket is fun.
  34. 34.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) Play games (c) Take the quiz (d) href
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  38. 38.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) src (d) height
  39. 39.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) answers page requests (d) saves our .html files
  40. 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. False
  2. <h1>
  3. Map of India
  4. a closing tag
  5. 2
  6. <img>
  7. 3
  8. 1
  9. A happy dog
  10. <h2>
  11. in the same tab
  12. an empty tag
  13. line 2
  14. Language
  15. No
  16. a slash /
  17. <img>
  18. 5
  19. a code editor
  20. The red kite
  21. 1
  22. <!DOCTYPE html>
  23. 3
  24. a code editor
  25. Yes
  26. a closing tag
  27. Play games
  28. </li>
  29. Our school trip
  30. shows line numbers
  31. Our school bus
  32. <img>
  33. Our school trip
  34. has a closing tag
  35. 2
  36. Take the quiz
  37. 2
  38. height
  39. saves our .html files
  40. has a closing tag

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