← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 567 · 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 code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  3. 3.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg
  4. 4.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Birds sing</p>
  6. 6.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
  7. 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) width (d) alt
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  9. 9.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  10. 10.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) shows line numbers (d) hosts websites online
  11. 11.True or false: <input> is an empty tag. (a) False (b) True
  12. 12.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  13. 13.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  14. 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
  15. 15.Which of these is true of a code editor? (a) has an address bar (b) sends pages over the net (c) answers page requests (d) saves our .html files
  16. 16.Which of these is an opening tag? (a) </title> (b) </b> (c) <h1> (d) </h1>
  17. 17.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) is where we type code (d) shows pages from the web
  18. 18.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
  19. 19.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
  20. 20.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) href (b) Take the quiz (c) School news (d) news.html
  21. 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  22. 22.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  24. 24.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a web browser (d) a paint program
  25. 25.True or false: a web browser answers page requests. (a) True (b) False
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Art Gallery (c) Mars is red. (d) Planets
  27. 27.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) width (b) Map of India (c) Birthday cake (d) map.png
  29. 29.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) is where we type code (d) shows line numbers
  30. 30.Which of these has a closing tag? (a) <h1> (b) <input> (c) <meta> (d) <br>
  31. 31.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  32. 32.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  34. 34.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
  35. 35.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  36. 36.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Fun facts (c) I love mangoes. (d) Our school trip
  37. 37.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) A red kite (c) cake.jpg (d) map.png
  38. 38.Which of these is a closing tag? (a) <b> (b) </body> (c) <h1> (d) <body>
  39. 39.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) nowhere (d) at the bottom
  40. 40.True or false: <img> goes in the head. (a) True (b) False

Answer key

  1. <a href="about.html">
  2. 300
  3. map.png
  4. <ol>
  5. 4
  6. an attribute
  7. src
  8. numbers
  9. -->
  10. shows line numbers
  11. True
  12. kite.png
  13. <ul>
  14. element
  15. saves our .html files
  16. <h1>
  17. shows pages from the web
  18. 2
  19. <h1>
  20. School news
  21. Yes
  22. <h1>
  23. 150
  24. a web browser
  25. False
  26. Planets
  27. 2
  28. Map of India
  29. stores a website’s files
  30. <h1>
  31. <!DOCTYPE html>
  32. an empty tag
  33. a web server
  34. <h6>
  35. href
  36. Our school trip
  37. kite.png
  38. </body>
  39. on the browser tab
  40. False

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