← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 976 · 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.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
  2. 2.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  3. 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  4. 4.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  5. 5.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) </body> (b) <!DOCTYPE html>
  6. 6.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    (a) Hello, world! (b) Our school trip (c) I love mangoes.
  7. 7.🔗 Where does this link open?
    <a href="games.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  8. 8.True or false: <ol> is one item of a list. (a) False (b) True
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) All about me (c) body (d) Art Gallery
  10. 10.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  11. 11.Which of these goes in the head? (a) <table> (b) <style> (c) <p> (d) <a>
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  13. 13.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  14. 14.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  15. 15.Which of these is an opening tag? (a) </p> (b) </body> (c) </title> (d) <p>
  16. 16.True or false: <ol> is an unordered list. (a) False (b) True
  17. 17.🖼️ 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) width (c) Map of India (d) map.png
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  19. 19.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <h3>Fun facts</h3>
  20. 20.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  21. 21.Which of these goes in the body? (a) <img> (b) <title> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <p>The red kite</p>
    line 2: <em>Hello, world!
    line 3: <h3>Rain today</h3>
    (a) line 3 (b) line 2 (c) line 1
  23. 23.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
  24. 24.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) turns HTML into a page (d) saves our .html files
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  26. 26.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) I love mangoes. (c) Good morning! (d) Rain today
  27. 27.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
  28. 28.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  29. 29.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  31. 31.True or false: <br> is an empty tag. (a) True (b) False
  32. 32.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
  33. 33.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  34. 34.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
  37. 37.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My best friend</h3>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <h3>Cricket is fun.</h3>
  38. 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) has an address bar (d) shows pages from the web
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) My drawings (c) Mars is red. (d) Class 7 Blog

Answer key

  1. 4
  2. a web server
  3. on the browser tab
  4. <a>
  5. <!DOCTYPE html>
  6. I love mangoes.
  7. in the same tab
  8. False
  9. All about me
  10. 1
  11. <style>
  12. bullets
  13. in the same tab
  14. True
  15. <p>
  16. False
  17. Map of India
  18. element
  19. 2
  20. <ul>
  21. <img>
  22. line 2
  23. starts a new line
  24. turns HTML into a page
  25. <h5>
  26. Good morning!
  27. <h2>
  28. width
  29. No
  30. 150
  31. True
  32. </b>
  33. <h1>
  34. <ul>
  35. <h1>
  36. 250
  37. 3
  38. an opening tag
  39. is where we type code
  40. Class 7 Blog

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