← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 26 · 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 paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
  2. 2.Which of these goes in the body? (a) <title> (b) <style> (c) <link rel="stylesheet"> (d) <ul>
  3. 3.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  4. 4.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <h3>My pets</h3>
  5. 5.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  7. 7.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  8. 8.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) About us (b) href (c) art.html (d) Play games
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  10. 10.Which of these is true of a web browser? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) sends pages over the net
  11. 11.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  12. 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  13. 13.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Try this poha. (c) Welcome! (d) body
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <em>My pets</em>
    line 2: <i>I love mangoes.
    line 3: <h1>Fun facts</h1>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.True or false: in <img>, height sets how tall it is. (a) False (b) True
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  18. 18.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>My best friend</p>
  19. 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
  20. 20.True or false: <li> goes inside ul or ol. (a) False (b) True
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) width (b) Our school bus (c) moon.png (d) The full moon
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
  24. 24.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  25. 25.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) about.html (b) Play games (c) href (d) Take the quiz
  26. 26.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
  27. 27.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  28. 28.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My pets</h2>
    <h2>My best friend</h2>
    <p>Our school trip</p>
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  30. 30.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  31. 31.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  32. 32.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Fun facts</h4>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  33. 33.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    (a) Cricket is fun. (b) The red kite (c) Rain today
  34. 34.True or false: <ol> lists steps in order. (a) False (b) True
  35. 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  36. 36.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  37. 37.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <meta charset="utf-8">
  38. 38.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  39. 39.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) editor (d) attribute
  40. 40.True or false: <ul> is an unordered list. (a) False (b) True

Answer key

  1. 3
  2. <ul>
  3. -->
  4. 2
  5. a web server
  6. Yes
  7. bullets
  8. Play games
  9. 100
  10. shows pages from the web
  11. on the browser tab
  12. <h6>
  13. 4
  14. Welcome!
  15. line 2
  16. True
  17. 4
  18. 2
  19. Yes
  20. True
  21. 200
  22. The full moon
  23. 1
  24. <ul>
  25. Take the quiz
  26. src
  27. <a>
  28. 2
  29. 2
  30. <h4>
  31. in the same tab
  32. 2
  33. Rain today
  34. True
  35. <h1>
  36. href
  37. <meta charset="utf-8">
  38. in a new tab
  39. element
  40. True

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