← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 127 · 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 items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  2. 2.Which of these is an opening tag? (a) </li> (b) </title> (c) <h1> (d) </h1>
  3. 3.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  4. 4.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  5. 5.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) contact.html (d) href
  6. 6.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <ul> (d) <h1>
  7. 7.True or false: <ol> lists things in any order. (a) True (b) False
  8. 8.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg
  9. 9.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Stars shine<br>Rivers flow</p>
  11. 11.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) The full moon (c) Our school bus (d) width
  13. 13.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  15. 15.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
  16. 16.Which of these is true of a web server? (a) saves our .html files (b) colours code to help us (c) shows pages from the web (d) hosts websites online
  17. 17.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  18. 18.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  19. 19.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Roses are red</p>
  21. 21.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) href (c) About us (d) games.html
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) width (b) A red kite (c) Map of India (d) kite.png
  23. 23.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  24. 24.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  25. 25.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  26. 26.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) href (b) School news (c) about.html (d) Take the quiz
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  28. 28.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.True or false: <h1> is an empty tag. (a) True (b) False
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  31. 31.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  32. 32.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) is where we type code (d) opens web pages for us
  33. 33.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) art.html (c) Contact us (d) maths.html
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  35. 35.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) has an address bar (d) turns HTML into a page
  36. 36.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) src (d) alt
  37. 37.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <h2>My pets
    <h1>Our school trip</h1>
    (a) </h2> (b) </h1> (c) </em> (d) </b>
  38. 38.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  39. 39.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) alt (d) width
  40. 40.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>

Answer key

  1. 5
  2. <h1>
  3. opens it in a new tab
  4. map.png
  5. Contact us
  6. <meta charset="utf-8">
  7. False
  8. cake.jpg
  9. a paragraph
  10. 4
  11. an opening tag
  12. The full moon
  13. <a>
  14. 4
  15. 1
  16. hosts websites online
  17. a web server
  18. False
  19. has a closing tag
  20. 3
  21. About us
  22. A red kite
  23. Yes
  24. <!DOCTYPE html>
  25. starts a new line
  26. School news
  27. A red kite
  28. has a closing tag
  29. False
  30. 4
  31. <img>
  32. is where we type code
  33. https://example.com
  34. 4
  35. saves our .html files
  36. height
  37. </h2>
  38. a web browser
  39. width
  40. <h1>

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