← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 891 · 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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  3. 3.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  4. 4.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  5. 5.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) hosts websites online (d) answers page requests
  6. 6.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  7. 7.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  8. 8.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
  9. 9.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) bus.jpg (b) fort.jpg (c) tiger.jpg (d) Our school bus
  10. 10.🔗 Where does this link open?
    <a href="quiz.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  11. 11.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  12. 12.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  13. 13.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  14. 14.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  15. 15.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  18. 18.True or false: HTML on its own cannot make tables. (a) False (b) True
  19. 19.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  21. 21.Which of these is true of a web browser? (a) hosts websites online (b) stores a website’s files (c) is where we type code (d) opens web pages for us
  22. 22.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) dog.jpg (b) map.png (c) Map of India (d) cake.jpg
  23. 23.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  24. 24.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
  25. 25.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <small>Cricket is fun.
    <em>My best friend</em>
    (a) </em> (b) </strong> (c) </small> (d) </h1>
  28. 28.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  29. 29.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Maths fun (b) about.html (c) Visit the site (d) href
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  32. 32.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) Thanks for visiting. (c) index.html (d) Cricket Club
  35. 35.True or false: a web browser sends pages over the net. (a) False (b) True
  36. 36.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  37. 37.Which of these is true of a web browser? (a) colours code to help us (b) hosts websites online (c) is where we type code (d) has an address bar
  38. 38.True or false: a code editor shows line numbers. (a) True (b) False
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) Welcome! (d) Cricket Club
  40. 40.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) colours code to help us (d) shows line numbers

Answer key

  1. in the head
  2. href
  3. in a new tab
  4. <ol>
  5. turns HTML into a page
  6. a code editor
  7. to leave notes
  8. alt
  9. bus.jpg
  10. in the same tab
  11. <img>
  12. 3
  13. 2
  14. on the browser tab
  15. an opening tag
  16. numbers
  17. 1
  18. False
  19. <ul>
  20. Map of India
  21. opens web pages for us
  22. map.png
  23. No
  24. 6
  25. <!DOCTYPE html>
  26. <h1>
  27. </small>
  28. <li>
  29. Visit the site
  30. 50
  31. 150
  32. </strong>
  33. 1
  34. Cricket Club
  35. False
  36. No
  37. has an address bar
  38. True
  39. Welcome!
  40. stores a website’s files

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