← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 769 · 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 paragraphs does this code make?
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <p>Rain today</p>
    <p>Fun facts</p>
  2. 2.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) Take the quiz (c) contact.html (d) about.html
  3. 3.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  4. 4.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
  5. 5.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  6. 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  8. 8.Which of these goes in the head? (a) <style> (b) <p> (c) <a> (d) <h1>
  9. 9.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  10. 10.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) contact.html (c) School news (d) href
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  12. 12.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) href (b) Play games (c) About us (d) quiz.html
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  14. 14.True or false: <img> goes in the head. (a) True (b) False
  15. 15.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
  16. 16.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) kite.png (b) map.png (c) A tiger asleep (d) tiger.jpg
  17. 17.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  18. 18.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) href (c) art.html (d) About us
  19. 19.True or false: <title> goes in the body. (a) True (b) False
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Cricket Club (c) Mars is red. (d) Match report
  22. 22.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
  23. 23.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) Fun facts (d) The red kite
  24. 24.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) maths.html (b) https://example.com (c) art.html (d) Play games
  25. 25.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) A tiger asleep (b) An old fort (c) width (d) fort.jpg
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <h3>Hello, world!
    <b>My pets</b>
    (a) </h3> (b) </b> (c) </h1> (d) </h2>
  28. 28.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) news.html (b) quiz.html (c) School news (d) art.html
  29. 29.📋 What number does the browser show next to “Orange”?
    <ol start="7">
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  30. 30.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
  32. 32.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) About us (b) href (c) news.html (d) Play games
  33. 33.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  34. 34.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  35. 35.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  36. 36.True or false: <title> goes in the head. (a) True (b) False
  37. 37.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
  38. 38.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  40. 40.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab

Answer key

  1. 3
  2. about.html
  3. <ol>
  4. 3
  5. a slash /
  6. href
  7. 5
  8. <style>
  9. the body
  10. Art corner
  11. <h1>
  12. Play games
  13. 250
  14. False
  15. Markup
  16. tiger.jpg
  17. <!--
  18. About us
  19. False
  20. numbers
  21. Cricket Club
  22. HyperText
  23. Fun facts
  24. https://example.com
  25. False
  26. An old fort
  27. </h3>
  28. art.html
  29. 12
  30. <!DOCTYPE html>
  31. <h6>
  32. Play games
  33. Yes
  34. <!DOCTYPE html>
  35. element
  36. True
  37. <img>
  38. .html
  39. bullets
  40. opens it in a new tab

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