← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 131 · 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.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>My pets</h3>
    <p>Rain today</p>
  2. 2.💬 Does the browser show comments on the page? (a) Yes (b) No
  3. 3.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  4. 4.True or false: in <img>, height is read by screen readers. (a) False (b) True
  5. 5.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  6. 6.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) quiz.html (b) news.html (c) Maths fun (d) games.html
  7. 7.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
  8. 8.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) dog.jpg (b) cake.jpg (c) map.png (d) Map of India
  10. 10.True or false: in <img>, alt tells which image to load. (a) True (b) False
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  12. 12.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red<br>Rivers flow</p>
  14. 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg
  16. 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
  17. 17.Which of these is an empty tag? (a) <b> (b) <ul> (c) <li> (d) <hr>
  18. 18.Which of these is a closing tag? (a) <title> (b) <b> (c) </li> (d) <p>
  19. 19.True or false: <style> goes in the head. (a) True (b) False
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  21. 21.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Our school trip</h4>
    <p>Rain today</p>
    <p>Our school trip</p>
  22. 22.🔍 One closing tag is missing. Which one?
    <u>My best friend
    <small>Good morning!</small>
    <h1>My pets</h1>
    (a) </h1> (b) </small> (c) </u> (d) </strong>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
  24. 24.Which of these goes in the head? (a) <ul> (b) <table> (c) <a> (d) <title>
  25. 25.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  26. 26.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
  27. 27.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <h2>Cricket is fun.</h2>
  28. 28.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  29. 29.Which of these is an opening tag? (a) </p> (b) </body> (c) <li> (d) </h1>
  30. 30.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  31. 31.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <html> (c) <!DOCTYPE html> (d) </html>
  32. 32.True or false: <li> is an unordered list. (a) True (b) False
  33. 33.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  34. 34.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  35. 35.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    (a) Fun facts (b) The red kite (c) Our school trip (d) Cricket is fun.
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <u>I love mangoes.</u>
    line 2: <em>Fun facts</em>
    line 3: <h3>Hello, world!
    (a) line 2 (b) line 3 (c) line 1
  37. 37.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) Play games (b) games.html (c) href (d) Take the quiz
  38. 38.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) A tiger asleep (b) kite.png (c) map.png (d) tiger.jpg
  39. 39.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
  40. 40.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>

Answer key

  1. 2
  2. No
  3. a web browser
  4. False
  5. -->
  6. news.html
  7. 3
  8. has a closing tag
  9. map.png
  10. False
  11. 200
  12. Yes
  13. 4
  14. <!DOCTYPE html>
  15. dog.jpg
  16. src
  17. <hr>
  18. </li>
  19. True
  20. Yes
  21. 2
  22. </u>
  23. 1
  24. <title>
  25. kite.png
  26. a plain text editor
  27. 3
  28. element
  29. <li>
  30. a slash /
  31. </html>
  32. False
  33. 2
  34. <h5>
  35. Cricket is fun.
  36. line 3
  37. Take the quiz
  38. tiger.jpg
  39. the body
  40. 2

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