← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 420 · 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 heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Rivers flow</p>
  3. 3.True or false: in <img>, height sets how wide it is. (a) True (b) False
  4. 4.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
  5. 5.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Hello, world! (c) Good morning!
  7. 7.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.</u>
    line 2: <p>Fun facts</p>
    line 3: <i>My pets
    (a) line 1 (b) line 2 (c) line 3
  9. 9.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) https://example.com
  10. 10.True or false: in <img>, width sets how wide it is. (a) False (b) True
  11. 11.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) colours code to help us (d) is where we type code
  12. 12.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  14. 14.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  15. 15.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  17. 17.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) games.html (d) news.html
  18. 18.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.
    <u>The red kite</u>
    <h3>Our school trip</h3>
    (a) </b> (b) </u> (c) </h3> (d) </i>
  19. 19.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Here is my best one. (c) Welcome! (d) index.html
  21. 21.📄 Can HTML on its own make headings? (a) Yes (b) No
  22. 22.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Fun facts</h2>
    <h3>I love mangoes.</h3>
    <p>Rain today</p>
    <h3>Our school trip</h3>
  23. 23.True or false: <style> goes in the head. (a) False (b) True
  24. 24.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <em>I love mangoes.</em>
    <h1>The red kite
    (a) </h3> (b) </small> (c) </h1> (d) </em>
  25. 25.True or false: <ul> goes in the head. (a) True (b) False
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  27. 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  29. 29.Which of these is an empty tag? (a) <hr> (b) <b> (c) <p> (d) <ul>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) width (b) Birthday cake (c) cake.jpg (d) A happy dog
  31. 31.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
  32. 32.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) href (b) Visit the site (c) contact.html (d) Maths fun
  34. 34.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
  35. 35.True or false: <ul> lists things in any order. (a) False (b) True
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  37. 37.True or false: <img> has a closing tag. (a) True (b) False
  38. 38.True or false: <br> has a closing tag. (a) True (b) False
  39. 39.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
  40. 40.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse

Answer key

  1. <h1>
  2. 3
  3. False
  4. src
  5. an opening tag
  6. Hello, world!
  7. 2
  8. line 3
  9. Contact us
  10. True
  11. answers page requests
  12. in the body
  13. <li>
  14. Yes
  15. a closing tag
  16. 150
  17. news.html
  18. </i>
  19. No
  20. Class 7 Blog
  21. Yes
  22. 4
  23. True
  24. </h1>
  25. False
  26. <h1>
  27. <img>
  28. <h6>
  29. <hr>
  30. Birthday cake
  31. <h6>
  32. href
  33. Visit the site
  34. </p>
  35. True
  36. <h1>
  37. False
  38. False
  39. element
  40. Markup

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