← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 566 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) Match report (c) Thanks for visiting. (d) index.html
  2. 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
  4. 4.True or false: <ul> lists things in any order. (a) True (b) False
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  6. 6.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  7. 7.True or false: in <img>, alt describes the picture. (a) True (b) False
  8. 8.True or false: in <img>, alt names the picture file. (a) False (b) True
  9. 9.True or false: <ul> is an empty tag. (a) True (b) False
  10. 10.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  12. 12.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <i>Our school trip</i>
    <h3>Fun facts
    (a) </h3> (b) </i> (c) </u> (d) </em>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <b>My pets</b>
    line 2: <strong>Good morning!</strong>
    line 3: <h1>Hello, world!
    (a) line 2 (b) line 1 (c) line 3
  14. 14.True or false: <ol> shows bullet points. (a) True (b) False
  15. 15.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  16. 16.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) height (d) src
  17. 17.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  18. 18.Which of these is true of a web server? (a) shows line numbers (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Easy snacks (d) Try this poha.
  20. 20.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  21. 21.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  22. 22.🔍 One closing tag is missing. Which one?
    <em>Cricket is fun.</em>
    <i>My pets</i>
    <h1>The red kite
    (a) </h3> (b) </h1> (c) </i> (d) </em>
  23. 23.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) height (d) width
  24. 24.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Rain today</h2>
    <p>I love mangoes.</p>
    <h4>Good morning!</h4>
    <h4>Rain today</h4>
  25. 25.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) news.html (c) Play games (d) games.html
  26. 26.Which of these is a closing tag? (a) <body> (b) <title> (c) <li> (d) </h1>
  27. 27.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) art.html (b) quiz.html (c) Contact us (d) news.html
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg
  29. 29.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Hello, world! (c) Our school trip (d) Cricket is fun.
  30. 30.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
  31. 31.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Art Gallery (b) Welcome! (c) Here is my best one. (d) body
  32. 32.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>My pets</p>
  34. 34.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  35. 35.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <i> (d) <\i>
  36. 36.Which of these is true of a code editor? (a) colours code to help us (b) has an address bar (c) opens web pages for us (d) answers page requests
  37. 37.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  38. 38.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Our school trip (c) Cricket is fun.
  40. 40.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers

Answer key

  1. My Hobbies
  2. <img>
  3. 1
  4. True
  5. 6
  6. <h6>
  7. True
  8. False
  9. False
  10. <h1>
  11. 3
  12. </h3>
  13. line 3
  14. False
  15. <ol>
  16. alt
  17. a code editor
  18. hosts websites online
  19. Cricket Club
  20. a web browser
  21. to describe the image
  22. </h1>
  23. alt
  24. 4
  25. news.html
  26. </h1>
  27. art.html
  28. A tiger asleep
  29. Hello, world!
  30. tags
  31. Welcome!
  32. src
  33. 3
  34. a web browser
  35. </i>
  36. colours code to help us
  37. <!DOCTYPE html>
  38. a closing tag
  39. Fun facts
  40. numbers

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