← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 487 · 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: HTML on its own can run a game loop. (a) True (b) False
  2. 2.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  3. 3.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  5. 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
  7. 7.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
  8. 8.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) art.html (b) About us (c) href (d) Play games
  9. 9.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  12. 12.True or false: <a> goes in the head. (a) False (b) True
  13. 13.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as one space (d) as 5 spaces
  14. 14.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <body>
  15. 15.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) width (c) Map of India (d) A red kite
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) I like to read. (c) index.html (d) Cricket Club
  18. 18.True or false: a web server is where we type code. (a) False (b) True
  19. 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  20. 20.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
  22. 22.True or false: <li> goes inside ul or ol. (a) True (b) False
  23. 23.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>I love mangoes.</h3>
    <p>I love mangoes.</p>
  24. 24.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  25. 25.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) About us (c) about.html (d) games.html
  26. 26.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.Which of these has a closing tag? (a) <hr> (b) <br> (c) <meta> (d) <li>
  28. 28.Which of these is true of a web browser? (a) has an address bar (b) sends pages over the net (c) is where we type code (d) answers page requests
  29. 29.📄 Can HTML on its own make headings? (a) Yes (b) No
  30. 30.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  31. 31.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Rain today</h4>
    <p>Hello, world!</p>
    <h2>My pets</h2>
  32. 32.Which of these goes in the head? (a) <ul> (b) <style> (c) <h1> (d) <img>
  33. 33.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <h2>My pets</h2>
    <h2>The red kite</h2>
  34. 34.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <h2>Our school trip</h2>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
  35. 35.Which of these goes in the head? (a) <table> (b) <p> (c) <meta charset="utf-8"> (d) <ul>
  36. 36.🔠 Are headings shown in bold by default? (a) No (b) Yes
  37. 37.Which of these is an empty tag? (a) <b> (b) <p> (c) <ul> (d) <input>
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  39. 39.True or false: <ul> lists steps in order. (a) True (b) False
  40. 40.Which of these has a closing tag? (a) <p> (b) <input> (c) <meta> (d) <br>

Answer key

  1. False
  2. element
  3. has a closing tag
  4. a web browser
  5. in the head
  6. to describe the image
  7. <h6>
  8. Play games
  9. in the body
  10. turns HTML into a page
  11. 3
  12. False
  13. as one space
  14. </html>
  15. has a closing tag
  16. A red kite
  17. Cricket Club
  18. False
  19. <ul>
  20. a web browser
  21. alt
  22. True
  23. 2
  24. <!--
  25. quiz.html
  26. in the body
  27. <li>
  28. has an address bar
  29. Yes
  30. an empty tag
  31. 3
  32. <style>
  33. 2
  34. 2
  35. <meta charset="utf-8">
  36. Yes
  37. <input>
  38. 5
  39. False
  40. <p>

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