← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 300 · 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 is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) body (c) My Hobbies (d) Welcome!
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="400">
  5. 5.Which of these is true of a web server? (a) opens web pages for us (b) has an address bar (c) stores a website’s files (d) shows line numbers
  6. 6.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  7. 7.🔍 One closing tag is missing. Which one?
    <p>Our school trip</p>
    <i>Fun facts</i>
    <u>I love mangoes.
    (a) </p> (b) </i> (c) </h3> (d) </u>
  8. 8.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in the same tab (b) in a new tab
  9. 9.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) shows pages from the web (d) has an address bar
  10. 10.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
  11. 11.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    (a) I love mangoes. (b) Rain today (c) Our school trip
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets
    line 2: <p>Our school trip</p>
    line 3: <b>Rain today</b>
    (a) line 2 (b) line 3 (c) line 1
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  14. 14.True or false: <table> goes in the body. (a) True (b) False
  15. 15.🔗 Where does this link open?
    <a href="about.html">About us</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) href (c) Maths fun (d) Visit the site
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) We won by 5 runs. (d) My Hobbies
  18. 18.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  19. 19.Which of these has a closing tag? (a) <br> (b) <input> (c) <b> (d) <hr>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep
  21. 21.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  22. 22.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) news.html (b) School news (c) Art corner (d) href
  23. 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  25. 25.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <small>The red kite</small>
    <strong>Fun facts
    (a) </em> (b) </small> (c) </strong> (d) </h1>
  26. 26.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) About us (b) href (c) Play games (d) games.html
  28. 28.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
  30. 30.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) I love mangoes. (c) My best friend (d) Hello, world!
  31. 31.Which of these has a closing tag? (a) <br> (b) <hr> (c) <meta> (d) <ul>
  32. 32.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  33. 33.🔍 Which is the odd one out? (a) is where we type code (b) answers page requests (c) stores a website’s files (d) hosts websites online
  34. 34.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  35. 35.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  36. 36.💬 Does the browser show comments on the page? (a) No (b) Yes
  37. 37.Which of these is true of a code editor? (a) turns HTML into a page (b) answers page requests (c) sends pages over the net (d) colours code to help us
  38. 38.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  39. 39.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  40. 40.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. Welcome!
  2. 2
  3. dog.jpg
  4. 400
  5. stores a website’s files
  6. map.png
  7. </u>
  8. in the same tab
  9. hosts websites online
  10. <h6>
  11. I love mangoes.
  12. line 1
  13. <h1>
  14. True
  15. in the same tab
  16. Visit the site
  17. My drawings
  18. 4
  19. <b>
  20. tiger.jpg
  21. a slash /
  22. Art corner
  23. has a closing tag
  24. a web server
  25. </strong>
  26. a closing tag
  27. Play games
  28. the body
  29. 4
  30. My best friend
  31. <ul>
  32. 6
  33. is where we type code
  34. an empty tag
  35. in the same tab
  36. No
  37. colours code to help us
  38. <a>
  39. a web browser
  40. in a new tab

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