← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 444 · 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.True or false: in <img>, src names the picture file. (a) False (b) True
  2. 2.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) width (d) alt
  3. 3.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  4. 4.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  5. 5.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  6. 6.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.True or false: <table> goes in the head. (a) False (b) True
  8. 8.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  9. 9.True or false: <img> is an empty tag. (a) False (b) True
  10. 10.🔠 Are headings shown in bold by default? (a) No (b) Yes
  11. 11.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <h2>The red kite</h2>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
  12. 12.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  13. 13.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
  14. 14.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) </strong> (d) <strong>
  15. 15.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  17. 17.Which of these is an opening tag? (a) <p> (b) </li> (c) </h1> (d) </p>
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Sky is blue</p>
  19. 19.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Cricket is fun.</h3>
    <p>The red kite</p>
  20. 20.Which of these is true of a code editor? (a) shows line numbers (b) answers page requests (c) sends pages over the net (d) hosts websites online
  21. 21.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  22. 22.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg
  23. 23.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  24. 24.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  26. 26.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
  27. 27.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  29. 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>The red kite</p>
    (a) Our school trip (b) Fun facts (c) The red kite (d) My pets
  31. 31.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>My best friend</p>
  32. 32.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <p>My pets</p>
    line 2: <em>The red kite</em>
    line 3: <small>I love mangoes.
    (a) line 3 (b) line 1 (c) line 2
  34. 34.Which of these is an opening tag? (a) </h1> (b) </b> (c) </title> (d) <body>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <p>Rain today
    line 3: <u>Our school trip</u>
    (a) line 1 (b) line 2 (c) line 3
  36. 36.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) Art corner (c) School news (d) href
  37. 37.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <u>Hello, world!
    line 2: <h1>Fun facts</h1>
    line 3: <b>My best friend</b>
    (a) line 2 (b) line 1 (c) line 3
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Stars shine</p>

Answer key

  1. True
  2. height
  3. on the browser tab
  4. False
  5. <ol>
  6. a closing tag
  7. False
  8. Yes
  9. True
  10. Yes
  11. 2
  12. <h1>
  13. turns HTML into a page
  14. </strong>
  15. <li>
  16. 6
  17. <p>
  18. 3
  19. 2
  20. shows line numbers
  21. in a new tab
  22. map.png
  23. an opening tag
  24. an opening tag
  25. 4
  26. Markup
  27. an opening tag
  28. a code editor
  29. <ul>
  30. Fun facts
  31. 4
  32. No
  33. line 3
  34. <body>
  35. line 2
  36. Art corner
  37. href
  38. bullets
  39. line 1
  40. 3

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