← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 940 · 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="about.html">Contact us</a>
    (a) about.html (b) href (c) Visit the site (d) Contact us
  2. 2.True or false: a web server turns HTML into a page. (a) True (b) False
  3. 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  4. 4.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  5. 5.Which of these is a closing tag? (a) <title> (b) <li> (c) </p> (d) <h1>
  6. 6.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
  7. 7.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) answers page requests (d) shows pages from the web
  8. 8.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) about.html (c) Play games (d) href
  9. 9.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) fort.jpg (b) An old fort (c) width (d) A tiger asleep
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Hello, world! (c) Fun facts (d) Our school trip
  12. 12.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  14. 14.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <p>Good morning!</p>
    line 3: <strong>I love mangoes.
    (a) line 3 (b) line 2 (c) line 1
  17. 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
  18. 18.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  19. 19.🔗 Where does this link open?
    <a href="art.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  20. 20.Which of these has a closing tag? (a) <br> (b) <li> (c) <img> (d) <meta>
  21. 21.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  22. 22.True or false: <a> goes in the head. (a) True (b) False
  23. 23.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  24. 24.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
  26. 26.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
  27. 27.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) My best friend (c) Hello, world! (d) I love mangoes.
  28. 28.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  29. 29.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  30. 30.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
  31. 31.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort
  32. 32.True or false: HTML on its own cannot make headings. (a) True (b) False
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) href (c) contact.html (d) Visit the site
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Birds sing<br>Kites fly high<br>Sky is blue</p>
  36. 36.🔍 Which is the odd one out? (a) sends pages over the net (b) turns HTML into a page (c) shows pages from the web (d) opens web pages for us
  37. 37.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) colours code to help us (d) stores a website’s files
  38. 38.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <h3>My pets</h3>
    <h4>My best friend</h4>
  39. 39.True or false: a web browser saves our .html files. (a) True (b) False
  40. 40.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>

Answer key

  1. Contact us
  2. False
  3. No
  4. <li>
  5. </p>
  6. 1
  7. shows pages from the web
  8. Play games
  9. <a href="about.html">
  10. An old fort
  11. Cricket is fun.
  12. <h2>
  13. 1
  14. 4
  15. Map of India
  16. line 3
  17. as one space
  18. <ul>
  19. in a new tab
  20. <li>
  21. bullets
  22. False
  23. <ol>
  24. in the body
  25. </p>
  26. </h1>
  27. My best friend
  28. on the browser tab
  29. <a>
  30. element
  31. fort.jpg
  32. False
  33. Contact us
  34. 2
  35. 5
  36. sends pages over the net
  37. colours code to help us
  38. 3
  39. False
  40. <ol>

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