← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 756 · 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.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  2. 2.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  3. 3.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.📄 Can HTML on its own make headings? (a) No (b) Yes
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
  6. 6.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  7. 7.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.Which of these is an opening tag? (a) <li> (b) </li> (c) </body> (d) </h1>
  9. 9.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
  10. 10.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
  11. 11.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em/> (c) <\em> (d) <em>
  12. 12.Which of these is a closing tag? (a) <li> (b) <h1> (c) </p> (d) <b>
  13. 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) games.html (b) quiz.html (c) Contact us (d) about.html
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today
    line 2: <strong>Fun facts</strong>
    line 3: <u>The red kite</u>
    (a) line 3 (b) line 2 (c) line 1
  16. 16.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
  17. 17.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  18. 18.Which of these is true of a web browser? (a) colours code to help us (b) saves our .html files (c) sends pages over the net (d) turns HTML into a page
  19. 19.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) https://example.com (b) maths.html (c) contact.html (d) About us
  20. 20.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  21. 21.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  22. 22.Which of these is an opening tag? (a) </body> (b) <title> (c) </li> (d) </h1>
  23. 23.🔍 One closing tag is missing. Which one?
    <i>Our school trip</i>
    <h1>My pets
    <em>The red kite</em>
    (a) </h1> (b) </i> (c) </b> (d) </em>
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Art Gallery (c) Thanks for visiting. (d) All about me
  25. 25.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) cake.jpg (b) A red kite (c) kite.png (d) map.png
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Art Gallery (c) Try this poha. (d) Welcome!
  27. 27.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
  29. 29.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  30. 30.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
  31. 31.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
  32. 32.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  33. 33.Which of these is an empty tag? (a) <ul> (b) <p> (c) <h1> (d) <img>
  34. 34.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png
  35. 35.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  36. 36.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Cricket is fun.</h3>
    <p>My best friend</p>
  37. 37.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) has an address bar (d) opens web pages for us
  39. 39.True or false: <h1> has a closing tag. (a) False (b) True
  40. 40.🔍 One closing tag is missing. Which one?
    <h1>Cricket is fun.
    <h3>Hello, world!</h3>
    <p>My pets</p>
    (a) </strong> (b) </p> (c) </h3> (d) </h1>

Answer key

  1. bullets
  2. <!DOCTYPE html>
  3. an empty tag
  4. Yes
  5. 2
  6. to leave notes
  7. in the head
  8. <li>
  9. <
  10. 2
  11. </em>
  12. </p>
  13. in the body
  14. quiz.html
  15. line 1
  16. 2
  17. a web server
  18. turns HTML into a page
  19. contact.html
  20. <a>
  21. href
  22. <title>
  23. </h1>
  24. Art Gallery
  25. kite.png
  26. Art Gallery
  27. <li>
  28. 1
  29. 4
  30. <h1>
  31. alt
  32. True
  33. <img>
  34. cake.jpg
  35. True
  36. 2
  37. an opening tag
  38. is where we type code
  39. True
  40. </h1>

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