← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 520 · 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 text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    (a) Fun facts (b) Rain today (c) Hello, world! (d) Cricket is fun.
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Cricket Club (c) Mars is red. (d) Easy snacks
  3. 3.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  5. 5.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
  6. 6.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  7. 7.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  8. 8.🔍 One closing tag is missing. Which one?
    <b>My pets</b>
    <h2>I love mangoes.
    <strong>Good morning!</strong>
    (a) </h1> (b) </b> (c) </h2> (d) </strong>
  9. 9.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  10. 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) alt (d) width
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  13. 13.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  14. 14.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  15. 15.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  16. 16.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  17. 17.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) Play games (c) About us (d) games.html
  18. 18.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) about.html (b) School news (c) href (d) Art corner
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Hello, world! (c) The red kite (d) My best friend
  20. 20.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  21. 21.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Laptop (d) Link
  22. 22.True or false: <b> is an empty tag. (a) True (b) False
  23. 23.🔍 One closing tag is missing. Which one?
    <h3>Good morning!</h3>
    <i>Our school trip</i>
    <b>My best friend
    (a) </em> (b) </b> (c) </i> (d) </h3>
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  26. 26.🔍 Which is the odd one out? (a) opens web pages for us (b) saves our .html files (c) has an address bar (d) turns HTML into a page
  27. 27.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Try this poha. (c) Easy snacks (d) Space Facts
  29. 29.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  30. 30.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <table>
  31. 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
  32. 32.True or false: HTML on its own cannot make tables. (a) True (b) False
  33. 33.True or false: in <img>, width sets how wide it is. (a) True (b) False
  34. 34.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Rain today</p>
  36. 36.📄 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>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) Mars is red. (d) Riya’s Recipes
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  38. 38.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  39. 39.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) href (c) About us (d) contact.html
  40. 40.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) Fun facts

Answer key

  1. Cricket is fun.
  2. Easy snacks
  3. No
  4. <h6>
  5. 1
  6. 4
  7. <ol>
  8. </h2>
  9. <h1>
  10. No
  11. width
  12. bullets
  13. <!DOCTYPE html>
  14. <h6>
  15. False
  16. a web browser
  17. Play games
  18. Art corner
  19. The red kite
  20. Yes
  21. Language
  22. False
  23. </b>
  24. bullets
  25. 3
  26. saves our .html files
  27. to leave notes
  28. Space Facts
  29. a web server
  30. <table>
  31. Yes
  32. False
  33. True
  34. </small>
  35. 2
  36. Riya’s Recipes
  37. <h3>
  38. <h1>
  39. About us
  40. Fun facts

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