← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 442 · 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">Play games</a>
    (a) href (b) https://example.com (c) About us (d) Play games
  2. 2.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  3. 3.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) </small> (d) <small/>
  4. 4.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <h4>Cricket is fun.</h4>
  5. 5.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  6. 6.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
    <p>Good morning!</p>
  7. 7.Which of these is an empty tag? (a) <meta> (b) <b> (c) <ul> (d) <li>
  8. 8.True or false: <h1> has a closing tag. (a) False (b) True
  9. 9.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    <p>My best friend</p>
  10. 10.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Stars shine<br>Sky is blue<br>Birds sing</p>
  12. 12.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Fun facts</h2>
    <p>Good morning!</p>
    <p>Rain today</p>
  13. 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
  14. 14.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Play games (b) Take the quiz (c) href (d) maths.html
  15. 15.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  16. 16.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  17. 17.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>I love mangoes.</h3>
    <h4>Cricket is fun.</h4>
    <h4>Cricket is fun.</h4>
    <h3>The red kite</h3>
  18. 18.Which of these goes in the head? (a) <img> (b) <a> (c) <ul> (d) <title>
  19. 19.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
  20. 20.Which of these is true of a code editor? (a) has an address bar (b) answers page requests (c) opens web pages for us (d) colours code to help us
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <i>Our school trip
    line 2: <u>My best friend</u>
    line 3: <h3>Fun facts</h3>
    (a) line 2 (b) line 3 (c) line 1
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  24. 24.True or false: a code editor is where we type code. (a) True (b) False
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <p>Our school trip</p>
    line 2: <small>Good morning!</small>
    line 3: <i>Hello, world!
    (a) line 1 (b) line 2 (c) line 3
  26. 26.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  27. 27.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>My pets</h4>
    <p>Fun facts</p>
    <p>The red kite</p>
  28. 28.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
  30. 30.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  31. 31.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  32. 32.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  33. 33.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  34. 34.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) turns HTML into a page
  35. 35.True or false: in <img>, width shows if the image fails. (a) True (b) False
  36. 36.🖼️ 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
  37. 37.🔗 Where does this link open?
    <a href="art.html">About us</a>
    (a) in the same tab (b) in a new tab
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  39. 39.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h1>? (a) <h6> (b) <h4> (c) <h5> (d) <h1>

Answer key

  1. Play games
  2. 3
  3. </small>
  4. 3
  5. Yes
  6. 2
  7. <meta>
  8. True
  9. 4
  10. opens it in a new tab
  11. 5
  12. 2
  13. Yes
  14. Take the quiz
  15. 2
  16. an empty tag
  17. 5
  18. <title>
  19. 1
  20. colours code to help us
  21. line 1
  22. 1
  23. <h2>
  24. True
  25. line 3
  26. in a new tab
  27. 2
  28. <ol>
  29. 5
  30. <h5>
  31. src
  32. a web browser
  33. <!--
  34. turns HTML into a page
  35. False
  36. to describe the image
  37. in the same tab
  38. <h1>
  39. in the head
  40. <h6>

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