← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 519 · 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 true of a code editor? (a) turns HTML into a page (b) shows line numbers (c) sends pages over the net (d) shows pages from the web
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Rivers flow</p>
  4. 4.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  5. 5.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  6. 6.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
  7. 7.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  8. 8.True or false: a web server opens web pages for us. (a) False (b) True
  9. 9.Which of these has a closing tag? (a) <p> (b) <meta> (c) <img> (d) <br>
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  11. 11.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  12. 12.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  14. 14.True or false: <p> goes in the head. (a) True (b) False
  15. 15.Which of these goes in the head? (a) <ul> (b) <title> (c) <table> (d) <h1>
  16. 16.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Hello, world! (c) Good morning!
  18. 18.Which of these is a closing tag? (a) <title> (b) <b> (c) <p> (d) </p>
  19. 19.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) art.html (c) maths.html (d) Play games
  20. 20.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  21. 21.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) Visit the site (c) games.html (d) Contact us
  22. 22.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in the same tab (b) in a new tab
  23. 23.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  24. 24.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) src (d) height
  25. 25.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
  26. 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
    <p>The red kite</p>
  28. 28.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
  29. 29.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  32. 32.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  33. 33.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  34. 34.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  36. 36.Which of these is an opening tag? (a) </li> (b) </b> (c) <li> (d) </title>
  37. 37.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  38. 38.True or false: in <img>, width shows if the image fails. (a) False (b) True
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) My drawings (c) Thanks for visiting. (d) Riya’s Recipes
  40. 40.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) hosts websites online (d) is where we type code

Answer key

  1. shows line numbers
  2. <h6>
  3. 3
  4. <h6>
  5. in a new tab
  6. <h1>
  7. True
  8. False
  9. <p>
  10. numbers
  11. in the body
  12. an opening tag
  13. <a href="about.html">
  14. False
  15. <title>
  16. a web server
  17. The red kite
  18. </p>
  19. maths.html
  20. -->
  21. Contact us
  22. in the same tab
  23. 2
  24. height
  25. <h1>
  26. in the head
  27. 2
  28. 4
  29. on the browser tab
  30. 2
  31. 5
  32. <ul>
  33. <ol>
  34. an empty tag
  35. bullets
  36. <li>
  37. alt
  38. False
  39. Riya’s Recipes
  40. hosts websites online

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