← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 419 · 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 <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.💬 Does the browser show comments on the page? (a) Yes (b) No
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  4. 4.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  5. 5.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) map.png (b) A red kite (c) kite.png (d) cake.jpg
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  7. 7.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Rain today</p>
  8. 8.True or false: <ul> is one item of a list. (a) True (b) False
  9. 9.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) maths.html (b) https://example.com (c) Maths fun (d) art.html
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets
    line 2: <h1>Rain today</h1>
    line 3: <h3>My best friend</h3>
    (a) line 3 (b) line 1 (c) line 2
  11. 11.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  12. 12.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  13. 13.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  14. 14.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in the same tab (b) in a new tab
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  16. 16.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
  17. 17.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  18. 18.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <h3>Our school trip</h3>
    <p>The red kite</p>
    <p>My best friend</p>
  19. 19.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
  21. 21.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  22. 22.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>My pets</p>
    <p>Rain today</p>
    <h2>The red kite</h2>
  23. 23.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  24. 24.Which of these is an opening tag? (a) <title> (b) </p> (c) </title> (d) </li>
  25. 25.True or false: <li> is an unordered list. (a) True (b) False
  26. 26.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
  28. 28.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  29. 29.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h6> (b) <h5> (c) <h1> (d) <h4>
  30. 30.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  32. 32.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Our school trip</h3>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  33. 33.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
  34. 34.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) dog.jpg (b) width (c) The full moon (d) A happy dog
  36. 36.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  37. 37.🔍 Which is the odd one out? (a) sends pages over the net (b) shows pages from the web (c) has an address bar (d) opens web pages for us
  38. 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  39. 39.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  40. 40.📄 Can HTML on its own make tables? (a) Yes (b) No

Answer key

  1. in the head
  2. No
  3. 3
  4. in the same tab
  5. kite.png
  6. 350
  7. 3
  8. False
  9. https://example.com
  10. line 1
  11. in the body
  12. a code editor
  13. 2
  14. in the same tab
  15. 2
  16. 2
  17. <h1>
  18. 2
  19. an empty tag
  20. as one space
  21. a web browser
  22. 4
  23. to describe the image
  24. <title>
  25. False
  26. in the body
  27. 1
  28. <h5>
  29. <h1>
  30. <a>
  31. 1
  32. 2
  33. <h2>
  34. has a closing tag
  35. A happy dog
  36. <a href="about.html">
  37. sends pages over the net
  38. <ol>
  39. <h6>
  40. Yes

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