← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 930 · 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>Fun facts</p>
    <p>I love mangoes.</p>
  2. 2.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  4. 4.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  5. 5.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  6. 6.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.Which of these is an opening tag? (a) </h1> (b) </title> (c) <body> (d) </b>
  8. 8.📝 What does <br> do? (a) starts a new line (b) makes a list (c) adds a picture (d) makes text bold
  9. 9.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  10. 10.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Rain today</h3>
    <h3>Rain today</h3>
    <h2>I love mangoes.</h2>
    <h4>Rain today</h4>
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) map.png (b) Birthday cake (c) Map of India (d) width
  13. 13.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <head> (d) </body>
  14. 14.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  15. 15.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Maths fun (b) href (c) about.html (d) Visit the site
  16. 16.Which of these is an opening tag? (a) </li> (b) </title> (c) <h1> (d) </h1>
  17. 17.📋 What number does the browser show next to “Papaya”?
    <ol start="8">
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  18. 18.Which of these is an opening tag? (a) <p> (b) </p> (c) </title> (d) </li>
  19. 19.True or false: <title> goes in the body. (a) True (b) False
  20. 20.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  21. 21.Which of these has a closing tag? (a) <title> (b) <img> (c) <meta> (d) <hr>
  22. 22.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  23. 23.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) href (c) Maths fun (d) Art corner
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine<br>Rivers flow</p>
  25. 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) width (b) An old fort (c) bus.jpg (d) Our school bus
  27. 27.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  28. 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.💬 Does the browser show comments on the page? (a) Yes (b) No
  30. 30.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  31. 31.Which of these is true of a code editor? (a) stores a website’s files (b) sends pages over the net (c) has an address bar (d) is where we type code
  32. 32.🔍 One closing tag is missing. Which one?
    <strong>Cricket is fun.
    <p>Our school trip</p>
    <h2>My best friend</h2>
    (a) </strong> (b) </p> (c) </h3> (d) </h2>
  33. 33.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) The red kite (c) Cricket is fun. (d) Rain today
  34. 34.True or false: <ul> lists things in any order. (a) False (b) True
  35. 35.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  36. 36.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) about.html (c) quiz.html (d) Art corner
  37. 37.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) games.html
  38. 38.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  39. 39.Which of these is an opening tag? (a) </li> (b) </body> (c) <b> (d) </title>
  40. 40.📄 Can HTML on its own make a form? (a) Yes (b) No

Answer key

  1. 2
  2. shows pages from the web
  3. 3
  4. a web server
  5. a slash /
  6. a closing tag
  7. <body>
  8. starts a new line
  9. href
  10. 5
  11. width
  12. Map of India
  13. </html>
  14. <ul>
  15. Visit the site
  16. <h1>
  17. 10
  18. <p>
  19. False
  20. in the same tab
  21. <title>
  22. <ul>
  23. Maths fun
  24. 4
  25. as one space
  26. Our school bus
  27. element
  28. in the body
  29. No
  30. a web browser
  31. is where we type code
  32. </strong>
  33. The red kite
  34. True
  35. the body
  36. quiz.html
  37. Contact us
  38. 2
  39. <b>
  40. Yes

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