← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 463 · 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 <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
  2. 2.🖼️ 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
  3. 3.True or false: <ul> lists things in any order. (a) True (b) False
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
  5. 5.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
  6. 6.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
  7. 7.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) Play games (d) contact.html
  8. 8.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) bus.jpg (b) Our school bus (c) tiger.jpg (d) fort.jpg
  9. 9.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.</i>
    <b>Rain today
    <u>My best friend</u>
    (a) </i> (b) </u> (c) </h3> (d) </b>
  10. 10.True or false: in <img>, src is read by screen readers. (a) True (b) False
  11. 11.🔍 Which is the odd one out? (a) hosts websites online (b) has an address bar (c) sends pages over the net (d) answers page requests
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) <!DOCTYPE html> (d) </body>
  13. 13.🔍 One closing tag is missing. Which one?
    <b>Fun facts
    <em>Rain today</em>
    <strong>Our school trip</strong>
    (a) </u> (b) </strong> (c) </em> (d) </b>
  14. 14.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  15. 15.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) href (b) About us (c) news.html (d) Play games
  17. 17.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  18. 18.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  19. 19.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  20. 20.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) Play games (c) About us (d) about.html
  21. 21.True or false: <ol> lists steps in order. (a) False (b) True
  22. 22.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  23. 23.True or false: <h1> goes in the head. (a) True (b) False
  24. 24.🔍 Which is the odd one out? (a) hosts websites online (b) turns HTML into a page (c) stores a website’s files (d) answers page requests
  25. 25.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) saves our .html files (d) stores a website’s files
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) kite.png (b) A red kite (c) width (d) Map of India
  27. 27.Which of these is an opening tag? (a) </body> (b) </h1> (c) </p> (d) <body>
  28. 28.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <\strong> (d) <strong>
  29. 29.Which of these has a closing tag? (a) <img> (b) <input> (c) <b> (d) <meta>
  30. 30.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  31. 31.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  32. 32.True or false: <ol> shows bullet points. (a) True (b) False
  33. 33.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    (a) My best friend (b) Fun facts (c) Rain today
  34. 34.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort
  37. 37.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>My pets</p>
  38. 38.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Our school trip</h4>
    <h4>My pets</h4>
    <p>Hello, world!</p>
  39. 39.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Language (d) Line
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) Map of India (b) Birthday cake (c) width (d) map.png

Answer key

  1. a paragraph
  2. to describe the image
  3. True
  4. 6
  5. -->
  6. <h6>
  7. Take the quiz
  8. bus.jpg
  9. </b>
  10. False
  11. has an address bar
  12. <!DOCTYPE html>
  13. </b>
  14. opens it in a new tab
  15. an opening tag
  16. Play games
  17. <a>
  18. a closing tag
  19. a web server
  20. Play games
  21. True
  22. 1
  23. False
  24. turns HTML into a page
  25. stores a website’s files
  26. A red kite
  27. <body>
  28. </strong>
  29. <b>
  30. 4
  31. 6
  32. False
  33. Fun facts
  34. 2
  35. 5
  36. An old fort
  37. 3
  38. 3
  39. Language
  40. Map of India

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