← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 765 · 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.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  2. 2.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>I love mangoes.</h3>
    <h4>Rain today</h4>
  3. 3.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A tiger asleep (b) A red kite (c) tiger.jpg (d) width
  5. 5.True or false: <title> goes in the head. (a) False (b) True
  6. 6.Which of these is true of a web browser? (a) sends pages over the net (b) shows pages from the web (c) hosts websites online (d) answers page requests
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
  8. 8.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
  9. 9.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  10. 10.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  11. 11.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Visit the site (c) href (d) Contact us
  12. 12.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="200">
    (a) The full moon (b) bus.jpg (c) moon.png (d) fort.jpg
  13. 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
  14. 14.True or false: in <img>, src describes the picture. (a) True (b) False
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) moon.png (c) Our school bus (d) The full moon
  16. 16.Which of these is an empty tag? (a) <title> (b) <li> (c) <p> (d) <hr>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  18. 18.📄 Can HTML on its own make tables? (a) No (b) Yes
  19. 19.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in the same tab (b) in a new tab
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!
    line 2: <i>The red kite</i>
    line 3: <strong>Good morning!</strong>
    (a) line 3 (b) line 1 (c) line 2
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue</p>
  22. 22.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) An old fort (b) bus.jpg (c) width (d) Our school bus
  24. 24.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>My best friend</p>
  26. 26.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>Good morning!</p>
  27. 27.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>My pets</h3>
    <h2>Our school trip</h2>
    <h4>Fun facts</h4>
    <h2>The red kite</h2>
  28. 28.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  29. 29.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
  30. 30.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
  31. 31.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Our school trip (c) I love mangoes.
  32. 32.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  33. 33.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
  34. 34.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) stores a website’s files
  35. 35.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) The red kite
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
  38. 38.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  40. 40.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height

Answer key

  1. 2
  2. 3
  3. Language
  4. A tiger asleep
  5. True
  6. shows pages from the web
  7. 3
  8. 2
  9. href
  10. <h1>
  11. Contact us
  12. moon.png
  13. alt
  14. False
  15. The full moon
  16. <hr>
  17. 2
  18. Yes
  19. in the same tab
  20. line 1
  21. 5
  22. 1
  23. Our school bus
  24. a line across the page
  25. 4
  26. 4
  27. 5
  28. 2
  29. 2
  30. a plain text editor
  31. My best friend
  32. the body
  33. <h6>
  34. turns HTML into a page
  35. Fun facts
  36. <h6>
  37. 4
  38. an opening tag
  39. to describe the image
  40. width

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