← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 251 · 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.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Fun facts</h2>
    <h2>Cricket is fun.</h2>
  2. 2.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <h2>My pets</h2>
  3. 3.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  4. 4.Which of these has a closing tag? (a) <img> (b) <ul> (c) <br> (d) <hr>
  5. 5.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <h1> (d) <br>
  6. 6.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  7. 7.Which of these goes in the body? (a) <ul> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) Hello, world!
  9. 9.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in the same tab (b) in a new tab
  10. 10.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <h1>Fun facts</h1>
    <em>Good morning!
    (a) </h1> (b) </em> (c) </strong> (d) </h2>
  11. 11.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  12. 12.🔍 One closing tag is missing. Which one?
    <b>Good morning!</b>
    <h2>Cricket is fun.
    <h1>The red kite</h1>
    (a) </small> (b) </h1> (c) </h2> (d) </b>
  13. 13.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <h3>My pets</h3>
    <p>My pets</p>
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Class 7 Blog (c) Welcome! (d) Mars is red.
  15. 15.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
  17. 17.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  19. 19.🔍 One closing tag is missing. Which one?
    <h3>Our school trip
    <strong>I love mangoes.</strong>
    <h2>Hello, world!</h2>
    (a) </h2> (b) </strong> (c) </h3> (d) </em>
  20. 20.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  21. 21.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.True or false: <ul> is an empty tag. (a) False (b) True
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    (a) My best friend (b) I love mangoes. (c) The red kite
  24. 24.Which of these is an opening tag? (a) </p> (b) <p> (c) </title> (d) </body>
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Art Gallery (c) My drawings (d) body
  26. 26.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  28. 28.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
  29. 29.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h2>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
  32. 32.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  33. 33.True or false: in <img>, src tells which image to load. (a) True (b) False
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  35. 35.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg
  36. 36.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>My best friend</p>
  37. 37.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Good morning! (b) Cricket is fun. (c) Hello, world! (d) Fun facts
  38. 38.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  39. 39.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>The red kite</h4>
    <h2>Rain today</h2>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  40. 40.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <em>I love mangoes.</em>
    <h3>My best friend
    (a) </h3> (b) </em> (c) </h1> (d) </strong>

Answer key

  1. 3
  2. 3
  3. in a new tab
  4. <ul>
  5. <h1>
  6. a web browser
  7. <ul>
  8. Fun facts
  9. in the same tab
  10. </em>
  11. to leave notes
  12. </h2>
  13. 2
  14. Class 7 Blog
  15. numbers
  16. <h1>
  17. </em>
  18. <h1>
  19. </h3>
  20. a web server
  21. an empty tag
  22. False
  23. My best friend
  24. <p>
  25. My drawings
  26. 1
  27. Yes
  28. a line across the page
  29. in the head
  30. in the head
  31. <h2>
  32. the body
  33. True
  34. 250
  35. cake.jpg
  36. 1
  37. Cricket is fun.
  38. 3
  39. 3
  40. </h3>

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