← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 366 · 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 heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
  2. 2.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) https://example.com (c) maths.html (d) contact.html
  3. 3.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  4. 4.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  5. 5.True or false: <ul> is one item of a list. (a) False (b) True
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue</p>
  7. 7.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) pixels (d) tags
  8. 8.Which of these is an empty tag? (a) <ul> (b) <title> (c) <b> (d) <img>
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Welcome! (d) Thanks for visiting.
  10. 10.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  13. 13.Which of these goes in the head? (a) <p> (b) <table> (c) <h1> (d) <style>
  14. 14.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
  15. 15.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) Rain today (b) The red kite (c) Hello, world!
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Thanks for visiting. (c) Planets (d) My Hobbies
  18. 18.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
  20. 20.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
  21. 21.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  22. 22.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  24. 24.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  25. 25.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  27. 27.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) href (c) https://example.com (d) Art corner
  28. 28.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg
  29. 29.🔠 Are headings shown in bold by default? (a) Yes (b) No
  30. 30.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <b>Rain today</b>
    <h3>My pets
    (a) </h1> (b) </i> (c) </b> (d) </h3>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) Birthday cake (c) map.png (d) width
  34. 34.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) cake.jpg (c) moon.png (d) dog.jpg
  35. 35.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  36. 36.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  38. 38.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  39. 39.📄 Can HTML on its own make a form? (a) Yes (b) No
  40. 40.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <h2>Hello, world!</h2>
    <h2>My pets</h2>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>

Answer key

  1. <h2>
  2. contact.html
  3. a code editor
  4. <
  5. False
  6. 3
  7. tags
  8. <img>
  9. Riya’s Recipes
  10. <h5>
  11. alt
  12. <h1>
  13. <style>
  14. 4
  15. No
  16. Hello, world!
  17. Planets
  18. a line across the page
  19. 1
  20. 3
  21. <li>
  22. a code editor
  23. <h6>
  24. a code editor
  25. in the head
  26. 6
  27. Maths fun
  28. fort.jpg
  29. Yes
  30. </h3>
  31. 2
  32. <h4>
  33. Map of India
  34. cake.jpg
  35. <ul>
  36. 3
  37. 1
  38. in the head
  39. Yes
  40. 1

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