← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 803 · 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 attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
  2. 2.🔍 One closing tag is missing. Which one?
    <em>Rain today</em>
    <h1>Fun facts</h1>
    <h3>My best friend
    (a) </h1> (b) </i> (c) </h3> (d) </em>
  3. 3.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  4. 4.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  5. 5.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  6. 6.Which of these has a closing tag? (a) <input> (b) <img> (c) <li> (d) <hr>
  7. 7.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  8. 8.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png
  9. 9.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.Which of these goes in the head? (a) <p> (b) <a> (c) <table> (d) <title>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg
  12. 12.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Cricket is fun.</h3>
    <h2>My best friend</h2>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  13. 13.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Good morning! (c) My pets
  14. 14.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
  15. 15.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
  16. 16.True or false: a web server has an address bar. (a) True (b) False
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  18. 18.Which of these is an opening tag? (a) <body> (b) </li> (c) </p> (d) </b>
  19. 19.Which of these is an empty tag? (a) <input> (b) <p> (c) <ul> (d) <b>
  20. 20.True or false: HTML on its own cannot make a form. (a) True (b) False
  21. 21.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) answers page requests (d) is where we type code
  22. 22.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  23. 23.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  25. 25.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
  26. 26.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  27. 27.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <p>Our school trip</p>
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  29. 29.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  31. 31.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
  32. 32.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Stars shine<br>Roses are red<br>Birds sing</p>
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  37. 37.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) </h3> (d) <\h3>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today</i>
    line 2: <b>Fun facts</b>
    line 3: <h2>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  39. 39.📄 Can HTML on its own make a form? (a) Yes (b) No
  40. 40.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. alt
  2. </h3>
  3. <h1>
  4. True
  5. <ul>
  6. <li>
  7. -->
  8. map.png
  9. in the head
  10. <title>
  11. cake.jpg
  12. 3
  13. My best friend
  14. Markup
  15. 2
  16. False
  17. 1
  18. <body>
  19. <input>
  20. False
  21. has an address bar
  22. opens it in a new tab
  23. in the body
  24. in a new tab
  25. a line across the page
  26. No
  27. 1
  28. Yes
  29. <
  30. <h1>
  31. <h1>
  32. 2
  33. 5
  34. 3
  35. <h1>
  36. A tiger asleep
  37. </h3>
  38. line 3
  39. Yes
  40. an opening tag

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