← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 408 · 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 items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  2. 2.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <input>
  3. 3.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) fort.jpg (b) moon.png (c) bus.jpg (d) The full moon
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  6. 6.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Good morning! (b) The red kite (c) My pets (d) Cricket is fun.
  7. 7.🔗 Where does this link open?
    <a href="about.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  8. 8.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  9. 9.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
  10. 10.🔍 One closing tag is missing. Which one?
    <h3>My best friend</h3>
    <h2>I love mangoes.</h2>
    <h1>Good morning!
    (a) </h2> (b) </p> (c) </h1> (d) </h3>
  11. 11.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading
  12. 12.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
  13. 13.Which of these is an empty tag? (a) <hr> (b) <h1> (c) <ul> (d) <title>
  14. 14.Which of these is a closing tag? (a) <body> (b) <h1> (c) </h1> (d) <p>
  15. 15.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) turns HTML into a page
  16. 16.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) turns HTML into a page (d) has an address bar
  17. 17.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) a closing tag (d) an element name
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Welcome! (b) Try this poha. (c) body (d) Art Gallery
  19. 19.True or false: a web browser opens web pages for us. (a) True (b) False
  20. 20.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  21. 21.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Good morning! (b) Hello, world! (c) The red kite (d) I love mangoes.
  22. 22.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) sound (d) colours
  23. 23.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) about.html (b) quiz.html (c) Contact us (d) games.html
  24. 24.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
  25. 25.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  26. 26.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  27. 27.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  28. 28.🔍 One closing tag is missing. Which one?
    <u>Our school trip
    <b>Good morning!</b>
    <strong>Fun facts</strong>
    (a) </u> (b) </strong> (c) </b> (d) </i>
  29. 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  30. 30.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as 5 spaces (d) as a new line
  31. 31.True or false: <img> has a closing tag. (a) True (b) False
  32. 32.Which of these is a closing tag? (a) <p> (b) </li> (c) <li> (d) <title>
  33. 33.🔗 Where does this link open?
    <a href="about.html">Play games</a>
    (a) in the same tab (b) in a new tab
  34. 34.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  35. 35.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) The red kite (c) Fun facts
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  37. 37.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.True or false: a code editor colours code to help us. (a) True (b) False
  39. 39.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) quiz.html (b) games.html (c) School news (d) news.html
  40. 40.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #

Answer key

  1. 5
  2. <input>
  3. in the head
  4. moon.png
  5. 2
  6. My pets
  7. in a new tab
  8. <h6>
  9. </h2>
  10. </h1>
  11. on the browser tab
  12. src
  13. <hr>
  14. </h1>
  15. turns HTML into a page
  16. colours code to help us
  17. an attribute
  18. Welcome!
  19. True
  20. <h1>
  21. I love mangoes.
  22. structure
  23. quiz.html
  24. <h6>
  25. has a closing tag
  26. <img>
  27. a web browser
  28. </u>
  29. <a>
  30. as one space
  31. False
  32. </li>
  33. in the same tab
  34. <h1>
  35. The red kite
  36. <h1>
  37. a closing tag
  38. True
  39. news.html
  40. a slash /

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