← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 655 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) Birthday cake (b) Map of India (c) width (d) map.png
  2. 2.🔍 Which is the odd one out? (a) shows line numbers (b) opens web pages for us (c) colours code to help us (d) saves our .html files
  3. 3.Which of these goes in the body? (a) <ul> (b) <title> (c) <meta charset="utf-8"> (d) <style>
  4. 4.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Welcome! (b) We won by 5 runs. (c) Space Facts (d) index.html
  6. 6.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  7. 7.Which of these is an opening tag? (a) </h1> (b) </body> (c) <h1> (d) </b>
  8. 8.True or false: a web browser is where we type code. (a) False (b) True
  9. 9.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  10. 10.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>I love mangoes.</h2>
    <p>Good morning!</p>
    <h4>Cricket is fun.</h4>
  11. 11.📄 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>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) index.html (c) All about me (d) Art Gallery
  12. 12.Which of these goes in the head? (a) <img> (b) <table> (c) <title> (d) <h1>
  13. 13.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Art corner (b) about.html (c) Maths fun (d) href
  14. 14.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) news.html (c) About us (d) href
  15. 15.Which of these is an empty tag? (a) <b> (b) <h1> (c) <br> (d) <p>
  16. 16.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  17. 17.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  18. 18.📄 Can HTML on its own make a form? (a) No (b) Yes
  19. 19.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  20. 20.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) My pets (b) My best friend (c) Our school trip
  22. 22.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  23. 23.🔍 One closing tag is missing. Which one?
    <i>My pets</i>
    <b>Good morning!</b>
    <h2>My best friend
    (a) </b> (b) </i> (c) </h1> (d) </h2>
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) href (c) maths.html (d) School news
  25. 25.🔍 One closing tag is missing. Which one?
    <em>My pets
    <h2>Fun facts</h2>
    <small>Hello, world!</small>
    (a) </small> (b) </h2> (c) </u> (d) </em>
  26. 26.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  27. 27.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
  28. 28.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  29. 29.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  30. 30.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
  31. 31.True or false: <a> goes in the head. (a) True (b) False
  32. 32.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts</b>
    line 2: <h2>My pets
    line 3: <small>The red kite</small>
    (a) line 3 (b) line 2 (c) line 1
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) The full moon (b) width (c) A happy dog (d) dog.jpg
  35. 35.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
  36. 36.True or false: a web browser sends pages over the net. (a) False (b) True
  37. 37.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <body> (c) </body> (d) </html>
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
  39. 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </body> (c) <!DOCTYPE html> (d) <body>

Answer key

  1. Map of India
  2. opens web pages for us
  3. <ul>
  4. <h2>
  5. Space Facts
  6. in the same tab
  7. <h1>
  8. False
  9. <!DOCTYPE html>
  10. 3
  11. Art Gallery
  12. <title>
  13. Maths fun
  14. About us
  15. <br>
  16. <ul>
  17. a line across the page
  18. Yes
  19. to leave notes
  20. a code editor
  21. My pets
  22. in a new tab
  23. </h2>
  24. Art corner
  25. </em>
  26. 2
  27. src
  28. href
  29. <h6>
  30. <h1>
  31. False
  32. numbers
  33. line 2
  34. A happy dog
  35. alt
  36. False
  37. </html>
  38. <h6>
  39. has a closing tag
  40. <!DOCTYPE html>

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