← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 371 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) bus.jpg (b) An old fort (c) Our school bus (d) width
  2. 2.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My best friend</p>
    <h3>Good morning!</h3>
    <p>Rain today</p>
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
  4. 4.True or false: HTML on its own cannot make a form. (a) False (b) True
  5. 5.Which of these goes in the head? (a) <ul> (b) <table> (c) <h1> (d) <link rel="stylesheet">
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) Riya’s Recipes (d) I like to read.
  7. 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  8. 8.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) opens web pages for us (d) hosts websites online
  9. 9.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
  10. 10.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) games.html (c) Play games (d) news.html
  12. 12.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  13. 13.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
  15. 15.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) maths.html (b) https://example.com (c) Take the quiz (d) contact.html
  16. 16.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) moon.png (b) Birthday cake (c) dog.jpg (d) cake.jpg
  17. 17.🔍 One closing tag is missing. Which one?
    <u>Fun facts</u>
    <h2>My best friend</h2>
    <strong>Hello, world!
    (a) </u> (b) </em> (c) </h2> (d) </strong>
  18. 18.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) Maths fun (c) Art corner (d) quiz.html
  19. 19.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  20. 20.Which of these is true of a web browser? (a) is where we type code (b) answers page requests (c) stores a website’s files (d) shows pages from the web
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
  22. 22.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    (a) Our school trip (b) Hello, world! (c) My best friend
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  25. 25.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) href (b) news.html (c) Contact us (d) Visit the site
  26. 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) opens web pages for us (d) shows pages from the web
  27. 27.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png
  28. 28.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  29. 29.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  30. 30.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
  32. 32.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  34. 34.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <title> (d) <link rel="stylesheet">
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  36. 36.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <h2>The red kite</h2>
    <p>Hello, world!</p>
  37. 37.True or false: <h1> goes in the body. (a) False (b) True
  38. 38.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  39. 39.Which of these is an opening tag? (a) </title> (b) </li> (c) <li> (d) </h1>
  40. 40.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows pages from the web (d) hosts websites online

Answer key

  1. Our school bus
  2. 2
  3. 5
  4. False
  5. <link rel="stylesheet">
  6. Riya’s Recipes
  7. No
  8. opens web pages for us
  9. as one space
  10. element
  11. news.html
  12. <a>
  13. a closing tag
  14. 3
  15. contact.html
  16. cake.jpg
  17. </strong>
  18. Maths fun
  19. Yes
  20. shows pages from the web
  21. <h2>
  22. Hello, world!
  23. <h6>
  24. <h1>
  25. Contact us
  26. hosts websites online
  27. cake.jpg
  28. </small>
  29. <html>
  30. in the body
  31. 2
  32. in the head
  33. 50
  34. <img>
  35. numbers
  36. 2
  37. True
  38. to leave notes
  39. <li>
  40. shows pages from the web

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