← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 692 · 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.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  3. 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) about.html (d) contact.html
  5. 5.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
  6. 6.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  7. 7.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
  8. 8.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>The red kite</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <h3>Cricket is fun.</h3>
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  10. 10.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) href (b) maths.html (c) Maths fun (d) Visit the site
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  12. 12.True or false: <ul> goes in the body. (a) False (b) True
  13. 13.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  14. 14.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
  15. 15.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) maths.html (b) Take the quiz (c) contact.html (d) https://example.com
  17. 17.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
  18. 18.Which of these is true of a web browser? (a) sends pages over the net (b) has an address bar (c) stores a website’s files (d) is where we type code
  19. 19.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  20. 20.True or false: HTML on its own can run a game loop. (a) True (b) False
  21. 21.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.Which of these goes in the head? (a) <img> (b) <p> (c) <ul> (d) <meta charset="utf-8">
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  24. 24.Which of these is true of a code editor? (a) is where we type code (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
  25. 25.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
  26. 26.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  27. 27.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
  28. 28.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  29. 29.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) about.html (b) quiz.html (c) Contact us (d) games.html
  30. 30.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  31. 31.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) </i> (d) <\i>
  32. 32.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) art.html (c) href (d) Visit the site
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Fun facts</p>
  35. 35.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  37. 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  38. 38.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) width (b) A red kite (c) Map of India (d) kite.png
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Thanks for visiting. (c) Match report (d) Riya’s Recipes

Answer key

  1. a closing tag
  2. 1
  3. an opening tag
  4. games.html
  5. alt
  6. an empty tag
  7. height
  8. 2
  9. <h1>
  10. Visit the site
  11. 1
  12. True
  13. <h6>
  14. src
  15. in the same tab
  16. contact.html
  17. the body
  18. has an address bar
  19. <!DOCTYPE html>
  20. False
  21. has a closing tag
  22. <meta charset="utf-8">
  23. 1
  24. is where we type code
  25. a paragraph
  26. a web browser
  27. <h2>
  28. has a closing tag
  29. quiz.html
  30. alt
  31. </i>
  32. an opening tag
  33. Contact us
  34. 4
  35. <ol>
  36. 4
  37. opens it in a new tab
  38. <h1>
  39. A red kite
  40. Riya’s Recipes

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