← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 353 · 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 odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) is where we type code
  2. 2.Which of these is an opening tag? (a) </h1> (b) </p> (c) <body> (d) </li>
  3. 3.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
  4. 4.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab
  5. 5.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) width (d) src
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  7. 7.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  9. 9.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>My pets</h3>
    <p>I love mangoes.</p>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Kites fly high<br>Birds sing</p>
  11. 11.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  12. 12.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <h2>Fun facts</h2>
  13. 13.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) </html>
  14. 14.True or false: <li> goes inside ul or ol. (a) True (b) False
  15. 15.True or false: <input> is an empty tag. (a) False (b) True
  16. 16.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
  17. 17.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  18. 18.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  19. 19.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  20. 20.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  22. 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  24. 24.🔗 Where does this link open?
    <a href="art.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  25. 25.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
  26. 26.Which of these is an opening tag? (a) <b> (b) </title> (c) </b> (d) </p>
  27. 27.📄 Can HTML on its own make tables? (a) No (b) Yes
  28. 28.Which of these is an empty tag? (a) <h1> (b) <p> (c) <img> (d) <li>
  29. 29.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Rain today</p> -->
  31. 31.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>My best friend</h3>
    <h4>Rain today</h4>
    <h4>Hello, world!</h4>
    <h3>I love mangoes.</h3>
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  34. 34.Which of these is true of a web server? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) shows pages from the web
  35. 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  36. 36.Which of these goes in the head? (a) <h1> (b) <style> (c) <p> (d) <img>
  37. 37.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  38. 38.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  39. 39.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  40. 40.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1/> (d) <h1>

Answer key

  1. has an address bar
  2. <body>
  3. a paragraph
  4. in the same tab
  5. width
  6. 3
  7. has a closing tag
  8. href
  9. 2
  10. 4
  11. 4
  12. 3
  13. </html>
  14. True
  15. True
  16. a line across the page
  17. <a href="about.html">
  18. bullets
  19. False
  20. an opening tag
  21. 100
  22. an empty tag
  23. on the browser tab
  24. in a new tab
  25. the body
  26. <b>
  27. Yes
  28. <img>
  29. in the head
  30. 1
  31. in the body
  32. 5
  33. 50
  34. stores a website’s files
  35. a slash /
  36. <style>
  37. in the same tab
  38. No
  39. 3
  40. </h1>

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