← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 897 · 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 tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  2. 2.True or false: <ul> is one item of a list. (a) False (b) True
  3. 3.True or false: in <img>, height names the picture file. (a) True (b) False
  4. 4.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
  5. 5.True or false: HTML on its own cannot make tables. (a) True (b) False
  6. 6.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    (a) The red kite (b) Good morning! (c) Hello, world!
  7. 7.🏷️ Which is the closing tag for <em>? (a) <\em> (b) </em> (c) <em/> (d) <em>
  8. 8.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  9. 9.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  10. 10.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  13. 13.True or false: a code editor has an address bar. (a) True (b) False
  14. 14.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  15. 15.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) https://example.com (b) School news (c) art.html (d) maths.html
  17. 17.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  18. 18.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) My pets (c) Fun facts
  19. 19.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </body> (d) <!DOCTYPE html>
  20. 20.🔍 One closing tag is missing. Which one?
    <u>Fun facts</u>
    <strong>My best friend
    <h2>I love mangoes.</h2>
    (a) </u> (b) </strong> (c) </i> (d) </h2>
  21. 21.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  22. 22.Which of these is a closing tag? (a) </li> (b) <body> (c) <h1> (d) <p>
  23. 23.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  24. 24.True or false: in <img>, width names the picture file. (a) True (b) False
  25. 25.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  26. 26.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) https://example.com (c) maths.html (d) Art corner
  28. 28.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) has an address bar (d) stores a website’s files
  29. 29.True or false: HTML on its own can show paragraphs. (a) True (b) False
  30. 30.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) art.html (c) Art corner (d) news.html
  31. 31.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg
  32. 32.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) turns HTML into a page (d) is where we type code
  33. 33.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
  34. 34.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing</p>
  37. 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  38. 38.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Hello, world!</h3>
    <h2>Cricket is fun.</h2>

Answer key

  1. <img>
  2. False
  3. False
  4. width
  5. False
  6. Hello, world!
  7. </em>
  8. <ol>
  9. on the browser tab
  10. No
  11. numbers
  12. True
  13. False
  14. numbers
  15. an opening tag
  16. https://example.com
  17. a line across the page
  18. I love mangoes.
  19. <!DOCTYPE html>
  20. </strong>
  21. <ul>
  22. </li>
  23. No
  24. False
  25. True
  26. 3
  27. contact.html
  28. has an address bar
  29. True
  30. maths.html
  31. map.png
  32. turns HTML into a page
  33. a code editor
  34. in the head
  35. 3
  36. 3
  37. opens it in a new tab
  38. an opening tag
  39. a closing tag
  40. 3

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