← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 220 · 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.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  2. 2.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <\h2> (d) <h2>
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) Map of India (b) width (c) kite.png (d) A red kite
  4. 4.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) map.png (b) kite.png (c) tiger.jpg (d) A tiger asleep
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue</p>
  6. 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) Map of India (c) width (d) kite.png
  8. 8.🔗 Where does this link open?
    <a href="games.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  9. 9.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  10. 10.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  11. 11.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) Rain today (b) My pets (c) My best friend
  12. 12.🔍 One closing tag is missing. Which one?
    <h3>My best friend</h3>
    <h2>Hello, world!
    <i>Cricket is fun.</i>
    (a) </h3> (b) </small> (c) </h2> (d) </i>
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
  15. 15.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
  16. 16.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  17. 17.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  18. 18.🔍 One closing tag is missing. Which one?
    <h3>Rain today</h3>
    <u>I love mangoes.</u>
    <strong>Our school trip
    (a) </strong> (b) </h3> (c) </small> (d) </u>
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  20. 20.📋 What number does the browser show next to “Jamun”?
    <ol start="4">
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  21. 21.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
  22. 22.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
  23. 23.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  24. 24.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  25. 25.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    (a) I love mangoes. (b) My best friend (c) Cricket is fun. (d) Good morning!
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
  27. 27.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) About us (c) maths.html (d) art.html
  28. 28.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Rain today</h4>
    <h4>Cricket is fun.</h4>
  29. 29.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  30. 30.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  31. 31.Which of these is true of a code editor? (a) answers page requests (b) shows pages from the web (c) hosts websites online (d) saves our .html files
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  33. 33.🔍 Which is the odd one out? (a) hosts websites online (b) shows line numbers (c) saves our .html files (d) is where we type code
  34. 34.True or false: <ol> is one item of a list. (a) True (b) False
  35. 35.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) turns HTML into a page (d) sends pages over the net
  36. 36.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Fun facts</h3>
    <p>Rain today</p>
  37. 37.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) Fun facts (b) My best friend (c) Good morning!
  38. 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  39. 39.True or false: a web server shows pages from the web. (a) False (b) True
  40. 40.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger

Answer key

  1. No
  2. </h2>
  3. A red kite
  4. tiger.jpg
  5. 4
  6. <ol>
  7. A red kite
  8. in the same tab
  9. 2
  10. to leave notes
  11. My pets
  12. </h2>
  13. numbers
  14. <!DOCTYPE html>
  15. <
  16. <h1>
  17. a web server
  18. </strong>
  19. numbers
  20. 7
  21. <b>
  22. a code editor
  23. <h6>
  24. No
  25. I love mangoes.
  26. 2
  27. https://example.com
  28. 3
  29. <!--
  30. <!DOCTYPE html>
  31. saves our .html files
  32. <h5>
  33. hosts websites online
  34. False
  35. turns HTML into a page
  36. 2
  37. Good morning!
  38. as one space
  39. False
  40. to describe the image

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