← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 304 · 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>The red kite</h1>
    <p>Rain today</p>
    <p>My best friend</p>
  2. 2.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  3. 3.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) element (d) address
  4. 4.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  5. 5.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Cricket is fun.</h2>
    <h3>Good morning!</h3>
    <p>Good morning!</p>
    <h3>Good morning!</h3>
  6. 6.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  7. 7.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  8. 8.Which of these is a closing tag? (a) <title> (b) <b> (c) </body> (d) <p>
  9. 9.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>I love mangoes.</h2>
    <p>Good morning!</p>
    <p>Fun facts</p>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  11. 11.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) The red kite (b) I love mangoes. (c) Hello, world!
  12. 12.📄 Can HTML on its own make headings? (a) Yes (b) No
  13. 13.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
  14. 14.True or false: <ul> is one item of a list. (a) False (b) True
  15. 15.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) We won by 5 runs. (c) My drawings (d) Cricket Club
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  18. 18.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  19. 19.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  20. 20.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    (a) My best friend (b) Rain today (c) Hello, world! (d) Cricket is fun.
  21. 21.Which of these goes in the body? (a) <title> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
  22. 22.Which of these is an opening tag? (a) </li> (b) <p> (c) </b> (d) </title>
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite
    line 2: <small>Fun facts</small>
    line 3: <i>Good morning!</i>
    (a) line 2 (b) line 1 (c) line 3
  24. 24.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h2>My pets</h2>
    <p>My best friend</p>
  25. 25.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  26. 26.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
    <h2>My pets</h2>
    <h2>Good morning!</h2>
  27. 27.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  29. 29.True or false: <ol> is an ordered list. (a) True (b) False
  30. 30.📋 What number does the browser show next to “Litchi”?
    <ol start="5">
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Space Facts (c) My drawings (d) index.html
  34. 34.Which of these is a closing tag? (a) <p> (b) <li> (c) <title> (d) </li>
  35. 35.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <h2>Cricket is fun.</h2>
    <p>Our school trip</p>
  36. 36.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) Take the quiz (b) School news (c) quiz.html (d) href
  38. 38.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  39. 39.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
  40. 40.True or false: HTML on its own can keep a high score. (a) False (b) True

Answer key

  1. 1
  2. in a new tab
  3. element
  4. numbers
  5. 4
  6. starts a new line
  7. 3
  8. </body>
  9. 2
  10. 2
  11. Hello, world!
  12. Yes
  13. </h1>
  14. False
  15. <li>
  16. My drawings
  17. 2
  18. alt
  19. <!--
  20. Rain today
  21. <ul>
  22. <p>
  23. line 1
  24. 4
  25. a code editor
  26. 3
  27. True
  28. 3
  29. True
  30. 6
  31. 100
  32. <h1>
  33. Space Facts
  34. </li>
  35. 4
  36. a closing tag
  37. School news
  38. 3
  39. width
  40. False

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