← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 763 · 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 words do you click on?
    <a href="https://example.com">About us</a>
    (a) href (b) About us (c) https://example.com (d) Contact us
  2. 2.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <img> (d) <style>
  3. 3.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  4. 4.Which of these is a closing tag? (a) <p> (b) <h1> (c) </p> (d) <body>
  5. 5.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts
    line 2: <h1>Hello, world!</h1>
    line 3: <h3>I love mangoes.</h3>
    (a) line 3 (b) line 1 (c) line 2
  7. 7.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) Maths fun (b) maths.html (c) Visit the site (d) href
  8. 8.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) </head> (d) <body>
  9. 9.True or false: <li> lists things in any order. (a) True (b) False
  10. 10.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <p>My pets</p>
    <h3>I love mangoes.</h3>
    <p>Hello, world!</p>
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) games.html (b) quiz.html (c) news.html (d) School news
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  13. 13.📝 What does <hr> draw? (a) a table (b) a link (c) a line across the page (d) a picture
  14. 14.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg
  16. 16.True or false: a code editor opens web pages for us. (a) True (b) False
  17. 17.True or false: <ul> lists things in any order. (a) False (b) True
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  19. 19.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
  20. 20.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
  21. 21.🔍 One closing tag is missing. Which one?
    <b>Cricket is fun.
    <h3>Hello, world!</h3>
    <strong>My pets</strong>
    (a) </h3> (b) </strong> (c) </b> (d) </i>
  22. 22.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  23. 23.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) contact.html (b) about.html (c) Maths fun (d) games.html
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  25. 25.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small> (c) <\small> (d) <small/>
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  27. 27.True or false: <input> has a closing tag. (a) True (b) False
  28. 28.📋 What number does the browser show next to “Litchi”?
    <ol start="4">
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  29. 29.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) <!DOCTYPE html> (b) </body>
  30. 30.Which of these is an empty tag? (a) <title> (b) <p> (c) <li> (d) <hr>
  31. 31.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Our school trip (c) The red kite (d) Good morning!
  32. 32.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
  34. 34.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) The red kite (b) Hello, world! (c) Fun facts
  37. 37.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  39. 39.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  40. 40.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>

Answer key

  1. About us
  2. <img>
  3. in a new tab
  4. </p>
  5. 1
  6. line 1
  7. Visit the site
  8. </html>
  9. False
  10. 2
  11. news.html
  12. 1
  13. a line across the page
  14. on the browser tab
  15. A tiger asleep
  16. False
  17. True
  18. 3
  19. <!--
  20. to describe the image
  21. </b>
  22. href
  23. games.html
  24. in a new tab
  25. </small>
  26. 4
  27. False
  28. 6
  29. <!DOCTYPE html>
  30. <hr>
  31. My pets
  32. an opening tag
  33. alt
  34. in the body
  35. a web server
  36. Hello, world!
  37. True
  38. 400
  39. <a>
  40. <h1>

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