← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 768 · 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: <i>Good morning!</i>
    line 2: <h3>Our school trip
    line 3: <small>Fun facts</small>
    (a) line 2 (b) line 1 (c) line 3
  2. 2.True or false: in <img>, alt describes the picture. (a) True (b) False
  3. 3.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Stars shine</p>
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
  6. 6.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  7. 7.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) Hot Tags (d) HyperText
  8. 8.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  9. 9.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    (a) Our school trip (b) The red kite (c) I love mangoes.
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Space Facts (c) Match report (d) Try this poha.
  13. 13.True or false: <ol> goes inside ul or ol. (a) True (b) False
  14. 14.True or false: <b> has a closing tag. (a) False (b) True
  15. 15.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  17. 17.Which of these is true of a web browser? (a) sends pages over the net (b) has an address bar (c) hosts websites online (d) is where we type code
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  19. 19.True or false: <li> goes inside ul or ol. (a) False (b) True
  20. 20.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) quiz.html (b) About us (c) art.html (d) news.html
  21. 21.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.</small>
    line 2: <p>I love mangoes.</p>
    line 3: <strong>My pets
    (a) line 3 (b) line 2 (c) line 1
  23. 23.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  24. 24.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
  25. 25.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png
  26. 26.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  27. 27.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  28. 28.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) shows pages from the web (d) turns HTML into a page
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  30. 30.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
  31. 31.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) cake.jpg (b) kite.png (c) A red kite (d) map.png
  32. 32.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) map.png (b) kite.png (c) A red kite (d) cake.jpg
  33. 33.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  34. 34.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) My best friend (b) I love mangoes. (c) Cricket is fun. (d) Hello, world!
  35. 35.Which of these is an opening tag? (a) </p> (b) <li> (c) </h1> (d) </b>
  36. 36.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
  37. 37.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) The red kite (c) Cricket is fun.
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  39. 39.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
  40. 40.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>

Answer key

  1. line 2
  2. True
  3. 4
  4. 3
  5. <h1>
  6. <li>
  7. HyperText
  8. a web browser
  9. has a closing tag
  10. The red kite
  11. <h1>
  12. Match report
  13. False
  14. True
  15. </strong>
  16. Map of India
  17. has an address bar
  18. A happy dog
  19. True
  20. art.html
  21. in a new tab
  22. line 3
  23. numbers
  24. 3
  25. moon.png
  26. has a closing tag
  27. width
  28. colours code to help us
  29. Yes
  30. a paragraph
  31. kite.png
  32. kite.png
  33. a web browser
  34. Cricket is fun.
  35. <li>
  36. a line across the page
  37. Good morning!
  38. <h1>
  39. <h1>
  40. <h6>

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