← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 861 · 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.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b> (d) <b/>
  2. 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  3. 3.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
  5. 5.Which of these goes in the head? (a) <p> (b) <ul> (c) <a> (d) <meta charset="utf-8">
  6. 6.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) cake.jpg (b) moon.png (c) Birthday cake (d) dog.jpg
  7. 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  8. 8.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Good morning!</p>
    <h2>Fun facts</h2>
    <p>My pets</p>
  9. 9.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) is where we type code (d) has an address bar
  10. 10.True or false: HTML on its own cannot make tables. (a) False (b) True
  11. 11.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) body (c) Class 7 Blog (d) All about me
  13. 13.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
  14. 14.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
  15. 15.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  16. 16.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow</p>
  20. 20.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Good morning!</h3>
    <h3>My pets</h3>
    <p>My best friend</p>
    <h3>Our school trip</h3>
  21. 21.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.📋 What number does the browser show next to “Grapes”?
    <ol start="7">
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  23. 23.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) saves our .html files (d) hosts websites online
  24. 24.True or false: <ol> is an unordered list. (a) True (b) False
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  26. 26.True or false: <ul> lists steps in order. (a) True (b) False
  27. 27.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <style>
  28. 28.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <a> (c) <h1> (d) <ul>
  29. 29.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  30. 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  32. 32.True or false: <ol> lists things in any order. (a) False (b) True
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Match report (b) Riya’s Recipes (c) index.html (d) I like to read.
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) width (b) Map of India (c) kite.png (d) A red kite
  35. 35.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  36. 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h3>My best friend</h3>
    line 2: <u>Hello, world!
    line 3: <strong>My pets</strong>
    (a) line 1 (b) line 2 (c) line 3
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
  39. 39.Which of these is true of a web server? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) opens web pages for us
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">

Answer key

  1. </b>
  2. No
  3. True
  4. 4
  5. <meta charset="utf-8">
  6. cake.jpg
  7. Yes
  8. 5
  9. has an address bar
  10. False
  11. <h1>
  12. All about me
  13. </small>
  14. </h1>
  15. element
  16. <h1>
  17. 350
  18. 1
  19. 5
  20. 4
  21. has a closing tag
  22. 10
  23. hosts websites online
  24. False
  25. <h5>
  26. False
  27. <style>
  28. <link rel="stylesheet">
  29. 4
  30. <h1>
  31. 4
  32. False
  33. Riya’s Recipes
  34. A red kite
  35. 2
  36. the body
  37. line 2
  38. <h6>
  39. sends pages over the net
  40. 300

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