← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 506 · 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>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
  2. 2.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  3. 3.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My best friend</h2>
    <h2>My best friend</h2>
    <h2>Our school trip</h2>
    <h2>I love mangoes.</h2>
  4. 4.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) news.html (b) maths.html (c) art.html (d) Contact us
  5. 5.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  7. 7.Which of these is an opening tag? (a) <li> (b) </h1> (c) </body> (d) </p>
  8. 8.True or false: <img> goes in the body. (a) False (b) True
  9. 9.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) bus.jpg (c) width (d) Our school bus
  11. 11.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) href (b) news.html (c) School news (d) Take the quiz
  12. 12.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <h2>Rain today</h2>
    <h2>Cricket is fun.</h2>
    <h2>Fun facts</h2>
  13. 13.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  14. 14.True or false: a code editor shows line numbers. (a) True (b) False
  15. 15.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.True or false: HTML on its own can run a game loop. (a) True (b) False
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Easy snacks (c) Class 7 Blog (d) index.html
  18. 18.📋 What number does the browser show next to “Papaya”?
    <ol start="4">
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  19. 19.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  20. 20.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  21. 21.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <input> (d) <title>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  23. 23.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  24. 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  26. 26.True or false: a web browser saves our .html files. (a) True (b) False
  27. 27.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
  28. 28.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) The red kite (c) Good morning!
  29. 29.Which of these is an opening tag? (a) </p> (b) <title> (c) </li> (d) </h1>
  30. 30.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) speed (d) structure
  32. 32.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) Art corner (c) href (d) School news
  33. 33.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  34. 34.Which of these goes in the head? (a) <p> (b) <table> (c) <img> (d) <title>
  35. 35.True or false: <meta> has a closing tag. (a) False (b) True
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) All about me (d) I like to read.
  37. 37.Which of these is true of a web browser? (a) colours code to help us (b) stores a website’s files (c) saves our .html files (d) turns HTML into a page
  38. 38.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
  39. 39.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
  40. 40.Which of these is a closing tag? (a) <title> (b) <h1> (c) </h1> (d) <body>

Answer key

  1. 2
  2. on the browser tab
  3. 1
  4. maths.html
  5. a web server
  6. 1
  7. <li>
  8. True
  9. an opening tag
  10. Our school bus
  11. School news
  12. 1
  13. </h2>
  14. True
  15. in the body
  16. False
  17. Class 7 Blog
  18. 8
  19. <h1>
  20. True
  21. <title>
  22. 150
  23. <h6>
  24. <h6>
  25. <h5>
  26. False
  27. <h6>
  28. Good morning!
  29. <title>
  30. in the body
  31. structure
  32. Art corner
  33. a web server
  34. <title>
  35. False
  36. All about me
  37. turns HTML into a page
  38. 2
  39. src
  40. </h1>

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