← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 661 · 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.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Our school trip</h2>
    <h2>I love mangoes.</h2>
    <h4>Fun facts</h4>
    <p>Our school trip</p>
  2. 2.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  3. 3.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) Good morning! (c) Fun facts
  4. 4.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  5. 5.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) href (c) Play games (d) Take the quiz
  6. 6.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    (a) Rain today (b) Cricket is fun. (c) My best friend (d) Hello, world!
  7. 7.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <h3>Good morning!</h3>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) Birthday cake (b) map.png (c) Map of India (d) width
  9. 9.Which of these has a closing tag? (a) <hr> (b) <br> (c) <meta> (d) <ul>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Sky is blue<br>Kites fly high<br>Roses are red</p>
  11. 11.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) map.png (b) width (c) Map of India (d) Birthday cake
  15. 15.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  16. 16.True or false: <a> goes in the body. (a) True (b) False
  17. 17.Which of these is true of a web server? (a) sends pages over the net (b) saves our .html files (c) colours code to help us (d) shows pages from the web
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) Welcome! (d) Art Gallery
  19. 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <table> (d) <title>
  20. 20.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
  21. 21.Which of these is a closing tag? (a) <li> (b) </h1> (c) <title> (d) <b>
  22. 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  24. 24.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My pets</p> -->
  26. 26.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  27. 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  30. 30.True or false: <meta> has a closing tag. (a) True (b) False
  31. 31.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  32. 32.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  33. 33.True or false: HTML on its own can make tables. (a) True (b) False
  34. 34.True or false: in <img>, alt names the picture file. (a) True (b) False
  35. 35.💬 Does the browser show comments on the page? (a) No (b) Yes
  36. 36.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  37. 37.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  39. 39.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) <head>
  40. 40.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->

Answer key

  1. 4
  2. in the body
  3. Fun facts
  4. False
  5. Take the quiz
  6. My best friend
  7. 2
  8. Map of India
  9. <ul>
  10. 5
  11. a closing tag
  12. alt
  13. </strong>
  14. Map of India
  15. False
  16. True
  17. sends pages over the net
  18. Welcome!
  19. <table>
  20. 2
  21. </h1>
  22. in the head
  23. 2
  24. a code editor
  25. 1
  26. width
  27. in the body
  28. an empty tag
  29. <h2>
  30. False
  31. <ul>
  32. <h6>
  33. True
  34. False
  35. No
  36. alt
  37. opens it in a new tab
  38. 1
  39. <!DOCTYPE html>
  40. 2

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