← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 675 · 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 is the odd one out? (a) shows line numbers (b) saves our .html files (c) has an address bar (d) colours code to help us
  2. 2.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) href (b) art.html (c) Play games (d) About us
  3. 3.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  4. 4.Which of these is true of a code editor? (a) turns HTML into a page (b) hosts websites online (c) stores a website’s files (d) shows line numbers
  5. 5.True or false: in <img>, width sets how wide it is. (a) True (b) False
  6. 6.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) href (b) School news (c) contact.html (d) Take the quiz
  7. 7.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  8. 8.Which of these is an opening tag? (a) <li> (b) </b> (c) </body> (d) </li>
  9. 9.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  11. 11.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
  12. 12.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <h2>Rain today</h2>
    <h2>My pets</h2>
  13. 13.Which of these is a closing tag? (a) <h1> (b) </p> (c) <title> (d) <li>
  14. 14.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  15. 15.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) href (c) contact.html (d) Play games
  17. 17.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) Riya’s Recipes (c) Easy snacks (d) I like to read.
  19. 19.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) href (b) Contact us (c) Visit the site (d) quiz.html
  20. 20.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  21. 21.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Hello, world!</h4>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <h3>I love mangoes.</h3>
  23. 23.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  25. 25.🔍 One closing tag is missing. Which one?
    <p>Hello, world!</p>
    <b>My best friend</b>
    <h3>My pets
    (a) </b> (b) </p> (c) </h3> (d) </u>
  26. 26.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="200">
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
  30. 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) index.html (c) All about me (d) Space Facts
  32. 32.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) map.png (c) A red kite (d) cake.jpg
  33. 33.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  34. 34.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) maths.html (b) Visit the site (c) https://example.com (d) contact.html
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    (a) My pets (b) Fun facts (c) Good morning!
  37. 37.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    (a) Cricket is fun. (b) Our school trip (c) Fun facts (d) My pets
  38. 38.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <h2>Rain today</h2>
    <h2>My pets</h2>
    <h2>Good morning!</h2>
    <p>Rain today</p>
  39. 39.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  40. 40.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. has an address bar
  2. Play games
  3. in a new tab
  4. shows line numbers
  5. True
  6. School news
  7. 4
  8. <li>
  9. </h2>
  10. 3
  11. 4
  12. 2
  13. </p>
  14. a web browser
  15. bullets
  16. Play games
  17. the body
  18. Easy snacks
  19. Contact us
  20. <ol>
  21. in the head
  22. 4
  23. a closing tag
  24. Yes
  25. </h3>
  26. <a>
  27. 2
  28. 200
  29. 2
  30. <ol>
  31. Space Facts
  32. kite.png
  33. Markup
  34. No
  35. contact.html
  36. Fun facts
  37. My pets
  38. 2
  39. alt
  40. has a closing tag

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