← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 286 · 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.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  2. 2.Which of these goes in the head? (a) <h1> (b) <table> (c) <meta charset="utf-8"> (d) <ul>
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  6. 6.True or false: <ul> lists things in any order. (a) True (b) False
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
  8. 8.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <p> (d) <\p>
  9. 9.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
  10. 10.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) map.png (b) kite.png (c) A red kite (d) cake.jpg
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Planets (c) index.html (d) Cricket Club
  12. 12.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Sky is blue<br>Kites fly high</p>
  15. 15.🔍 One closing tag is missing. Which one?
    <em>Fun facts
    <small>Rain today</small>
    <b>I love mangoes.</b>
    (a) </b> (b) </small> (c) </em> (d) </h2>
  16. 16.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
  17. 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) <body> (b) </body>
  19. 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  20. 20.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) sound (d) structure
  21. 21.True or false: <b> has a closing tag. (a) False (b) True
  22. 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  24. 24.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  25. 25.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today
    line 2: <small>Fun facts</small>
    line 3: <u>The red kite</u>
    (a) line 3 (b) line 2 (c) line 1
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <strong>Cricket is fun.
    line 2: <h1>I love mangoes.</h1>
    line 3: <small>My pets</small>
    (a) line 1 (b) line 2 (c) line 3
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!
    line 2: <h2>Hello, world!</h2>
    line 3: <strong>My best friend</strong>
    (a) line 3 (b) line 2 (c) line 1
  29. 29.📝 What does <hr> draw? (a) a link (b) a table (c) a picture (d) a line across the page
  30. 30.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  31. 31.Which of these goes in the head? (a) <h1> (b) <img> (c) <title> (d) <ul>
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red</p>
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) contact.html (b) href (c) Contact us (d) About us
  34. 34.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  35. 35.Which of these is a closing tag? (a) <title> (b) </b> (c) <b> (d) <li>
  36. 36.True or false: <title> goes in the body. (a) False (b) True
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) width (c) dog.jpg (d) The full moon
  39. 39.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
  40. 40.🔍 Which is the odd one out? (a) saves our .html files (b) sends pages over the net (c) shows line numbers (d) colours code to help us

Answer key

  1. in the same tab
  2. <meta charset="utf-8">
  3. 100
  4. <h1>
  5. <h1>
  6. True
  7. <h1>
  8. </p>
  9. <!DOCTYPE html>
  10. kite.png
  11. Cricket Club
  12. in the body
  13. in the same tab
  14. 4
  15. </em>
  16. </b>
  17. has a closing tag
  18. <body>
  19. Yes
  20. structure
  21. True
  22. has a closing tag
  23. alt
  24. No
  25. href
  26. line 1
  27. line 1
  28. line 1
  29. a line across the page
  30. -->
  31. <title>
  32. 2
  33. About us
  34. True
  35. </b>
  36. False
  37. 1
  38. A happy dog
  39. 5
  40. sends pages over the net

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