← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 596 · 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 of these is an empty tag? (a) <b> (b) <ul> (c) <title> (d) <meta>
  2. 2.True or false: <li> lists things in any order. (a) False (b) True
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  4. 4.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
  5. 5.True or false: in <img>, height is read by screen readers. (a) False (b) True
  6. 6.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) A red kite (b) Map of India (c) kite.png (d) width
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Good morning! (c) Our school trip
  9. 9.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) Good morning! (b) Cricket is fun. (c) My pets
  10. 10.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  11. 11.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
  12. 12.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
  14. 14.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow</p>
  16. 16.True or false: <style> goes in the head. (a) True (b) False
  17. 17.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    (a) Rain today (b) Good morning! (c) Fun facts
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  19. 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  21. 21.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  22. 22.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  23. 23.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
  24. 24.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
  25. 25.True or false: <li> is an empty tag. (a) False (b) True
  26. 26.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
  28. 28.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
  29. 29.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  33. 33.True or false: <h1> goes in the head. (a) True (b) False
  34. 34.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  35. 35.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png
  36. 36.📋 What number does the browser show next to “Mango”?
    <ol start="3">
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  37. 37.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
  38. 38.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) maths.html (d) href
  39. 39.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  40. 40.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>

Answer key

  1. <meta>
  2. False
  3. 50
  4. a line across the page
  5. False
  6. a plain text editor
  7. A red kite
  8. Hello, world!
  9. Cricket is fun.
  10. 2
  11. a web browser
  12. 5
  13. 1
  14. alt
  15. 2
  16. True
  17. Good morning!
  18. <h1>
  19. has a closing tag
  20. <ol>
  21. <a>
  22. <!DOCTYPE html>
  23. <h6>
  24. the body
  25. False
  26. an opening tag
  27. 2
  28. 4
  29. a code editor
  30. 300
  31. <h4>
  32. 6
  33. False
  34. width
  35. cake.jpg
  36. 4
  37. <h1>
  38. Take the quiz
  39. <!--
  40. 2

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