← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 588 · 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.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  2. 2.True or false: in <img>, src names the picture file. (a) False (b) True
  3. 3.Which of these is an opening tag? (a) </title> (b) </body> (c) </b> (d) <p>
  4. 4.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite
    line 2: <i>Hello, world!</i>
    line 3: <small>Cricket is fun.</small>
    (a) line 2 (b) line 1 (c) line 3
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  7. 7.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>My pets</p>
  9. 9.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  10. 10.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  11. 11.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Rain today (c) Hello, world! (d) Fun facts
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) We won by 5 runs. (d) Match report
  13. 13.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Easy snacks (c) body (d) Riya’s Recipes
  15. 15.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  17. 17.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  18. 18.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
  19. 19.True or false: in <img>, width describes the picture. (a) True (b) False
  20. 20.True or false: a web browser saves our .html files. (a) True (b) False
  21. 21.True or false: a web server stores a website’s files. (a) False (b) True
  22. 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  23. 23.Which of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) has an address bar (d) hosts websites online
  24. 24.Which of these has a closing tag? (a) <b> (b) <hr> (c) <br> (d) <img>
  25. 25.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) About us (b) Contact us (c) quiz.html (d) href
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
  27. 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🔍 Which is the odd one out? (a) has an address bar (b) answers page requests (c) opens web pages for us (d) turns HTML into a page
  29. 29.True or false: <hr> is an empty tag. (a) False (b) True
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) A red kite (b) Map of India (c) kite.png (d) width
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) </html> (d) <!DOCTYPE html>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) We won by 5 runs. (c) All about me (d) Space Facts
  34. 34.🔍 One closing tag is missing. Which one?
    <strong>Cricket is fun.</strong>
    <small>I love mangoes.</small>
    <h2>Our school trip
    (a) </h2> (b) </h1> (c) </strong> (d) </small>
  35. 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  36. 36.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a printer (d) a plain text editor
  37. 37.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
  38. 38.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
  40. 40.True or false: <h1> goes in the head. (a) False (b) True

Answer key

  1. has a closing tag
  2. True
  3. <p>
  4. <img>
  5. line 1
  6. numbers
  7. in a new tab
  8. 4
  9. <ul>
  10. 4
  11. Rain today
  12. Space Facts
  13. 4
  14. Easy snacks
  15. in the head
  16. Birthday cake
  17. <a href="about.html">
  18. <h6>
  19. False
  20. False
  21. True
  22. <ol>
  23. has an address bar
  24. <b>
  25. About us
  26. 150
  27. an opening tag
  28. answers page requests
  29. True
  30. A red kite
  31. <!DOCTYPE html>
  32. 3
  33. Space Facts
  34. </h2>
  35. a slash /
  36. a plain text editor
  37. an attribute
  38. -->
  39. 1
  40. False

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