← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 606 · 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 does this code make?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <h2>The red kite</h2>
    <h2>I love mangoes.</h2>
    <p>Good morning!</p>
  2. 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  3. 3.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>The red kite</h3>
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Fun facts</p>
  4. 4.True or false: <ul> lists things in any order. (a) True (b) False
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg
  6. 6.🔗 Where does this link open?
    <a href="maths.html">School news</a>
    (a) in a new tab (b) in the same tab
  7. 7.Which of these is an opening tag? (a) </p> (b) <b> (c) </title> (d) </li>
  8. 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  9. 9.💬 Does the browser show comments on the page? (a) No (b) Yes
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Sky is blue<br>Stars shine</p>
  11. 11.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
  13. 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
  14. 14.Which of these has a closing tag? (a) <input> (b) <b> (c) <hr> (d) <br>
  15. 15.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
    (a) My pets (b) Good morning! (c) Fun facts
  17. 17.🔍 One closing tag is missing. Which one?
    <small>Good morning!</small>
    <h3>Fun facts</h3>
    <strong>My pets
    (a) </h3> (b) </strong> (c) </p> (d) </small>
  18. 18.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  19. 19.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Match report (b) My Hobbies (c) Here is my best one. (d) index.html
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  22. 22.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <li>
  23. 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  24. 24.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
  27. 27.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) Take the quiz (b) href (c) games.html (d) School news
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  29. 29.Which of these is an opening tag? (a) </p> (b) </title> (c) <h1> (d) </h1>
  30. 30.True or false: a web server hosts websites online. (a) True (b) False
  31. 31.Which of these goes in the head? (a) <ul> (b) <a> (c) <title> (d) <table>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <p>Cricket is fun.
    line 3: <h1>My pets</h1>
    (a) line 3 (b) line 2 (c) line 1
  33. 33.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) href (b) School news (c) about.html (d) Art corner
  34. 34.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  35. 35.True or false: <ol> goes inside ul or ol. (a) False (b) True
  36. 36.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) map.png (b) kite.png (c) A tiger asleep (d) tiger.jpg
  37. 37.True or false: HTML on its own can run a game loop. (a) True (b) False
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>My pets</p>
  39. 39.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers

Answer key

  1. 3
  2. src
  3. 2
  4. True
  5. A tiger asleep
  6. in the same tab
  7. <b>
  8. False
  9. No
  10. 4
  11. an empty tag
  12. a paragraph
  13. alt
  14. <b>
  15. a closing tag
  16. Good morning!
  17. </strong>
  18. in a new tab
  19. <h1>
  20. My Hobbies
  21. 2
  22. <li>
  23. <ul>
  24. <a>
  25. element
  26. <h1>
  27. School news
  28. 6
  29. <h1>
  30. True
  31. <title>
  32. line 2
  33. Art corner
  34. No
  35. False
  36. tiger.jpg
  37. False
  38. 2
  39. an opening tag
  40. numbers

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