← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 3 · 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 make headings? (a) Yes (b) No
  2. 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
  3. 3.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  4. 4.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  5. 5.Which of these is true of a web server? (a) is where we type code (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
  6. 6.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
  7. 7.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
  8. 8.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  9. 9.Which of these is an empty tag? (a) <title> (b) <h1> (c) <hr> (d) <p>
  10. 10.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) maths.html (c) href (d) Play games
  12. 12.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
  13. 13.True or false: <img> goes in the body. (a) False (b) True
  14. 14.True or false: in <img>, src shows if the image fails. (a) True (b) False
  15. 15.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Rain today (c) My best friend
  17. 17.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Hello, world! (c) Rain today
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  19. 19.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) Contact us (b) About us (c) about.html (d) href
  20. 20.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) opens web pages for us
  21. 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  22. 22.True or false: in <img>, alt names the picture file. (a) True (b) False
  23. 23.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
  25. 25.🔍 One closing tag is missing. Which one?
    <u>My pets
    <p>The red kite</p>
    <small>Cricket is fun.</small>
    (a) </small> (b) </p> (c) </i> (d) </u>
  26. 26.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Good morning!</h3>
    <p>I love mangoes.</p>
    <p>Rain today</p>
  27. 27.Which of these goes in the head? (a) <h1> (b) <p> (c) <style> (d) <ul>
  28. 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) dog.jpg (c) width (d) The full moon
  30. 30.True or false: in <img>, width names the picture file. (a) False (b) True
  31. 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
  32. 32.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  33. 33.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  34. 34.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  35. 35.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
  36. 36.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  37. 37.True or false: in <img>, height shows if the image fails. (a) True (b) False
  38. 38.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) School news (b) Take the quiz (c) https://example.com (d) href
  39. 39.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  40. 40.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <p>

Answer key

  1. Yes
  2. src
  3. element
  4. 6
  5. sends pages over the net
  6. .html
  7. <h1>
  8. <a href="about.html">
  9. <hr>
  10. in the head
  11. Take the quiz
  12. </html>
  13. True
  14. False
  15. <a>
  16. Rain today
  17. Rain today
  18. Birthday cake
  19. About us
  20. opens web pages for us
  21. 1
  22. False
  23. <ol>
  24. <h6>
  25. </u>
  26. 2
  27. <style>
  28. an opening tag
  29. A happy dog
  30. False
  31. as one space
  32. 6
  33. on the browser tab
  34. 10
  35. 4
  36. <ul>
  37. False
  38. School news
  39. in a new tab
  40. <p>

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