← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 781 · 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 picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) map.png (c) kite.png (d) A tiger asleep
  2. 2.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) Cricket is fun. (b) My best friend (c) Rain today
  3. 3.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) Good morning! (b) Rain today (c) Our school trip
  4. 4.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <small>Rain today</small>
    line 3: <b>My best friend
    (a) line 1 (b) line 3 (c) line 2
  6. 6.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  7. 7.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  8. 8.Which of these is true of a web browser? (a) has an address bar (b) shows line numbers (c) sends pages over the net (d) is where we type code
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  10. 10.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
    <h2>My best friend</h2>
  11. 11.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) contact.html (c) Maths fun (d) https://example.com
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) <!DOCTYPE html> (d) </head>
  13. 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  14. 14.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </html> (b) </head>
  15. 15.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) href (b) Play games (c) https://example.com (d) Take the quiz
  16. 16.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  17. 17.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
  18. 18.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) href (b) About us (c) Play games (d) maths.html
  19. 19.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) </em> (d) <\em>
  20. 20.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Good morning! (c) Rain today (d) Cricket is fun.
  21. 21.💬 Does the browser show comments on the page? (a) Yes (b) No
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.</h2>
    line 2: <strong>My pets</strong>
    line 3: <h3>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) Map of India (b) width (c) kite.png (d) A red kite
  24. 24.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.Which of these goes in the head? (a) <title> (b) <table> (c) <img> (d) <ul>
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Welcome! (c) body (d) Try this poha.
  27. 27.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) Riya’s Recipes (d) Match report
  29. 29.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  30. 30.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </head> (c) </html> (d) <!DOCTYPE html>
  31. 31.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  32. 32.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  33. 33.📄 Can HTML on its own make a form? (a) No (b) Yes
  34. 34.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  35. 35.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  37. 37.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  38. 38.Which of these has a closing tag? (a) <title> (b) <img> (c) <hr> (d) <br>
  39. 39.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    (a) Rain today (b) Good morning! (c) I love mangoes.
  40. 40.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) href (c) https://example.com (d) Art corner

Answer key

  1. tiger.jpg
  2. Rain today
  3. Rain today
  4. 4
  5. line 3
  6. opens it in a new tab
  7. 4
  8. has an address bar
  9. <h6>
  10. 1
  11. contact.html
  12. <!DOCTYPE html>
  13. Yes
  14. </head>
  15. Take the quiz
  16. <h6>
  17. a line across the page
  18. Play games
  19. </em>
  20. Rain today
  21. No
  22. line 3
  23. A red kite
  24. a closing tag
  25. <title>
  26. Welcome!
  27. 2
  28. Riya’s Recipes
  29. <ol>
  30. </html>
  31. in a new tab
  32. to leave notes
  33. Yes
  34. element
  35. in the body
  36. to describe the image
  37. No
  38. <title>
  39. Rain today
  40. Art corner

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