← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 291 · 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.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) href (b) Art corner (c) maths.html (d) Maths fun
  2. 2.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  3. 3.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) Visit the site (b) contact.html (c) https://example.com (d) maths.html
  4. 4.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Rain today (c) The red kite
  6. 6.True or false: <p> is an empty tag. (a) False (b) True
  7. 7.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  9. 9.🏷️ Which is the closing tag for <b>? (a) <b/> (b) </b> (c) <b> (d) <\b>
  10. 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  11. 11.Which of these is an opening tag? (a) <body> (b) </p> (c) </body> (d) </li>
  12. 12.📝 What do we need to write HTML? (a) a plain text editor (b) a printer (c) a microphone (d) a paintbrush
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Kites fly high</p>
  14. 14.🔍 One closing tag is missing. Which one?
    <h3>Cricket is fun.
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
    (a) </h1> (b) </p> (c) </h3> (d) </h2>
  15. 15.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
  16. 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  18. 18.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  19. 19.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>The red kite</h2>
    <p>Our school trip</p>
  20. 20.🔠 Are headings shown in bold by default? (a) Yes (b) No
  21. 21.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) cake.jpg (b) kite.png (c) A red kite (d) map.png
  22. 22.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  23. 23.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
  24. 24.True or false: a web browser turns HTML into a page. (a) False (b) True
  25. 25.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  26. 26.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  27. 27.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <body>
  28. 28.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <h3/> (d) <\h3>
  29. 29.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
  30. 30.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) https://example.com (b) Contact us (c) contact.html (d) about.html
  31. 31.📄 Can HTML on its own make headings? (a) No (b) Yes
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    (a) Fun facts (b) Rain today (c) The red kite (d) Our school trip
  33. 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  34. 34.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <a> (d) <title>
  35. 35.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  36. 36.📄 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>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Here is my best one. (c) Riya’s Recipes (d) Easy snacks
  37. 37.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  38. 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  39. 39.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
  40. 40.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src

Answer key

  1. Maths fun
  2. <h5>
  3. contact.html
  4. is where we type code
  5. Rain today
  6. False
  7. 2
  8. numbers
  9. </b>
  10. opens it in a new tab
  11. <body>
  12. a plain text editor
  13. 3
  14. </h3>
  15. <h1>
  16. in the body
  17. <!DOCTYPE html>
  18. a paragraph
  19. 2
  20. Yes
  21. kite.png
  22. <!--
  23. alt
  24. True
  25. No
  26. True
  27. </html>
  28. </h3>
  29. a web browser
  30. about.html
  31. Yes
  32. Fun facts
  33. to describe the image
  34. <a>
  35. No
  36. Easy snacks
  37. 4
  38. <ol>
  39. <li>
  40. height

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