← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 857 · 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 line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <b>I love mangoes.
    line 3: <h1>Rain today</h1>
    (a) line 2 (b) line 1 (c) line 3
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h2>The red kite
    line 2: <u>Rain today</u>
    line 3: <i>Good morning!</i>
    (a) line 2 (b) line 3 (c) line 1
  3. 3.🔗 Where does this link open?
    <a href="contact.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  4. 4.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <h2> (d) <\h2>
  5. 5.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) news.html
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg
  8. 8.Which of these is true of a web server? (a) answers page requests (b) colours code to help us (c) opens web pages for us (d) has an address bar
  9. 9.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </html> (b) </head>
  10. 10.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
  11. 11.📋 What number does the browser show next to “Papaya”?
    <ol start="4">
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  12. 12.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) games.html (c) Play games (d) news.html
  13. 13.Which of these is an opening tag? (a) </p> (b) <title> (c) </b> (d) </li>
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  15. 15.True or false: in <img>, src names the picture file. (a) False (b) True
  16. 16.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
  17. 17.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <meta charset="utf-8">
  18. 18.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.
    <b>My pets</b>
    <strong>My best friend</strong>
    (a) </h1> (b) </em> (c) </b> (d) </strong>
  19. 19.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  20. 20.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  21. 21.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) sound (d) structure
  22. 22.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  23. 23.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) news.html (b) quiz.html (c) art.html (d) School news
  24. 24.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Rain today</p>
    <p>My best friend</p>
  25. 25.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  26. 26.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) games.html (c) Play games (d) about.html
  27. 27.Which of these is an empty tag? (a) <hr> (b) <b> (c) <h1> (d) <p>
  28. 28.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    (a) Cricket is fun. (b) The red kite (c) Our school trip
  29. 29.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
  30. 30.True or false: <p> has a closing tag. (a) True (b) False
  31. 31.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h5> (d) <h1>
  32. 32.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  33. 33.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
  34. 34.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  35. 35.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
  36. 36.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>My pets</p>
  37. 37.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  38. 38.True or false: <ul> lists things in any order. (a) True (b) False
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <strong>Cricket is fun.
    line 2: <i>My best friend</i>
    line 3: <h2>I love mangoes.</h2>
    (a) line 2 (b) line 3 (c) line 1
  40. 40.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->

Answer key

  1. line 2
  2. line 1
  3. in the same tab
  4. </h2>
  5. Art corner
  6. Yes
  7. A tiger asleep
  8. answers page requests
  9. </head>
  10. a paragraph
  11. 7
  12. news.html
  13. <title>
  14. bullets
  15. True
  16. a slash /
  17. <p>
  18. </em>
  19. Yes
  20. <h6>
  21. structure
  22. False
  23. art.html
  24. 1
  25. True
  26. quiz.html
  27. <hr>
  28. Our school trip
  29. 3
  30. True
  31. <h6>
  32. in the same tab
  33. <html>
  34. <li>
  35. <head>
  36. 1
  37. an empty tag
  38. True
  39. line 1
  40. 2

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