← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 10 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) Mars is red. (d) Riya’s Recipes
  2. 2.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) moon.png (c) dog.jpg (d) Birthday cake
  3. 3.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  5. 5.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  7. 7.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
  8. 8.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) Contact us (c) maths.html (d) About us
  9. 9.🔍 One closing tag is missing. Which one?
    <p>My pets</p>
    <h2>I love mangoes.</h2>
    <b>Good morning!
    (a) </em> (b) </h2> (c) </b> (d) </p>
  10. 10.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  11. 11.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  12. 12.Which of these has a closing tag? (a) <hr> (b) <br> (c) <h1> (d) <input>
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) </strong> (d) <strong>
  14. 14.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  15. 15.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
  16. 16.True or false: a web server answers page requests. (a) True (b) False
  17. 17.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) <body> (b) </html>
  18. 18.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Visit the site (b) href (c) about.html (d) Contact us
  20. 20.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  21. 21.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts
    line 2: <small>I love mangoes.</small>
    line 3: <b>Cricket is fun.</b>
    (a) line 2 (b) line 3 (c) line 1
  23. 23.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  24. 24.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Contact us (d) Visit the site
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  27. 27.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  28. 28.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite
    line 2: <h2>Rain today</h2>
    line 3: <i>My pets</i>
    (a) line 2 (b) line 1 (c) line 3
  30. 30.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  31. 31.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  32. 32.True or false: a web server sends pages over the net. (a) False (b) True
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Planets (c) My Hobbies (d) Thanks for visiting.
  34. 34.True or false: HTML on its own can make headings. (a) False (b) True
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) https://example.com (c) Visit the site (d) maths.html
  36. 36.Which of these is an opening tag? (a) </h1> (b) <p> (c) </body> (d) </title>
  37. 37.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) art.html (b) Play games (c) href (d) Take the quiz
  38. 38.🔠 Are headings shown in bold by default? (a) Yes (b) No
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) width (c) Map of India (d) A red kite
  40. 40.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server

Answer key

  1. Riya’s Recipes
  2. cake.jpg
  3. <h6>
  4. <h1>
  5. a web server
  6. 4
  7. stores a website’s files
  8. About us
  9. </b>
  10. 1
  11. <img>
  12. <h1>
  13. </strong>
  14. to describe the image
  15. 3
  16. True
  17. <body>
  18. has a closing tag
  19. Contact us
  20. <ul>
  21. 6
  22. line 1
  23. to leave notes
  24. 2
  25. Contact us
  26. bullets
  27. the body
  28. Markup
  29. line 1
  30. href
  31. in the same tab
  32. True
  33. Planets
  34. True
  35. contact.html
  36. <p>
  37. Take the quiz
  38. Yes
  39. A red kite
  40. a web browser

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