← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 536 · 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.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </body> (c) <body> (d) </html>
  2. 2.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Cricket Club (b) All about me (c) Here is my best one. (d) body
  4. 4.True or false: HTML on its own can show paragraphs. (a) False (b) True
  5. 5.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <em>My pets
    <b>Rain today</b>
    (a) </h2> (b) </h1> (c) </em> (d) </b>
  6. 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  7. 7.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <ul> (d) <style>
  8. 8.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    (a) My pets (b) My best friend (c) Our school trip (d) Good morning!
  10. 10.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  11. 11.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) Map of India (b) kite.png (c) width (d) A red kite
  13. 13.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing</p>
  16. 16.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) saves our .html files (d) stores a website’s files
  17. 17.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  18. 18.🔗 Where does this link open?
    <a href="about.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  19. 19.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  20. 20.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  21. 21.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <h1>
  23. 23.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!
    <u>Our school trip</u>
    <em>Fun facts</em>
    (a) </h2> (b) </u> (c) </em> (d) </strong>
  24. 24.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) saves our .html files
  25. 25.True or false: HTML on its own can make links to pages. (a) True (b) False
  26. 26.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) keys (d) tags
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  28. 28.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  29. 29.True or false: <style> goes in the head. (a) False (b) True
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Rain today</p>
  31. 31.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <h3>The red kite
    <h2>Good morning!</h2>
    (a) </small> (b) </h1> (c) </h3> (d) </h2>
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Cricket is fun. (c) Good morning! (d) I love mangoes.
  34. 34.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Kites fly high</p>
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  38. 38.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) contact.html (b) https://example.com (c) Art corner (d) about.html
  39. 39.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake
  40. 40.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) games.html

Answer key

  1. </html>
  2. <li>
  3. All about me
  4. True
  5. </em>
  6. No
  7. <ul>
  8. an empty tag
  9. Good morning!
  10. 2
  11. the body
  12. A red kite
  13. 6
  14. <h1>
  15. 3
  16. opens web pages for us
  17. numbers
  18. in a new tab
  19. height
  20. True
  21. in the body
  22. <hr>
  23. </h2>
  24. turns HTML into a page
  25. True
  26. tags
  27. 50
  28. in a new tab
  29. True
  30. 2
  31. </h3>
  32. <!DOCTYPE html>
  33. Good morning!
  34. 4
  35. 3
  36. <h4>
  37. 3
  38. about.html
  39. cake.jpg
  40. Art corner

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