← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 80 · 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 the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  2. 2.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a paint program (d) a web browser
  3. 3.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Cricket is fun.</h4>
    <h4>Fun facts</h4>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) map.png (b) Map of India (c) width (d) Birthday cake
  5. 5.True or false: <li> has a closing tag. (a) False (b) True
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  7. 7.True or false: <title> goes in the head. (a) False (b) True
  8. 8.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) Rain today (b) My pets (c) Our school trip (d) The red kite
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) Planets (d) Mars is red.
  10. 10.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
  12. 12.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  13. 13.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <ul> (d) <p>
  14. 14.True or false: in <img>, src names the picture file. (a) False (b) True
  15. 15.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) fort.jpg (b) The full moon (c) bus.jpg (d) moon.png
  16. 16.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔠 Are headings shown in bold by default? (a) No (b) Yes
  18. 18.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) Contact us (b) about.html (c) About us (d) href
  19. 19.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  20. 20.🔍 One closing tag is missing. Which one?
    <small>Our school trip</small>
    <em>Hello, world!
    <p>Rain today</p>
    (a) </h1> (b) </p> (c) </small> (d) </em>
  21. 21.Which of these is true of a web browser? (a) hosts websites online (b) is where we type code (c) turns HTML into a page (d) saves our .html files
  22. 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  23. 23.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) shows pages from the web (d) is where we type code
  24. 24.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  26. 26.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  27. 27.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Cricket is fun. (c) Fun facts (d) Hello, world!
  28. 28.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) bus.jpg (b) An old fort (c) Our school bus (d) width
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) bus.jpg (b) Our school bus (c) An old fort (d) width
  31. 31.True or false: HTML on its own can run a game loop. (a) False (b) True
  32. 32.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  33. 33.True or false: <hr> is an empty tag. (a) True (b) False
  34. 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  35. 35.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  36. 36.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
  37. 37.Which of these is an opening tag? (a) </body> (b) </p> (c) <h1> (d) </title>
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) Birthday cake (b) width (c) map.png (d) Map of India
  39. 39.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  40. 40.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src

Answer key

  1. on the browser tab
  2. a web browser
  3. 3
  4. Map of India
  5. True
  6. <h1>
  7. True
  8. The red kite
  9. Class 7 Blog
  10. in the body
  11. 3
  12. a code editor
  13. <meta>
  14. True
  15. moon.png
  16. in the body
  17. Yes
  18. About us
  19. <h6>
  20. </em>
  21. turns HTML into a page
  22. No
  23. shows pages from the web
  24. </b>
  25. bullets
  26. <h1>
  27. My best friend
  28. -->
  29. Our school bus
  30. Our school bus
  31. False
  32. <!DOCTYPE html>
  33. True
  34. <ol>
  35. a closing tag
  36. starts a new line
  37. <h1>
  38. Map of India
  39. href
  40. src

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