← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 472 · 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.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  2. 2.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
  5. 5.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep
  7. 7.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  8. 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  10. 10.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.🔍 One closing tag is missing. Which one?
    <h2>Good morning!
    <small>Cricket is fun.</small>
    <b>I love mangoes.</b>
    (a) </small> (b) </b> (c) </h2> (d) </h3>
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  13. 13.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    (a) Good morning! (b) The red kite (c) Rain today
  14. 14.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Roses are red<br>Birds sing</p>
  16. 16.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Our school trip (c) Rain today
  17. 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) Art corner (c) href (d) Maths fun
  19. 19.🔍 One closing tag is missing. Which one?
    <u>Hello, world!</u>
    <small>Fun facts</small>
    <strong>Our school trip
    (a) </u> (b) </strong> (c) </small> (d) </b>
  20. 20.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
  21. 21.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) Contact us (c) href (d) games.html
  22. 22.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) has an address bar
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  24. 24.True or false: <ul> has a closing tag. (a) True (b) False
  25. 25.True or false: a code editor shows line numbers. (a) True (b) False
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) An old fort (b) Our school bus (c) width (d) bus.jpg
  27. 27.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  28. 28.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) School news (c) href (d) Art corner
  29. 29.Which of these goes in the head? (a) <style> (b) <ul> (c) <img> (d) <h1>
  30. 30.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) map.png (b) Map of India (c) dog.jpg (d) cake.jpg
  31. 31.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  32. 32.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) https://example.com (c) contact.html (d) maths.html
  33. 33.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) Maths fun (b) art.html (c) href (d) Art corner
  34. 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p>
  36. 36.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  37. 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  38. 38.🔍 Which is the odd one out? (a) hosts websites online (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <u>My pets
    line 3: <p>Fun facts</p>
    (a) line 1 (b) line 2 (c) line 3
  40. 40.True or false: in <img>, width shows if the image fails. (a) True (b) False

Answer key

  1. 4
  2. in the same tab
  3. Yes
  4. 4
  5. starts a new line
  6. An old fort
  7. True
  8. an empty tag
  9. 1
  10. an opening tag
  11. </h2>
  12. 200
  13. Good morning!
  14. <a>
  15. 4
  16. Cricket is fun.
  17. <ol>
  18. Maths fun
  19. </strong>
  20. 1
  21. Contact us
  22. has an address bar
  23. 3
  24. True
  25. True
  26. Our school bus
  27. src
  28. Art corner
  29. <style>
  30. map.png
  31. No
  32. contact.html
  33. Maths fun
  34. in the head
  35. 4
  36. <
  37. No
  38. hosts websites online
  39. line 2
  40. False

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