← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 449 · 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.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  2. 2.True or false: a code editor stores a website’s files. (a) False (b) True
  3. 3.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg
  4. 4.Which of these is an opening tag? (a) </body> (b) </p> (c) </b> (d) <h1>
  5. 5.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  6. 6.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) About us (b) Contact us (c) href (d) quiz.html
  7. 7.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) contact.html (c) https://example.com (d) about.html
  8. 8.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  10. 10.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Markup (c) Modern (d) Machine
  11. 11.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
  12. 12.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Good morning!</p>
    <h2>I love mangoes.</h2>
    <h4>Good morning!</h4>
  14. 14.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <strong>My pets</strong>
    <b>Fun facts</b>
    (a) </b> (b) </strong> (c) </h3> (d) </h1>
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) Space Facts (c) body (d) Thanks for visiting.
  16. 16.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Link (d) Language
  17. 17.📋 What number does the browser show next to “Mango”?
    <ol start="9">
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  18. 18.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    (a) My best friend (b) My pets (c) Fun facts
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  20. 20.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  21. 21.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) https://example.com (c) Contact us (d) art.html
  22. 22.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  24. 24.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) news.html (b) art.html (c) maths.html (d) Art corner
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort
  26. 26.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png
  27. 27.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <strong>I love mangoes.</strong>
    line 2: <b>Cricket is fun.
    line 3: <p>Good morning!</p>
    (a) line 2 (b) line 1 (c) line 3
  31. 31.True or false: <h1> is an empty tag. (a) True (b) False
  32. 32.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
  34. 34.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <p>My pets</p>
  35. 35.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a paintbrush (d) a microphone
  37. 37.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
  38. 38.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in a new tab (b) in the same tab
  39. 39.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) href (c) games.html (d) About us
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Here is my best one. (c) Easy snacks (d) Cricket Club

Answer key

  1. <ol>
  2. False
  3. cake.jpg
  4. <h1>
  5. <
  6. About us
  7. about.html
  8. <ul>
  9. 300
  10. Markup
  11. </p>
  12. an empty tag
  13. 3
  14. </h3>
  15. My drawings
  16. Language
  17. 11
  18. My pets
  19. 2
  20. <a>
  21. https://example.com
  22. a closing tag
  23. 5
  24. maths.html
  25. An old fort
  26. tiger.jpg
  27. has a closing tag
  28. No
  29. 1
  30. line 2
  31. False
  32. structure
  33. as one space
  34. 2
  35. an opening tag
  36. a plain text editor
  37. 2
  38. in the same tab
  39. About us
  40. Easy snacks

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