← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 64 · 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 code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
  2. 2.Which of these is true of a web server? (a) saves our .html files (b) has an address bar (c) answers page requests (d) colours code to help us
  3. 3.Which of these is an empty tag? (a) <b> (b) <title> (c) <meta> (d) <p>
  4. 4.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) <\h1> (d) </h1>
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  6. 6.True or false: in <img>, width tells which image to load. (a) True (b) False
  7. 7.True or false: in <img>, height sets how tall it is. (a) False (b) True
  8. 8.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <h2>I love mangoes.</h2>
    <p>Fun facts</p>
    <p>Our school trip</p>
  9. 9.True or false: <p> is an empty tag. (a) False (b) True
  10. 10.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  11. 11.Which of these has a closing tag? (a) <input> (b) <img> (c) <title> (d) <br>
  12. 12.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today</strong>
    line 2: <p>Cricket is fun.
    line 3: <h1>Hello, world!</h1>
    (a) line 2 (b) line 1 (c) line 3
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) My Hobbies (c) I like to read. (d) Planets
  16. 16.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) art.html (b) https://example.com (c) maths.html (d) About us
  17. 17.Which of these is an opening tag? (a) </p> (b) </li> (c) <li> (d) </h1>
  18. 18.True or false: HTML on its own can add up two numbers. (a) True (b) False
  19. 19.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  20. 20.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    (a) My best friend (b) My pets (c) Good morning!
  21. 21.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <img>
  22. 22.Which of these is an opening tag? (a) </title> (b) </b> (c) </p> (d) <h1>
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) I like to read. (c) All about me (d) index.html
  24. 24.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    (a) I love mangoes. (b) Good morning! (c) Hello, world!
  25. 25.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  26. 26.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>Fun facts</p>
  27. 27.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    (a) The red kite (b) My pets (c) Our school trip (d) I love mangoes.
  28. 28.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
  29. 29.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.True or false: in <img>, src describes the picture. (a) True (b) False
  31. 31.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
  32. 32.True or false: <li> lists things in any order. (a) True (b) False
  33. 33.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  34. 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  36. 36.Which of these goes in the head? (a) <img> (b) <a> (c) <ul> (d) <title>
  37. 37.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) contact.html (b) https://example.com (c) maths.html (d) School news
  38. 38.Which of these goes in the head? (a) <h1> (b) <img> (c) <p> (d) <meta charset="utf-8">
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
  40. 40.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) tags (d) wires

Answer key

  1. <a href="about.html">
  2. answers page requests
  3. <meta>
  4. </h1>
  5. 2
  6. False
  7. True
  8. 3
  9. False
  10. 1
  11. <title>
  12. opens it in a new tab
  13. bullets
  14. line 2
  15. My Hobbies
  16. https://example.com
  17. <li>
  18. False
  19. Yes
  20. Good morning!
  21. <img>
  22. <h1>
  23. Art Gallery
  24. Good morning!
  25. on the browser tab
  26. 1
  27. I love mangoes.
  28. </p>
  29. a closing tag
  30. False
  31. HyperText
  32. False
  33. Yes
  34. <h1>
  35. 4
  36. <title>
  37. contact.html
  38. <meta charset="utf-8">
  39. 1
  40. tags

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