← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 71 · 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 text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) Our school trip (b) Fun facts (c) My best friend
  2. 2.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) </html>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) kite.png (b) fort.jpg (c) tiger.jpg (d) An old fort
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  5. 5.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  7. 7.Which of these is true of a code editor? (a) has an address bar (b) hosts websites online (c) turns HTML into a page (d) colours code to help us
  8. 8.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  9. 9.Which of these is a closing tag? (a) <h1> (b) <title> (c) <p> (d) </body>
  10. 10.True or false: <h1> is an empty tag. (a) True (b) False
  11. 11.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) dog.jpg (b) map.png (c) cake.jpg (d) Map of India
  12. 12.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  13. 13.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) keys (d) tags
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  15. 15.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    (a) Our school trip (b) The red kite (c) I love mangoes.
  16. 16.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) map.png (c) cake.jpg (d) A red kite
  18. 18.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  19. 19.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  20. 20.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <u> (c) </u> (d) <\u>
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg
  22. 22.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  23. 23.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  25. 25.True or false: HTML on its own can make a form. (a) True (b) False
  26. 26.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) is where we type code
  27. 27.Which of these has a closing tag? (a) <title> (b) <meta> (c) <img> (d) <hr>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg
  29. 29.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Fun facts (b) Good morning! (c) Hello, world! (d) My pets
  30. 30.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  31. 31.True or false: a web server hosts websites online. (a) True (b) False
  32. 32.Which of these is a closing tag? (a) </p> (b) <h1> (c) <p> (d) <li>
  33. 33.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
  34. 34.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) href (b) School news (c) Art corner (d) contact.html
  36. 36.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  37. 37.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  38. 38.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  39. 39.True or false: in <img>, src tells which image to load. (a) True (b) False
  40. 40.True or false: <h1> goes in the body. (a) True (b) False

Answer key

  1. Fun facts
  2. </html>
  3. fort.jpg
  4. 150
  5. width
  6. 1
  7. colours code to help us
  8. href
  9. </body>
  10. False
  11. map.png
  12. -->
  13. tags
  14. bullets
  15. The red kite
  16. <!DOCTYPE html>
  17. kite.png
  18. an attribute
  19. a web browser
  20. </u>
  21. Birthday cake
  22. Yes
  23. <h2>
  24. <h1>
  25. True
  26. is where we type code
  27. <title>
  28. map.png
  29. Hello, world!
  30. <!DOCTYPE html>
  31. True
  32. </p>
  33. </body>
  34. alt
  35. Art corner
  36. a web browser
  37. True
  38. <h6>
  39. True
  40. True

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