← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 334 · 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.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) tags (d) wires
  2. 2.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h4>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
  3. 3.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  4. 4.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png
  5. 5.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    (a) I love mangoes. (b) The red kite (c) Cricket is fun. (d) My best friend
  8. 8.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  9. 9.True or false: <ul> goes inside ul or ol. (a) False (b) True
  10. 10.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  11. 11.Which of these is a closing tag? (a) <li> (b) </h1> (c) <title> (d) <h1>
  12. 12.True or false: HTML on its own can make headings. (a) True (b) False
  13. 13.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  14. 14.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h3>My best friend</h3>
    <h1>Good morning!
    (a) </h2> (b) </h1> (c) </p> (d) </h3>
  15. 15.💬 Does the browser show comments on the page? (a) Yes (b) No
  16. 16.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) Maths fun (b) Art corner (c) href (d) games.html
  17. 17.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) My Hobbies (c) index.html (d) All about me
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) https://example.com (d) href
  20. 20.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) Play games (b) art.html (c) href (d) About us
  21. 21.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  22. 22.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  23. 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
  24. 24.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h3>
  25. 25.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep
  27. 27.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  28. 28.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <html> (b) <head>
  29. 29.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  30. 30.🔗 What does HyperText mean? (a) text with links (b) secret text (c) text in colour (d) very big text
  31. 31.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  32. 32.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
  33. 33.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  34. 34.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
  35. 35.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <h2>My best friend</h2>
    line 3: <i>Our school trip</i>
    (a) line 2 (b) line 3 (c) line 1
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Good morning!</p>
    (a) Our school trip (b) Good morning! (c) Cricket is fun. (d) My best friend
  38. 38.True or false: a web server shows line numbers. (a) True (b) False
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) Contact us (c) https://example.com (d) art.html
  40. 40.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <

Answer key

  1. tags
  2. <h6>
  3. <!DOCTYPE html>
  4. cake.jpg
  5. </h3>
  6. 50
  7. I love mangoes.
  8. 2
  9. False
  10. <h6>
  11. </h1>
  12. True
  13. True
  14. </h1>
  15. No
  16. Maths fun
  17. <h1>
  18. My Hobbies
  19. Visit the site
  20. Play games
  21. True
  22. 3
  23. height
  24. <h3>
  25. <h6>
  26. A tiger asleep
  27. opens it in a new tab
  28. <html>
  29. 4
  30. text with links
  31. No
  32. 3
  33. 6
  34. 2
  35. alt
  36. line 1
  37. Our school trip
  38. False
  39. https://example.com
  40. <

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