← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 504 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) opens web pages for us (d) saves our .html files
  4. 4.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  5. 5.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  7. 7.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) quiz.html (b) news.html (c) School news (d) games.html
  8. 8.Which of these is a closing tag? (a) <li> (b) <h1> (c) </p> (d) <b>
  9. 9.True or false: <ul> is an empty tag. (a) False (b) True
  10. 10.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  12. 12.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
  13. 13.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  14. 14.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    (a) Rain today (b) Hello, world! (c) The red kite
  15. 15.Which of these is an empty tag? (a) <ul> (b) <img> (c) <title> (d) <b>
  16. 16.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  17. 17.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  18. 18.True or false: in <img>, alt describes the picture. (a) False (b) True
  19. 19.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="400">
  21. 21.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) About us (b) href (c) Contact us (d) quiz.html
  22. 22.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  23. 23.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) Easy snacks (d) Try this poha.
  24. 24.Which of these is an empty tag? (a) <hr> (b) <b> (c) <p> (d) <h1>
  25. 25.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  27. 27.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  28. 28.🔗 Where does this link open?
    <a href="contact.html">Play games</a>
    (a) in a new tab (b) in the same tab
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) </body>
  32. 32.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) My best friend (b) Cricket is fun. (c) Hello, world!
  35. 35.True or false: a web browser stores a website’s files. (a) True (b) False
  36. 36.True or false: <ul> lists things in any order. (a) True (b) False
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip</h2>
    line 2: <p>Rain today
    line 3: <small>My pets</small>
    (a) line 2 (b) line 1 (c) line 3
  38. 38.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip
    line 2: <h3>Good morning!</h3>
    line 3: <em>My pets</em>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. A tiger asleep
  2. bullets
  3. opens web pages for us
  4. HyperText
  5. an opening tag
  6. True
  7. news.html
  8. </p>
  9. False
  10. 3
  11. 400
  12. <h5>
  13. bus.jpg
  14. The red kite
  15. <img>
  16. href
  17. <ol>
  18. True
  19. 2
  20. 400
  21. About us
  22. a line across the page
  23. Easy snacks
  24. <hr>
  25. has a closing tag
  26. <a>
  27. 1
  28. in the same tab
  29. <h1>
  30. 2
  31. <!DOCTYPE html>
  32. <h1>
  33. numbers
  34. Hello, world!
  35. False
  36. True
  37. line 2
  38. an empty tag
  39. 2
  40. line 1

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