← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 37 · 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 heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  3. 3.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
  4. 4.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My pets</h2>
    <p>The red kite</p>
  5. 5.True or false: <hr> has a closing tag. (a) False (b) True
  6. 6.True or false: in <img>, alt describes the picture. (a) True (b) False
  7. 7.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  9. 9.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h3>Our school trip
    <h1>My pets</h1>
    (a) </h1> (b) </h2> (c) </b> (d) </h3>
  10. 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  11. 11.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
  12. 12.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>My best friend</h4>
    <p>Our school trip</p>
    <h3>Fun facts</h3>
  13. 13.Which of these is an opening tag? (a) </body> (b) </h1> (c) </title> (d) <li>
  14. 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  15. 15.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) quiz.html (b) art.html (c) news.html (d) Play games
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  17. 17.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  18. 18.True or false: in <img>, width shows if the image fails. (a) True (b) False
  19. 19.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) href (d) about.html
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>My pets</h3>
    <p>My pets</p>
  21. 21.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    (a) Our school trip (b) The red kite (c) My best friend
  23. 23.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  24. 24.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  25. 25.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  26. 26.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  27. 27.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  29. 29.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  30. 30.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  31. 31.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  33. 33.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
  34. 34.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  35. 35.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
  37. 37.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  39. 39.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus

Answer key

  1. <h1>
  2. Yes
  3. <h3>
  4. 2
  5. False
  6. True
  7. in the body
  8. in the same tab
  9. </h3>
  10. as one space
  11. a line across the page
  12. 3
  13. <li>
  14. <ol>
  15. art.html
  16. 2
  17. src
  18. False
  19. Visit the site
  20. 2
  21. in a new tab
  22. My best friend
  23. <h5>
  24. in the body
  25. bus.jpg
  26. <!DOCTYPE html>
  27. an empty tag
  28. <a>
  29. in a new tab
  30. 6
  31. has a closing tag
  32. 4
  33. <!DOCTYPE html>
  34. False
  35. a code editor
  36. <h3>
  37. a closing tag
  38. in the same tab
  39. <h1>
  40. bus.jpg

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