← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 560 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Cricket Club (d) Try this poha.
  2. 2.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  4. 4.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <em>I love mangoes.</em>
    line 2: <small>My pets</small>
    line 3: <h2>Cricket is fun.
    (a) line 1 (b) line 2 (c) line 3
  6. 6.🏷️ Which is the closing tag for <i>? (a) <i> (b) <\i> (c) </i> (d) <i/>
  7. 7.True or false: <ul> is an ordered list. (a) True (b) False
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  9. 9.True or false: a web browser shows pages from the web. (a) True (b) False
  10. 10.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  11. 11.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
  12. 12.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
  13. 13.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <link rel="stylesheet"> (d) <table>
  14. 14.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) The full moon (c) dog.jpg (d) width
  16. 16.True or false: <ol> lists things in any order. (a) True (b) False
  17. 17.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  18. 18.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
    <h2>Good morning!</h2>
  19. 19.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) fort.jpg (b) The full moon (c) bus.jpg (d) moon.png
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Riya’s Recipes (c) body (d) Match report
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) Our school trip (b) Fun facts (c) Good morning!
  22. 22.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) games.html (c) About us (d) Play games
  23. 23.Which of these is a closing tag? (a) </b> (b) <b> (c) <title> (d) <p>
  24. 24.Which of these is true of a web browser? (a) has an address bar (b) hosts websites online (c) colours code to help us (d) is where we type code
  25. 25.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  26. 26.True or false: <ul> shows bullet points. (a) False (b) True
  27. 27.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  29. 29.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <small>The red kite</small>
    <em>Hello, world!</em>
    (a) </h1> (b) </h3> (c) </em> (d) </small>
  30. 30.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  32. 32.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.True or false: a web browser stores a website’s files. (a) False (b) True
  34. 34.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.Which of these is a closing tag? (a) <h1> (b) <body> (c) </p> (d) <b>
  36. 36.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  37. 37.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <u>Our school trip
    <h3>Rain today</h3>
    (a) </h3> (b) </h2> (c) </h1> (d) </u>
  38. 38.📄 Can HTML on its own make a form? (a) No (b) Yes
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  40. 40.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. Planets
  2. Language
  3. 1
  4. <!DOCTYPE html>
  5. line 3
  6. </i>
  7. False
  8. element
  9. True
  10. False
  11. <h2>
  12. alt
  13. <table>
  14. 6
  15. A happy dog
  16. False
  17. a code editor
  18. 3
  19. moon.png
  20. Match report
  21. Good morning!
  22. Play games
  23. </b>
  24. has an address bar
  25. <h6>
  26. True
  27. in the body
  28. opens it in a new tab
  29. </h3>
  30. <li>
  31. 6
  32. an opening tag
  33. False
  34. in the head
  35. </p>
  36. <img>
  37. </u>
  38. Yes
  39. bullets
  40. an empty tag

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