← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 554 · 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 paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  2. 2.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  3. 3.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  4. 4.Which of these goes in the head? (a) <table> (b) <style> (c) <h1> (d) <ul>
  5. 5.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <u>Cricket is fun.</u>
    <b>My pets
    (a) </h2> (b) </p> (c) </b> (d) </u>
  6. 6.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) turns HTML into a page
  7. 7.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
  8. 8.Which of these is an empty tag? (a) <ul> (b) <b> (c) <img> (d) <p>
  9. 9.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) about.html (b) contact.html (c) Visit the site (d) games.html
  10. 10.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  11. 11.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  12. 12.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <strong> (d) <\strong>
  14. 14.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  15. 15.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    (a) My best friend (b) Cricket is fun. (c) Our school trip
  16. 16.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  17. 17.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
  18. 18.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <body>
  19. 19.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.Which of these is an empty tag? (a) <ul> (b) <meta> (c) <li> (d) <title>
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) An old fort (b) bus.jpg (c) width (d) Our school bus
  22. 22.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </title>
  23. 23.Which of these is an opening tag? (a) </body> (b) <h1> (c) </title> (d) </p>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!</p>
    line 2: <b>Cricket is fun.</b>
    line 3: <small>My pets
    (a) line 2 (b) line 1 (c) line 3
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  26. 26.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
  28. 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  29. 29.True or false: <title> goes in the head. (a) False (b) True
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  32. 32.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) My drawings (c) index.html (d) I like to read.
  34. 34.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
  35. 35.💬 Does the browser show comments on the page? (a) Yes (b) No
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  37. 37.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  39. 39.True or false: <hr> is an empty tag. (a) True (b) False
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Cricket Club (b) Welcome! (c) Here is my best one. (d) body

Answer key

  1. 3
  2. 4
  3. a code editor
  4. <style>
  5. </b>
  6. shows line numbers
  7. the body
  8. <img>
  9. games.html
  10. Yes
  11. <h5>
  12. <h1>
  13. </strong>
  14. an attribute
  15. My best friend
  16. 6
  17. <h4>
  18. <body>
  19. in the head
  20. <meta>
  21. Our school bus
  22. </title>
  23. <h1>
  24. line 3
  25. <h1>
  26. in the body
  27. 2
  28. <img>
  29. True
  30. numbers
  31. <li>
  32. 1
  33. Class 7 Blog
  34. src
  35. No
  36. <h1>
  37. <a>
  38. numbers
  39. True
  40. Welcome!

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