← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 427 · 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) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) The full moon (c) width (d) Our school bus
  3. 3.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
  5. 5.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
  6. 6.Which of these is a closing tag? (a) <p> (b) </p> (c) <b> (d) <title>
  7. 7.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  8. 8.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  9. 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  10. 10.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <h1>Fun facts</h1>
    line 2: <p>Our school trip
    line 3: <b>My pets</b>
    (a) line 3 (b) line 2 (c) line 1
  12. 12.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  14. 14.True or false: in <img>, src sets how wide it is. (a) False (b) True
  15. 15.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h1> (c) <h5> (d) <h3>
  16. 16.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) A red kite (c) map.png (d) cake.jpg
  18. 18.True or false: <ol> is an unordered list. (a) True (b) False
  19. 19.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  20. 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  22. 22.True or false: in <img>, src sets how tall it is. (a) False (b) True
  23. 23.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  24. 24.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
  26. 26.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Roses are red</p>
  28. 28.True or false: HTML on its own can add up two numbers. (a) True (b) False
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
  31. 31.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) School news (b) maths.html (c) contact.html (d) https://example.com
  32. 32.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>My pets</p>
    <h2>Our school trip</h2>
  33. 33.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    (a) Cricket is fun. (b) My pets (c) I love mangoes. (d) Our school trip
  34. 34.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <style> (d) <ul>
  35. 35.🔍 One closing tag is missing. Which one?
    <em>Rain today</em>
    <p>The red kite</p>
    <small>Cricket is fun.
    (a) </em> (b) </p> (c) </small> (d) </strong>
  36. 36.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  37. 37.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  39. 39.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
  40. 40.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>

Answer key

  1. <a href="about.html">
  2. The full moon
  3. an opening tag
  4. <h6>
  5. a paragraph
  6. </p>
  7. width
  8. 6
  9. No
  10. 2
  11. line 2
  12. No
  13. 50
  14. False
  15. <h1>
  16. an opening tag
  17. kite.png
  18. False
  19. a web browser
  20. an empty tag
  21. <ul>
  22. False
  23. Yes
  24. a closing tag
  25. 2
  26. 2
  27. 3
  28. False
  29. <h1>
  30. 5
  31. contact.html
  32. 3
  33. My pets
  34. <ul>
  35. </small>
  36. numbers
  37. <ul>
  38. <h3>
  39. </small>
  40. <li>

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