← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 689 · 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 of these is a closing tag? (a) <title> (b) </title> (c) <body> (d) <p>
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  3. 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  4. 4.True or false: <hr> is an empty tag. (a) False (b) True
  5. 5.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) </h2> (d) <\h2>
  6. 6.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) opens web pages for us (d) shows line numbers
  7. 7.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) sends pages over the net (d) has an address bar
  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.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  10. 10.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  11. 11.True or false: <style> goes in the body. (a) True (b) False
  12. 12.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <h3>Hello, world!</h3>
    <small>My best friend
    (a) </h3> (b) </small> (c) </em> (d) </b>
  13. 13.True or false: a web server answers page requests. (a) True (b) False
  14. 14.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
  15. 15.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  16. 16.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  18. 18.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) stores a website’s files (d) hosts websites online
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>The red kite</p>
    (a) Our school trip (b) My pets (c) The red kite
  20. 20.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) maths.html (b) href (c) Art corner (d) Maths fun
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Birds sing<br>Sky is blue<br>Stars shine</p>
  22. 22.🔍 One closing tag is missing. Which one?
    <h3>Rain today
    <h2>My pets</h2>
    <small>Hello, world!</small>
    (a) </h1> (b) </h2> (c) </small> (d) </h3>
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  25. 25.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  26. 26.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  27. 27.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  28. 28.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  29. 29.True or false: <img> is an empty tag. (a) False (b) True
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Cricket Club (c) Thanks for visiting. (d) Match report
  31. 31.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  32. 32.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  33. 33.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <input> (d) <b>
  34. 34.Which of these is an opening tag? (a) </li> (b) <b> (c) </title> (d) </h1>
  35. 35.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) https://example.com (b) Maths fun (c) Art corner (d) href
  36. 36.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  37. 37.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  38. 38.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) colours code to help us (d) stores a website’s files
  39. 39.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  40. 40.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>

Answer key

  1. </title>
  2. 200
  3. No
  4. True
  5. </h2>
  6. opens web pages for us
  7. has an address bar
  8. an empty tag
  9. a line across the page
  10. has a closing tag
  11. False
  12. </small>
  13. True
  14. <
  15. </small>
  16. in a new tab
  17. 4
  18. saves our .html files
  19. Our school trip
  20. Maths fun
  21. 5
  22. </h3>
  23. 4
  24. Birthday cake
  25. True
  26. Yes
  27. alt
  28. <h1>
  29. True
  30. Cricket Club
  31. a code editor
  32. has a closing tag
  33. <b>
  34. <b>
  35. Maths fun
  36. <a>
  37. the body
  38. colours code to help us
  39. href
  40. <ol>

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