← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 238 · 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 picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg
  2. 2.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h3>The red kite
    line 3: <i>Our school trip</i>
    (a) line 1 (b) line 2 (c) line 3
  5. 5.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  6. 6.Which of these is an opening tag? (a) </h1> (b) <b> (c) </p> (d) </title>
  7. 7.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  9. 9.📝 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>
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Sky is blue<br>Stars shine<br>Kites fly high</p>
  12. 12.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  13. 13.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) turns HTML into a page (d) has an address bar
  14. 14.True or false: <ul> lists things in any order. (a) True (b) False
  15. 15.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
  17. 17.Which of these is a closing tag? (a) <body> (b) </h1> (c) <li> (d) <b>
  18. 18.True or false: <p> goes in the body. (a) True (b) False
  19. 19.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  20. 20.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Cricket Club (c) All about me (d) body
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red</p>
  23. 23.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
  24. 24.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  25. 25.Which of these goes in the body? (a) <title> (b) <img> (c) <link rel="stylesheet"> (d) <style>
  26. 26.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>Good morning!</h2>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Class 7 Blog (d) Try this poha.
  28. 28.True or false: <h1> has a closing tag. (a) True (b) False
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ul>
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
  31. 31.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
  32. 32.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  33. 33.📄 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) body (b) Try this poha. (c) Welcome! (d) Art Gallery
  34. 34.True or false: in <img>, width sets how tall it is. (a) True (b) False
  35. 35.💬 Does the browser show comments on the page? (a) Yes (b) No
  36. 36.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <em>The red kite
    line 3: <p>Cricket is fun.</p>
    (a) line 3 (b) line 2 (c) line 1
  38. 38.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  39. 39.True or false: a web browser answers page requests. (a) True (b) False
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) Birthday cake (c) map.png (d) width

Answer key

  1. bus.jpg
  2. <h6>
  3. tiger.jpg
  4. line 2
  5. alt
  6. <b>
  7. </em>
  8. <h1>
  9. 5
  10. An old fort
  11. 5
  12. 9
  13. stores a website’s files
  14. True
  15. True
  16. <h1>
  17. </h1>
  18. True
  19. a web browser
  20. -->
  21. All about me
  22. 5
  23. </h1>
  24. <a href="about.html">
  25. <img>
  26. 4
  27. Class 7 Blog
  28. True
  29. 4
  30. 2
  31. saves our .html files
  32. <li>
  33. Welcome!
  34. False
  35. No
  36. in a new tab
  37. line 2
  38. <ul>
  39. False
  40. Map of India

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