← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 184 · 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.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  2. 2.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) href (c) Take the quiz (d) Play games
  3. 3.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <p> (d) <style>
  4. 4.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  5. 5.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  6. 6.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) https://example.com (c) maths.html (d) Contact us
  7. 7.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
  8. 8.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  10. 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  11. 11.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  12. 12.True or false: <ul> is an empty tag. (a) True (b) False
  13. 13.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
  14. 14.Which of these is true of a code editor? (a) turns HTML into a page (b) stores a website’s files (c) sends pages over the net (d) is where we type code
  15. 15.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) href (c) games.html (d) Art corner
  16. 16.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <h2>Cricket is fun.</h2>
    line 2: <b>My best friend</b>
    line 3: <p>Our school trip
    (a) line 3 (b) line 1 (c) line 2
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) An old fort (b) width (c) bus.jpg (d) Our school bus
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) width (b) dog.jpg (c) A happy dog (d) The full moon
  21. 21.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  23. 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  24. 24.True or false: a code editor saves our .html files. (a) True (b) False
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <strong>I love mangoes.
    line 2: <h2>The red kite</h2>
    line 3: <h3>My best friend</h3>
    (a) line 2 (b) line 3 (c) line 1
  26. 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) We won by 5 runs. (d) Space Facts
  28. 28.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
  29. 29.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  30. 30.True or false: HTML on its own can run a game loop. (a) True (b) False
  31. 31.True or false: <style> goes in the head. (a) True (b) False
  32. 32.True or false: in <img>, src names the picture file. (a) False (b) True
  33. 33.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <small> (c) <\small> (d) </small>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) Map of India (c) A red kite (d) width
  35. 35.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  36. 36.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  38. 38.True or false: <ul> shows bullet points. (a) False (b) True
  39. 39.Which of these is true of a web server? (a) is where we type code (b) turns HTML into a page (c) stores a website’s files (d) colours code to help us
  40. 40.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) Visit the site (b) about.html (c) contact.html (d) https://example.com

Answer key

  1. No
  2. Take the quiz
  3. <p>
  4. in the same tab
  5. <a>
  6. contact.html
  7. <!DOCTYPE html>
  8. has a closing tag
  9. a code editor
  10. <ul>
  11. in the body
  12. False
  13. -->
  14. is where we type code
  15. Art corner
  16. an empty tag
  17. <!DOCTYPE html>
  18. line 3
  19. Our school bus
  20. A happy dog
  21. an empty tag
  22. bus.jpg
  23. <a href="about.html">
  24. True
  25. line 1
  26. True
  27. Welcome!
  28. HyperText
  29. 3
  30. False
  31. True
  32. True
  33. </small>
  34. A red kite
  35. No
  36. 2
  37. 100
  38. True
  39. stores a website’s files
  40. about.html

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